@ozdao/prometheus-framework 0.1.35 → 0.1.37
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-568b55bb.js +1 -0
- package/dist/BackofficeGallery-b4105137.mjs +306 -0
- package/dist/BlockTags-8cddaef7.js +1 -0
- package/dist/BlockTags-ee310572.mjs +853 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Button-7643c9aa.js +1 -0
- package/dist/Button-9e1a9284.mjs +226 -0
- package/dist/ButtonToggleMembership-15f149cb.js +1 -0
- package/dist/ButtonToggleMembership-3bb9139e.mjs +90 -0
- package/dist/CardBlogpost-38016b80.mjs +246 -0
- package/dist/CardBlogpost-cc208f93.js +1 -0
- package/dist/CardOrganization-d93c9bdb.js +1 -0
- package/dist/CardOrganization-e920be73.mjs +234 -0
- package/dist/CardProduct-92affca1.js +1 -0
- package/dist/CardProduct-fca53299.mjs +193 -0
- package/dist/Checkbox-5dbe7b23.mjs +62 -0
- package/dist/Checkbox-76f09248.js +1 -0
- package/dist/Chips-9d81b215.mjs +214 -0
- package/dist/Chips-d47704e6.js +1 -0
- package/dist/Community-87522a04.mjs +132 -0
- package/dist/Community-aef23aee.js +1 -0
- package/dist/Dashboard-91d73bc5.js +1 -0
- package/dist/Dashboard-ea9035bc.mjs +152 -0
- package/dist/Dropdown-31115457.js +1 -0
- package/dist/Dropdown-cab3605b.mjs +146 -0
- package/dist/EULA-aba6a807.js +1 -0
- package/dist/EditOrder-94bbebff.mjs +221 -0
- package/dist/EditOrder-c070d474.js +1 -0
- package/dist/EmptyState-d65bab5b.js +1 -0
- package/dist/EmptyState-e404b05d.mjs +36 -0
- package/dist/Events-cdfbca78.js +1 -0
- package/dist/Events-e9dd58f7.mjs +123 -0
- package/dist/Feed-22464fcd.js +1 -0
- package/dist/Feed-6e96d3dd.mjs +124 -0
- package/dist/Feed-793b3eef.mjs +146 -0
- package/dist/Feed-7b80704d.mjs +361 -0
- package/dist/Feed-98b47c6f.js +1 -0
- package/dist/Feed-b30ef609.js +1 -0
- package/dist/Feed-c5d4390a.js +1 -0
- package/dist/Feed-d114330c.mjs +112 -0
- package/dist/Field-e2a43424.js +1 -0
- package/dist/Field-e5ad88d3.mjs +75 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js +1 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs +1 -0
- package/dist/IconChevronRight-a55f838e.js +1 -0
- package/dist/IconChevronRight-fae9d012.mjs +28 -0
- package/dist/IconCommunity-468dc457.mjs +65 -0
- package/dist/IconCommunity-b339e806.js +1 -0
- package/dist/IconCross-5bf93179.js +1 -0
- package/dist/IconCross-84cb1292.mjs +28 -0
- package/dist/IconEdit-9edfd74d.mjs +21 -0
- package/dist/IconEdit-c0469b45.js +1 -0
- package/dist/Image-245c003d.mjs +480 -0
- package/dist/Image-35d31936.js +9 -0
- package/dist/LabelGooglePlay-24feb437.mjs +31 -0
- package/dist/LabelGooglePlay-f80e5ff0.js +1 -0
- package/dist/LeftoverAdd-08d9fb54.mjs +228 -0
- package/dist/LeftoverAdd-fc673884.js +1 -0
- package/dist/Leftovers-296c0042.js +1 -0
- package/dist/Leftovers-685d9f19.mjs +136 -0
- package/dist/Loader-21f016da.js +1 -0
- package/dist/Loader-cd422786.mjs +41 -0
- package/dist/Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Members-2cb2ff58.mjs +114 -0
- package/dist/Members-85534d1f.js +1 -0
- package/dist/Menu-b5d6a0c7.js +1 -0
- package/dist/Menu-dd7645c1.mjs +13 -0
- package/dist/MenuItem-56ae7f94.js +1 -0
- package/dist/MenuItem-6296d02f.mjs +63 -0
- package/dist/Orders-b64e8cb9.js +1 -0
- package/dist/Orders-ff30db05.mjs +75 -0
- package/dist/Organizations-0cb37d68.js +1 -0
- package/dist/Organizations-d6ef2113.mjs +73 -0
- package/dist/Payments-53e5fecf.js +1 -0
- package/dist/Payments-82e545e1.mjs +87 -0
- package/dist/PlaceholderUserpic-47f6f319.js +1 -0
- package/dist/Popup-0915427c.mjs +74 -0
- package/dist/Popup-795f5c88.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Product-5994a8c9.mjs +653 -0
- package/dist/Product-68fa1e9e.js +7 -0
- package/dist/ProductEdit-64207814.mjs +296 -0
- package/dist/ProductEdit-a434240f.js +1 -0
- package/dist/ProductsBackoffice-0c93f9b6.js +1 -0
- package/dist/ProductsBackoffice-3d987c60.mjs +86 -0
- package/dist/ProfileBlogposts-0b81d964.js +1 -0
- package/dist/ProfileBlogposts-b59992cf.mjs +79 -0
- package/dist/ProfileEvents-3f7ca2c1.js +1 -0
- package/dist/ProfileEvents-bbdd62e7.mjs +70 -0
- package/dist/ProfileOrganizations-4734c02e.mjs +73 -0
- package/dist/ProfileOrganizations-d55ee487.js +1 -0
- package/dist/Publics-0762210a.js +1 -0
- package/dist/Publics-660e851c.mjs +45 -0
- package/dist/SelectMulti-58704d69.mjs +1038 -0
- package/dist/SelectMulti-c25765cf.js +1 -0
- package/dist/SkeletonBlogpost-95db0fa9.js +1 -0
- package/dist/SkeletonBlogpost-e0621af7.mjs +16 -0
- package/dist/SkeletonEvent-8690422d.mjs +16 -0
- package/dist/SkeletonEvent-eb284de8.js +1 -0
- package/dist/SkeletonEventShort-6c9e3940.js +1 -0
- package/dist/SkeletonEventShort-f030e56f.mjs +16 -0
- package/dist/SkeletonOrganization-5c09cfc5.js +1 -0
- package/dist/SkeletonOrganization-8690422d.mjs +16 -0
- package/dist/Socials-31c06635.mjs +74 -0
- package/dist/Socials-cceaeaf2.js +1 -0
- package/dist/Tab-054b61f7.mjs +46 -0
- package/dist/Tab-2c1e4224.js +1 -0
- package/dist/Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/addMembersQuantity-7147aa4a.js +89 -0
- package/dist/addMembersQuantity-eac999f0.mjs +90 -0
- package/dist/auth-06d35b82.js +7 -0
- package/dist/auth-ec618cb3.mjs +627 -0
- package/dist/auth.client.cjs +7 -7
- package/dist/auth.client.js +22 -19
- package/dist/auth.server.js +7 -7
- package/dist/auth.server.mjs +7 -7
- package/dist/auth.validation-0ce9e326.js +1 -0
- package/dist/auth.validation-ba3606bf.mjs +24 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +235 -59
- package/dist/categories-82b28618.js +1 -0
- package/dist/categories-df3240a7.mjs +122 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +233 -227
- package/dist/community.server.js +223 -195
- package/dist/community.server.mjs +223 -195
- package/dist/components/Field/Field.vue.d.ts +58 -2
- package/dist/components/Field/Field.vue.d.ts.map +1 -1
- package/dist/components/UploadImage/UploadImage.vue.d.ts +1 -1
- package/dist/dribbble-8e8e169b.js +1 -0
- package/dist/dribbble-ae37c2ac.mjs +127 -0
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +1793 -1888
- package/dist/events.server.js +106 -216
- package/dist/events.server.mjs +106 -216
- package/dist/globals.server.js +1 -1
- package/dist/globals.server.mjs +1 -1
- package/dist/icons.client.cjs +1 -0
- package/dist/icons.client.js +84 -0
- package/dist/inputs.validation-d7cef32b.js +1 -0
- package/dist/inputs.validation-db65277a.mjs +83 -0
- package/dist/landing.client.cjs +1 -1
- package/dist/landing.client.js +40 -64
- package/dist/leftovers-66951de6.js +1 -0
- package/dist/leftovers-be37c7a5.mjs +67 -0
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +7 -4
- package/dist/mailing-76895d59.mjs +50 -0
- package/dist/mailing-9659b3c4.js +49 -0
- package/dist/main.css +1 -1
- package/dist/memberships-12210953.mjs +68 -0
- package/dist/memberships-393765d8.js +1 -0
- package/dist/metadata.schema-147f9902.mjs +212 -0
- package/dist/metadata.schema-93397f9f.js +211 -0
- package/dist/metadata.schema-a539dd65.mjs +210 -0
- package/dist/metadata.schema-e4fe5c57.js +209 -0
- package/dist/modules/community/components/blocks/FooterBlogpost.vue.d.ts +1 -1
- package/dist/modules/community/components/sections/Feed.vue.d.ts +4 -3
- package/dist/modules/events/components/sections/Feed.vue.d.ts +4 -4
- package/dist/modules/events/components/sections/List.vue.d.ts +3 -3
- package/dist/modules/globals/components/blocks/CardFooter.vue.d.ts +8 -0
- package/dist/modules/globals/components/blocks/CardHeader.vue.d.ts +15 -0
- package/dist/modules/globals/components/sections/Feed.vue.d.ts +69 -0
- package/dist/modules/orders/components/pages/EditOrder.vue.d.ts +6 -0
- package/dist/modules/orders/components/pages/Favorites.vue.d.ts +6 -0
- package/dist/modules/orders/components/pages/History.vue.d.ts +6 -0
- package/dist/modules/orders/components/pages/Orders.vue.d.ts +2 -0
- package/dist/modules/orders/components/pages/ViewOrder.vue.d.ts +6 -0
- package/dist/modules/orders/components/sections/Form.vue.d.ts +1 -0
- package/dist/modules/organizations/components/blocks/CardDepartment.vue.d.ts +7 -0
- package/dist/modules/organizations/components/blocks/User.vue.d.ts +1 -1
- package/dist/modules/organizations/components/elements/ButtonToggleMembership.vue.d.ts +1 -1
- package/dist/modules/organizations/components/pages/Members.vue.d.ts +2 -0
- package/dist/modules/organizations/components/sections/Department2.vue.d.ts +7 -0
- package/dist/modules/organizations/components/sections/Feed.vue.d.ts +4 -4
- package/dist/modules/organizations/components/sections/FeedDepartments.vue.d.ts +8 -0
- package/dist/modules/payments/components/pages/Payments.vue.d.ts +2 -0
- package/dist/modules/products/components/blocks/CardLeftover.vue.d.ts +6 -0
- package/dist/modules/products/components/blocks/CardPosition.vue.d.ts +11 -0
- package/dist/modules/products/components/blocks/CardProduct.vue.d.ts +6 -0
- package/dist/modules/products/components/blocks/LeftoverPositions.vue.d.ts +0 -1
- package/dist/modules/products/components/pages/ProductsBackoffice.vue.d.ts +2 -0
- package/dist/modules/products/components/sections/FilterProducts.vue.d.ts +9 -0
- package/dist/modules/products/components/sections/SortProducts.vue.d.ts +10 -0
- package/dist/modules/reports/components/sections/FormReport.vue.d.ts +3 -3
- package/dist/modules/spots/components/blocks/CardSpot.vue.d.ts +7 -0
- package/dist/modules/spots/components/blocks/SpotMemberModify.vue.d.ts +11 -0
- package/dist/modules/spots/components/blocks/SpotSub.vue.d.ts +6 -0
- package/dist/modules/spots/components/pages/Spot.vue.d.ts +7 -0
- package/dist/modules/spots/components/pages/SpotEdit.vue.d.ts +2 -0
- package/dist/modules/spots/components/sections/Feed.vue.d.ts +8 -0
- package/dist/modules/spots/components/sections/PlaceModify.vue.d.ts +9 -0
- package/dist/modules/spots/components/sections/Places.vue.d.ts +9 -0
- package/dist/modules/wallet/components/pages/Wallet.vue.d.ts +2 -0
- package/dist/orders-13c10d49.mjs +85 -0
- package/dist/orders-37f041aa.js +1 -0
- package/dist/organizations-4d18a2e2.js +1 -0
- package/dist/organizations-6ed907e3.mjs +122 -0
- package/dist/organizations.client-01593e4d.js +3 -0
- package/dist/organizations.client-1b9fa66e.mjs +2997 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +75 -51
- package/dist/organizations.server.js +9 -20
- package/dist/organizations.server.mjs +9 -20
- package/dist/products-7960bbd4.js +1 -0
- package/dist/products-bf5783aa.mjs +108 -0
- package/dist/prometheus-framework.cjs.js +17 -17
- package/dist/prometheus-framework.es.js +771 -758
- package/dist/states.validation-03f7cd49.js +1 -0
- package/dist/states.validation-50e3a5a0.mjs +13 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +214 -258
- package/dist/users.server.js +1 -1
- package/dist/users.server.mjs +1 -1
- package/package.json +2 -119
- package/src/components/Field/Field.vue +34 -9
- package/src/components/SelectMulti/SelectMulti.vue +18 -22
- package/src/modules/auth/routes/auth.routes.js +9 -6
- package/src/modules/auth/store/auth.js +34 -15
- package/src/modules/backoffice/components/pages/Dashboard.vue +91 -0
- package/src/modules/backoffice/router/admin.js +0 -28
- package/src/modules/backoffice/router/backoffice.js +131 -4
- package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
- package/src/modules/community/components/pages/Blog.vue +1 -0
- package/src/modules/community/components/sections/Comments.vue +1 -1
- package/src/modules/community/components/sections/Feed.vue +6 -0
- package/src/modules/community/controllers/blog.controller.js +129 -285
- package/src/modules/community/controllers/reactions.controller.js +2 -0
- package/src/modules/community/controllers/utils/queryProcessor.js +56 -0
- package/src/modules/community/controllers/utils/queryProcessorReactions.js +63 -0
- package/src/modules/community/routes/blog.routes.js +10 -6
- package/src/modules/community/store/blogposts.js +5 -5
- package/src/modules/events/components/blocks/CardEvent.vue +2 -3
- package/src/modules/events/components/pages/Events.vue +4 -4
- package/src/modules/events/components/sections/Feed.vue +4 -4
- package/src/modules/events/components/sections/List.vue +2 -2
- package/src/modules/events/controllers/events.controller.js +8 -6
- package/src/modules/events/controllers/utils/queryProcessor.js +111 -1
- package/src/modules/events/models/event.model.js +0 -4
- package/src/modules/events/routes/events.routes.js +9 -6
- package/src/modules/events/store/events.js +5 -7
- package/src/{components/CardHeader → modules/globals/components/blocks}/CardHeader.vue +31 -4
- package/src/modules/globals/components/sections/Feed.vue +136 -0
- package/src/modules/globals/controllers/utils/queryProcessor.js +19 -117
- package/src/modules/globals/models/engagement.schema.js +29 -25
- package/src/modules/globals/utils/mailing.js +1 -1
- package/src/modules/icons/icons.client.js +51 -0
- package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -1
- package/src/modules/marketplace/components/pages/Catalog.vue +3 -4
- package/src/modules/marketplace/router/marketplace.js +0 -11
- package/src/modules/middlewares/client/auth.validation.js +1 -1
- package/src/modules/orders/components/blocks/CardOrderItem.vue +1 -2
- package/src/modules/orders/components/pages/EditOrder.vue +238 -0
- package/src/modules/{backoffice → orders}/components/pages/Favorites.vue +2 -2
- package/src/modules/orders/components/pages/Order.vue +28 -34
- package/src/modules/orders/components/pages/Orders.vue +90 -0
- package/src/modules/{backoffice/components/pages/History.vue → orders/components/pages/ViewOrder.vue} +0 -8
- package/src/modules/orders/components/sections/Form.vue +52 -34
- package/src/modules/orders/controllers/orders.controller.js +102 -72
- package/src/modules/orders/models/order.model.js +30 -22
- package/src/modules/orders/router/orders.router.js +30 -0
- package/src/modules/orders/routes/orders.routes.js +23 -13
- package/src/modules/orders/store/orders.js +67 -40
- package/src/modules/organizations/components/{sections/Department.vue → blocks/CardDepartment.vue} +1 -10
- package/src/modules/organizations/components/blocks/CardOrganization.vue +13 -9
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +3 -3
- package/src/modules/organizations/components/{sections/MembersTab.vue → pages/Members.vue} +23 -8
- package/src/modules/organizations/components/pages/Organization.vue +80 -46
- package/src/modules/organizations/components/pages/Organizations.vue +45 -90
- package/src/modules/organizations/components/sections/{StructureTab.vue → FeedDepartments.vue} +5 -5
- package/src/modules/organizations/components/sections/Organizations.vue +1 -2
- package/src/modules/organizations/components/sections/Publics.vue +3 -2
- package/src/modules/organizations/controllers/organizations.controller.js +8 -21
- package/src/modules/organizations/controllers/organizations.new.controller.js +372 -0
- package/src/modules/organizations/controllers/utils/addUserStatusFields.js +53 -48
- package/src/modules/organizations/controllers/utils/queryProcessor.js +87 -0
- package/src/modules/organizations/controllers/utils/queryProcessorOrganizations.js +25 -0
- package/src/modules/organizations/organizations.client.js +42 -46
- package/src/modules/organizations/router/departments.router.js +29 -0
- package/src/modules/organizations/router/members.router.js +19 -0
- package/src/modules/organizations/router/organizations.js +12 -88
- package/src/modules/organizations/router/organizations.router.js +38 -0
- package/src/modules/organizations/router/products.router.js +24 -0
- package/src/modules/organizations/store/departments.js +108 -0
- package/src/modules/{backoffice/components/admin/Orders.vue → payments/components/pages/Payments.vue} +0 -15
- package/src/modules/products/components/blocks/{Leftover.vue → CardLeftover.vue} +21 -12
- package/src/modules/products/components/blocks/CardPosition.vue +84 -0
- package/src/modules/products/components/blocks/LeftoverPositions.vue +65 -136
- package/src/modules/products/components/pages/LeftoverAdd.vue +133 -88
- package/src/modules/products/components/pages/Leftovers.vue +91 -64
- package/src/modules/products/components/pages/Product.vue +3 -3
- package/src/modules/products/components/pages/Products.vue +42 -263
- package/src/modules/products/components/pages/ProductsBackoffice.vue +92 -0
- package/src/modules/products/components/sections/FilterProducts.vue +180 -0
- package/src/modules/products/components/sections/PopularProducts.vue +2 -2
- package/src/modules/products/components/sections/SectionProduct.vue +18 -3
- package/src/modules/products/components/sections/SortProducts.vue +76 -0
- package/src/modules/products/controllers/leftovers.controller.js +51 -45
- package/src/modules/products/controllers/modifications.controller.js +66 -0
- package/src/modules/products/controllers/products.controller.js +67 -111
- package/src/modules/products/models/leftover.model.js +12 -9
- package/src/modules/products/models/product.model.js +1 -0
- package/src/modules/products/router/products.router.js +46 -0
- package/src/modules/products/routes/products.routes.js +4 -9
- package/src/modules/products/store/leftovers.js +56 -59
- package/src/modules/products/store/products.js +21 -22
- package/src/modules/spots/components/blocks/CardSpot.vue +104 -0
- package/src/modules/spots/components/blocks/SpotMemberModify.vue +92 -0
- package/src/modules/spots/components/blocks/SpotSub.vue +24 -0
- package/src/modules/spots/components/pages/Map.vue +2 -2
- package/src/modules/spots/components/pages/Spot.vue +107 -0
- package/src/modules/spots/components/pages/SpotEdit.vue +319 -0
- package/src/modules/spots/components/sections/Feed.vue +64 -0
- package/src/modules/spots/controllers/spots.controller.js +83 -0
- package/src/modules/spots/models/spot.model.js +72 -0
- package/src/modules/spots/router/spots.js +34 -1
- package/src/modules/spots/routes/spots.routes.js +31 -0
- package/src/modules/spots/store/spots.js +15 -15
- package/src/modules/users/components/pages/Profile.vue +2 -3
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/styles/components/block.scss +2 -4
- package/src/modules/backoffice/components/admin/LeftoverAdd.vue +0 -157
- package/src/modules/backoffice/components/admin/Leftovers.vue +0 -119
- package/src/modules/backoffice/components/admin/Order.vue +0 -199
- package/src/modules/backoffice/components/admin/Product.vue +0 -28
- package/src/modules/backoffice/components/admin/Products.vue +0 -82
- package/src/modules/backoffice/components/pages/Organizations.vue +0 -104
- package/src/modules/community/controllers/blog.new.controller.js +0 -290
- package/src/modules/organizations/components/blocks/DepartmentSubDepartmentModify.vue +0 -92
- package/src/modules/organizations/components/elements/ButtonFollow.vue +0 -84
- package/src/modules/organizations/components/pages/OrganizationsAccount.vue +0 -110
- package/src/modules/organizations/controllers/utils/excludeBlockedMembers.js +0 -18
- /package/src/{components/CardFooter → modules/globals/components/blocks}/CardFooter.vue +0 -0
- /package/src/modules/{orders/controllers → payments/controller}/payments.controller.js +0 -0
- /package/src/modules/{orders → payments}/routes/payments.routes.js +0 -0
- /package/src/modules/{orders → payments}/store/payments.js +0 -0
- /package/src/modules/products/components/blocks/{ProductCard.vue → CardProduct.vue} +0 -0
- /package/src/modules/{organizations → spots}/components/sections/PlaceModify.vue +0 -0
- /package/src/modules/{organizations → spots}/components/sections/Places.vue +0 -0
- /package/src/modules/{backoffice → wallet}/components/pages/Wallet.vue +0 -0
@@ -11,8 +11,8 @@ const $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true
|
|
11
11
|
$axios.defaults.withCredentials = true
|
12
12
|
// State
|
13
13
|
const state = reactive({
|
14
|
-
|
15
|
-
|
14
|
+
spots: [],
|
15
|
+
spot: {
|
16
16
|
organization: '',
|
17
17
|
profile: {
|
18
18
|
photo: '',
|
@@ -29,18 +29,18 @@ const state = reactive({
|
|
29
29
|
delivery: [],
|
30
30
|
payment: [],
|
31
31
|
members: [],
|
32
|
-
|
32
|
+
subspots: [],
|
33
33
|
},
|
34
34
|
error: null,
|
35
35
|
});
|
36
36
|
|
37
37
|
// Methods
|
38
38
|
const actions = {
|
39
|
-
async readOne(
|
39
|
+
async readOne(spotID) {
|
40
40
|
await $axios
|
41
|
-
.get(`/api/
|
41
|
+
.get(`/api/spots/get/${spotID}`)
|
42
42
|
.then(response => {
|
43
|
-
state.
|
43
|
+
state.spot = response.data;
|
44
44
|
state.error = null;
|
45
45
|
})
|
46
46
|
.catch(error => {
|
@@ -49,30 +49,30 @@ const actions = {
|
|
49
49
|
},
|
50
50
|
async read(organizationId) {
|
51
51
|
await $axios
|
52
|
-
.get(`/api/
|
52
|
+
.get(`/api/spots/${organizationId}`)
|
53
53
|
.then(response => {
|
54
54
|
console.log('Response:', response);
|
55
|
-
state.
|
55
|
+
state.spots = response.data;
|
56
56
|
state.error = null;
|
57
57
|
})
|
58
58
|
.catch(error => {
|
59
59
|
setError(error)
|
60
60
|
});
|
61
61
|
},
|
62
|
-
async create(organizationId,
|
62
|
+
async create(organizationId, spot) {
|
63
63
|
await $axios
|
64
|
-
.post(`/api/
|
64
|
+
.post(`/api/spots/${organizationId}/create`, spot)
|
65
65
|
.then(response => {
|
66
66
|
state.error = null;
|
67
|
-
state.
|
67
|
+
state.spot = response.data;
|
68
68
|
})
|
69
69
|
.catch(error => {
|
70
70
|
setError(error)
|
71
71
|
});
|
72
72
|
},
|
73
|
-
async update(organizationId,
|
73
|
+
async update(organizationId, spot) {
|
74
74
|
await $axios
|
75
|
-
.post(`/api/
|
75
|
+
.post(`/api/spots/${organizationId}/update`, spot)
|
76
76
|
.then(() => {
|
77
77
|
state.error = null;
|
78
78
|
})
|
@@ -80,9 +80,9 @@ const actions = {
|
|
80
80
|
setError(error)
|
81
81
|
});
|
82
82
|
},
|
83
|
-
async delete(organizationId,
|
83
|
+
async delete(organizationId, spotId) {
|
84
84
|
await $axios
|
85
|
-
.delete(`/api/
|
85
|
+
.delete(`/api/spots/${organizationId}/delete`, { data: { _id: spotId } })
|
86
86
|
.then(() => {
|
87
87
|
state.error = null;
|
88
88
|
})
|
@@ -154,7 +154,7 @@
|
|
154
154
|
|
155
155
|
<Menu
|
156
156
|
v-if="(auth.state.access.roles && auth.state.user._id === route.params._id) && (auth.state.access.roles.includes('ROLE_MODERATOR') || auth.state.access.roles.includes('ROLE_ADMIN'))"
|
157
|
-
class="bg-black t-white"
|
157
|
+
class="mn-regular bg-black t-white"
|
158
158
|
>
|
159
159
|
<MenuItem
|
160
160
|
@click="router.push({
|
@@ -172,7 +172,7 @@
|
|
172
172
|
</MenuItem>
|
173
173
|
</Menu>
|
174
174
|
|
175
|
-
<Menu class="bg-grey">
|
175
|
+
<Menu class="mn-regular bg-grey">
|
176
176
|
<MenuItem @click="router.push({name: 'User Events', params: {_id: route.params._id}})" class="cursor-pointer">
|
177
177
|
<IconEvents class="i-semi" :icon="true"/>
|
178
178
|
<span>Events</span>
|
@@ -251,7 +251,6 @@ import Dropdown from "@pf/src/components/Dropdown/Dropdown.vue";
|
|
251
251
|
import Menu from '@pf/src/modules/mobile/components/Menu/Menu.vue'
|
252
252
|
import MenuItem from '@pf/src/modules/mobile/components/Menu/MenuItem.vue'
|
253
253
|
// Org Module
|
254
|
-
import ButtonFollow from '@pf/src/modules/organizations/components/elements/ButtonFollow.vue'
|
255
254
|
import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'
|
256
255
|
// Report Module
|
257
256
|
import FormReport from '@pf/src/modules/reports/components/sections/FormReport.vue'
|
@@ -1,157 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<!-- Toolbar -->
|
3
|
-
<section class="br-bot-dark bg-white pd-big">
|
4
|
-
<header class="flex-nojustify flex-bottom flex-nowrap flex">
|
5
|
-
<h1 v-if="!route.params._id" class="mn-r-small">
|
6
|
-
Изменить остатки
|
7
|
-
</h1>
|
8
|
-
|
9
|
-
<h1 v-if="route.params._id" class="mn-r-small">
|
10
|
-
Изменить
|
11
|
-
<!-- {{leftover.type}} -->
|
12
|
-
<span v-if="leftover.type === 'loss'">списание</span>
|
13
|
-
<span v-if="leftover.type === 'inventory'">инвентаризацию</span>
|
14
|
-
</h1>
|
15
|
-
</header>
|
16
|
-
</section>
|
17
|
-
|
18
|
-
|
19
|
-
<section class="br-bot-dark bg-grey pd-big">
|
20
|
-
|
21
|
-
<div v-if="!route.params._id" class="mn-small flex-wrap block">
|
22
|
-
<InputSelect :obj="'leftovers'" :prop="'current.type'" :value="leftover.type" label="Выберите тип">
|
23
|
-
<option value="loss">Списание</option>
|
24
|
-
<option value="inventory">Остаток</option>
|
25
|
-
</InputSelect>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<LeftoverPositions :order="leftover" :products="Products" />
|
29
|
-
|
30
|
-
</section>
|
31
|
-
|
32
|
-
<section class="pd-big flex-nojustify flex">
|
33
|
-
<a @click="onSubmit()" class="mn-r-small button">Сохранить</a>
|
34
|
-
<a v-if="route.params._id" @click="onDelete()" class="t-main br-l-dark bg-white button">Удалить</a>
|
35
|
-
</section>
|
36
|
-
</template>
|
37
|
-
|
38
|
-
|
39
|
-
<script setup>
|
40
|
-
import InputText from '@/components/elements/InputText.vue'
|
41
|
-
import InputSelect from '@/components/elements/InputSelect.vue'
|
42
|
-
|
43
|
-
import LeftoverPositions from '@/components/blocks/LeftoverPositions.vue'
|
44
|
-
|
45
|
-
import { computed, onMounted, reactive, toRefs,ref } from 'vue'
|
46
|
-
import { useStore } from 'vuex'
|
47
|
-
import { useRoute,useRouter } from 'vue-router'
|
48
|
-
|
49
|
-
|
50
|
-
const store = useStore()
|
51
|
-
const route = useRoute()
|
52
|
-
const router = useRouter()
|
53
|
-
console.log( route.params._id)
|
54
|
-
|
55
|
-
if (route.params._id) await store.dispatch('leftovers/fetch', route.params._id).then(
|
56
|
-
|
57
|
-
succes => { console.log(succes) },
|
58
|
-
error => {
|
59
|
-
console.log('eror')
|
60
|
-
}
|
61
|
-
)
|
62
|
-
|
63
|
-
if (!route.params._id) store.commit('leftovers/reset')
|
64
|
-
|
65
|
-
await store.dispatch('products/fetchProducts')
|
66
|
-
|
67
|
-
const leftover = computed(() => store.state.leftovers.current)
|
68
|
-
const Products = computed(() => store.state.products.all)
|
69
|
-
|
70
|
-
function onSubmit() {
|
71
|
-
if (route.params._id) {
|
72
|
-
store.dispatch('leftovers/update', store.state.leftovers.current)
|
73
|
-
} else {
|
74
|
-
store.dispatch('leftovers/create', store.state.leftovers.current).then(
|
75
|
-
succes => {
|
76
|
-
router.push({name: 'Leftovers'})
|
77
|
-
},
|
78
|
-
error => {
|
79
|
-
console.log('error')
|
80
|
-
}
|
81
|
-
)
|
82
|
-
}
|
83
|
-
}
|
84
|
-
|
85
|
-
function onDelete() {
|
86
|
-
store.dispatch('leftovers/delete', route.params._id).then(
|
87
|
-
succes => {
|
88
|
-
router.push({name: 'Leftovers'})
|
89
|
-
},
|
90
|
-
error => {
|
91
|
-
console.log('error')
|
92
|
-
}
|
93
|
-
)
|
94
|
-
}
|
95
|
-
|
96
|
-
function productSizes2 (_id) {
|
97
|
-
|
98
|
-
const productData2 = store.state.products.all.find(product => product._id === _id);
|
99
|
-
|
100
|
-
|
101
|
-
// console.log(productData2)
|
102
|
-
const computedProduct = computed(() => store.getters['leftovers/getProductSizes'](productData2))
|
103
|
-
return computedProduct.value
|
104
|
-
}
|
105
|
-
function productColors ({_id,size}) {
|
106
|
-
const productData = store.state.products.all.find(product => product._id === _id);
|
107
|
-
var computedProduct = computed(() => store.getters['leftovers/getProductColors']({productData,size}))
|
108
|
-
return computedProduct.value
|
109
|
-
}
|
110
|
-
|
111
|
-
</script>
|
112
|
-
|
113
|
-
<style lang="scss">
|
114
|
-
|
115
|
-
.round-stat {
|
116
|
-
padding: 1rem;
|
117
|
-
border-radius: 5rem;
|
118
|
-
width: 3rem;
|
119
|
-
height: 3rem;
|
120
|
-
display: flex;
|
121
|
-
justify-content: center;
|
122
|
-
align-items: center;
|
123
|
-
border: 1px solid rgba(0,0,0,0.1);
|
124
|
-
|
125
|
-
&-tab {
|
126
|
-
width: 2rem;
|
127
|
-
height: 2rem;
|
128
|
-
}
|
129
|
-
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
.order-card {
|
134
|
-
border-radius: 0.25rem;
|
135
|
-
overflow: hidden;
|
136
|
-
box-shadow: 0 8px 8px -8px rgb(36 36 36 / 10%);
|
137
|
-
.order-status {
|
138
|
-
color: black;
|
139
|
-
background: #EEF2F6;
|
140
|
-
width: 100%;
|
141
|
-
padding: 0.75rem 1.5rem;
|
142
|
-
margin: 0;
|
143
|
-
}
|
144
|
-
|
145
|
-
.new {
|
146
|
-
color: white;
|
147
|
-
background: #00ff88;
|
148
|
-
}
|
149
|
-
|
150
|
-
.block {
|
151
|
-
border-radius: 0;
|
152
|
-
border: 0;
|
153
|
-
}
|
154
|
-
}
|
155
|
-
|
156
|
-
|
157
|
-
</style>
|
@@ -1,119 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<!-- Toolbar -->
|
3
|
-
<section class="br-bot-dark bg-white pd-big">
|
4
|
-
<header class="flex-nojustify flex-bottom flex-nowrap flex">
|
5
|
-
<h1 class="mn-r-small">Остатки</h1>
|
6
|
-
<router-link :to="'/admin/leftovers/add'" class="i-regular pd-thin button-delete button"><img src="@/assets/icons/plus-white.svg"></router-link>
|
7
|
-
</header>
|
8
|
-
</section>
|
9
|
-
|
10
|
-
<div class="flex-nowrap flex product-tab-header">
|
11
|
-
<button @click="changeTab('all')" :class="{'product-tab-active':data.currentTab === 'all'}"
|
12
|
-
class="br-right-dark w-100 bg-white flex-center pd-semi-big flex">
|
13
|
-
Все
|
14
|
-
</button>
|
15
|
-
<button @click="changeTab('loss')" :class="{'product-tab-active':data.currentTab === 'loss'}"
|
16
|
-
class="br-right-dark w-100 bg-white flex-center pd-semi-big flex">
|
17
|
-
Списания
|
18
|
-
</button>
|
19
|
-
|
20
|
-
<button @click="changeTab('inventory')" :class="{'product-tab-active':data.currentTab === 'inventory'}"
|
21
|
-
class="br-right-dark w-100 bg-white flex-center pd-semi-big flex">
|
22
|
-
Инвертаризация
|
23
|
-
</button>
|
24
|
-
|
25
|
-
</div>
|
26
|
-
|
27
|
-
|
28
|
-
<section class="cols-1 bg-grey pd-big">
|
29
|
-
<!-- Empty State -->
|
30
|
-
<p v-if="leftovers.length === 0">У вас еще нет списаний</p>
|
31
|
-
<!-- Objects -->
|
32
|
-
<Leftover v-for="leftover in leftovers" :leftover="leftover"/>
|
33
|
-
</section>
|
34
|
-
</template>
|
35
|
-
|
36
|
-
|
37
|
-
<script setup>
|
38
|
-
import Leftover from '@/components/blocks/Leftover.vue'
|
39
|
-
|
40
|
-
import { computed, onMounted, reactive, toRefs,ref } from 'vue'
|
41
|
-
import { useStore } from 'vuex'
|
42
|
-
import { useRoute,useRouter } from 'vue-router'
|
43
|
-
|
44
|
-
|
45
|
-
const store = useStore()
|
46
|
-
const route = useRoute()
|
47
|
-
const router = useRouter()
|
48
|
-
|
49
|
-
await store.dispatch('leftovers/fetchAll').then(
|
50
|
-
succes => { console.log('sycces') },
|
51
|
-
error => {
|
52
|
-
console.log('eror')
|
53
|
-
}
|
54
|
-
)
|
55
|
-
|
56
|
-
let data = reactive({currentTab: 'all'})
|
57
|
-
|
58
|
-
const leftovers = computed(() => {
|
59
|
-
if (data.currentTab === 'all') {
|
60
|
-
return store.state.leftovers.all
|
61
|
-
} else {
|
62
|
-
|
63
|
-
const filtered = store.state.leftovers.all.filter(function(leftover, index) {
|
64
|
-
if (leftover.type === data.currentTab) return true;
|
65
|
-
})
|
66
|
-
|
67
|
-
return filtered
|
68
|
-
}
|
69
|
-
|
70
|
-
})
|
71
|
-
|
72
|
-
function changeTab (tab) {data.currentTab = tab; console.log(data.currentTab) }
|
73
|
-
</script>
|
74
|
-
|
75
|
-
<style lang="scss">
|
76
|
-
|
77
|
-
.round-stat {
|
78
|
-
padding: 1rem;
|
79
|
-
border-radius: 5rem;
|
80
|
-
width: 3rem;
|
81
|
-
height: 3rem;
|
82
|
-
display: flex;
|
83
|
-
justify-content: center;
|
84
|
-
align-items: center;
|
85
|
-
border: 1px solid rgba(0,0,0,0.1);
|
86
|
-
|
87
|
-
&-tab {
|
88
|
-
width: 2rem;
|
89
|
-
height: 2rem;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
.order-card {
|
96
|
-
border-radius: 0.25rem;
|
97
|
-
overflow: hidden;
|
98
|
-
box-shadow: 0 8px 8px -8px rgb(36 36 36 / 10%);
|
99
|
-
.order-status {
|
100
|
-
color: black;
|
101
|
-
background: #EEF2F6;
|
102
|
-
width: 100%;
|
103
|
-
padding: 0.75rem 1.5rem;
|
104
|
-
margin: 0;
|
105
|
-
}
|
106
|
-
|
107
|
-
.new {
|
108
|
-
color: white;
|
109
|
-
background: #00ff88;
|
110
|
-
}
|
111
|
-
|
112
|
-
.block {
|
113
|
-
border-radius: 0;
|
114
|
-
border: 0;
|
115
|
-
}
|
116
|
-
}
|
117
|
-
|
118
|
-
|
119
|
-
</style>
|
@@ -1,199 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<section class="br-bot-dark bg-white pd-big">
|
3
|
-
<header class="flex-nojustify flex-bottom flex-nowrap flex">
|
4
|
-
<h1 class="mn-r-small">Заказ #{{order._id.slice(0,8)}}</h1>
|
5
|
-
<TestButton></TestButton>
|
6
|
-
</header>
|
7
|
-
</section>
|
8
|
-
|
9
|
-
<section class="flex-nowrap flex br-bot-dark bg-white ">
|
10
|
-
|
11
|
-
<div class="br-right-dark w-100 flex pd-big">
|
12
|
-
<p class="p-big">
|
13
|
-
<span class="t-transp">Статус заказа:</span><br>{{order.status}}
|
14
|
-
|
15
|
-
|
16
|
-
</p>
|
17
|
-
<button v-if="order.status ==='Создан'" @click="confirmOrder('Подтвержден','status')" class="button">Подтвердить заказ</button>
|
18
|
-
<button v-if="order.status ==='Подтвержден'" @click="confirmOrder('Создан','status')" class="button">Отменить подтверждение</button>
|
19
|
-
<button v-if="order.status ==='Ожидает отправки'" @click="confirmOrder('Отправлен','status')" class="button">Заказ отправлен</button>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<div class="w-100 br-right-dark flex pd-big">
|
23
|
-
<p class="p-big">Статус оплаты:
|
24
|
-
<br>
|
25
|
-
<span class="t-transp" v-if="payment && order.payment.type === 'Онлайн' ">{{payment.Status}}</span>
|
26
|
-
<span class="t-transp" v-if="!payment && order.payment.type === 'Онлайн' ">Не оплачено</span>
|
27
|
-
<span class="t-transp" v-if=" order.payment.type !== 'Онлайн' ">{{order.payment.status}}</span>
|
28
|
-
|
29
|
-
|
30
|
-
</p>
|
31
|
-
<button v-if="order.payment.status !=='Оплачено' && order.payment.type !== 'Онлайн' " @click="confirmOrder({status: 'Оплачено'},'payment')" class="button">Изменить статус оплаты</button>
|
32
|
-
<button v-if="order.payment.status ==='Оплачено' && order.payment.type !== 'Онлайн'" @click="confirmOrder({status: 'Неоплачено'},'payment')" class="button">Отменить оплату</button>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
|
36
|
-
</section>
|
37
|
-
|
38
|
-
|
39
|
-
<section class="bg-grey flex-nowrap flex">
|
40
|
-
<section class="br-right-dark bg-grey br-bot-dark pd-big w-50">
|
41
|
-
|
42
|
-
<h5 class="w-100 mn-small">Информация о заказе</h5>
|
43
|
-
<div class="mn-medium ">
|
44
|
-
<!-- <p class="w-100">Время создания: {{DateToFormattedString(order.createdAt)}}</p> -->
|
45
|
-
<div class="mn-small flex-column flex block">
|
46
|
-
<InputText :obj="'orders'" :prop="'current.phone'" :value="order.phone" label="Телефон"/>
|
47
|
-
<InputText :obj="'orders'" :prop="'current.info.email'" :value="order.info.email" label="Email"/>
|
48
|
-
<div class=" w-100 flex-nowrap flex">
|
49
|
-
<InputText class="mn-r-small" :obj="'orders'" :prop="'current.info.name'" :value="order.info.name" label="Имя"/>
|
50
|
-
<InputText :obj="'orders'" :prop="'current.info.surname'" :value="order.info.surname" label="Фамилия"/>
|
51
|
-
</div>
|
52
|
-
</div>
|
53
|
-
|
54
|
-
<div class="col flex-column flex block">
|
55
|
-
<div class=" w-100 flex-nowrap flex">
|
56
|
-
<InputText :obj="'orders'" :prop="'current.info.city'" :value="order.info.city" label="Город"/>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
|
60
|
-
<InputText :obj="'orders'" :prop="'current.info.adress'" :value="order.info.adress" label="Адрес"/>
|
61
|
-
<InputSelect :obj="'orders'" :prop="'current.info.delivery'" :value="order.info.delivery" label="Выберите тип доставки">
|
62
|
-
<option v-if="order.info.city === 'Москва'" value="Самовывоз">Самовывоз</option>
|
63
|
-
<option v-if="order.info.city === 'Москва'" value="Курьером">Курьером</option>
|
64
|
-
<option v-if="order.info.city !== 'Москва'" value="Почтой">Почтой</option>
|
65
|
-
</InputSelect>
|
66
|
-
|
67
|
-
<InputSelect :obj="'orders'" :prop="'current.payment.type'" :value="order.payment.type" label="Выберите тип оплаты">
|
68
|
-
<option v-if="order.info.delivery === 'Курьером' || order.info.delivery === 'Самовывоз'" value="Наличные" :selected="order.payment.type === 'Наличные'">Наличные</option>
|
69
|
-
<option v-if="order.info.delivery === 'Курьером'" value="Курьеру картой" :selected="order.payment.type === 'Курьеру картой'">Курьеру картой</option>
|
70
|
-
<option value="Онлайн" :selected="order.payment.type === 'Онлайн'">Онлайн</option>
|
71
|
-
</InputSelect>
|
72
|
-
</div>
|
73
|
-
|
74
|
-
|
75
|
-
</div>
|
76
|
-
<div class="mn-medium block">
|
77
|
-
<p class="w-100">
|
78
|
-
Комментарий: {{order.info.comment}}
|
79
|
-
</p>
|
80
|
-
</div>
|
81
|
-
<button @click="confirmOrder('Отправлен','status')" class="button">Обновить заказ</button>
|
82
|
-
</section>
|
83
|
-
|
84
|
-
<section class="bg-navy w-50 br-bot-dark pd-big">
|
85
|
-
|
86
|
-
<Positions :order="order" :products="Products" />
|
87
|
-
|
88
|
-
|
89
|
-
</section>
|
90
|
-
</section>
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<!-- <section class="flex-nowrap flex br-bot-dark">
|
96
|
-
|
97
|
-
<div class="br-right-dark w-100 section-subsection section">
|
98
|
-
<p class="mn-semi p-big">Сумма к оплате:
|
99
|
-
<span v-if="order.info.delivery === 'Самовывоз'" class="p-big t-semi">{{ orderTotalPrice / 100 }} ₽</span>
|
100
|
-
<span v-if="order.info.delivery === 'Курьером'" class="p-big t-semi">{{ orderTotalPrice / 100 + 350 }} ₽</span>
|
101
|
-
<span v-if="order.info.delivery === 'Почтой'" class="p-big t-semi">{{ orderTotalPrice / 100 + 550 }} ₽</span>
|
102
|
-
({{orderTotalPrice}} +
|
103
|
-
<span v-if="order.info.delivery === 'Самовывоз'" >0</span>
|
104
|
-
<span v-if="order.info.delivery === 'Курьером'" >350</span>
|
105
|
-
<span v-if="order.info.delivery === 'Почтой'">550</span>
|
106
|
-
₽)
|
107
|
-
</p>
|
108
|
-
|
109
|
-
<button class="button">Запросить онлайн</button>
|
110
|
-
</div>
|
111
|
-
<div class="w-100 section-subsection section">
|
112
|
-
<p class="mn-semi p-big">Статус оплаты: {{order.payment.status}}</p>
|
113
|
-
<button class="button">Изменить статус оплаты</button>
|
114
|
-
</div>
|
115
|
-
</section> -->
|
116
|
-
|
117
|
-
|
118
|
-
</template>
|
119
|
-
|
120
|
-
<script setup="props">
|
121
|
-
// GLOBAL
|
122
|
-
import InputText from '@/components/elements/InputText.vue'
|
123
|
-
import InputSelect from '@/components/elements/InputSelect.vue'
|
124
|
-
// BLOCKS
|
125
|
-
import Positions from '@/components/blocks/Positions.vue'
|
126
|
-
// fport libs
|
127
|
-
import { computed, ref, onMounted,onBeforeUpdate, reactive, toRefs } from 'vue'
|
128
|
-
import { useStore } from 'vuex'
|
129
|
-
import { useRoute } from 'vue-router'
|
130
|
-
// Import components
|
131
|
-
// Accessing router and store
|
132
|
-
const store = useStore()
|
133
|
-
const route = useRoute()
|
134
|
-
// On Mounted
|
135
|
-
// onMounted(() => {
|
136
|
-
|
137
|
-
// store.dispatch('payment/getStatus', route.params)
|
138
|
-
// store.dispatch('rent/getStatus', route.params).then(() => {
|
139
|
-
// if ((store.state.rent.current.Status === 'Начата') && !(store.state.rent.current.Status === 'Закрыта'))
|
140
|
-
// setTimer(getYourTime())
|
141
|
-
// })
|
142
|
-
|
143
|
-
// })
|
144
|
-
|
145
|
-
// Data prefetching
|
146
|
-
await store.dispatch('products/fetchProductsPublished')
|
147
|
-
await store.dispatch('orders/fetchOrder', route.params._id).then(
|
148
|
-
succes => {
|
149
|
-
console.log('succes order')
|
150
|
-
store.dispatch('payments/getStatus', route.params._id)
|
151
|
-
},
|
152
|
-
error => {
|
153
|
-
console.log('eror')
|
154
|
-
}
|
155
|
-
)
|
156
|
-
// Accessing state
|
157
|
-
const order = computed(() => store.state.orders.current)
|
158
|
-
const Products = computed(() => store.state.products.all)
|
159
|
-
|
160
|
-
|
161
|
-
const props = defineProps(['showProduct'])
|
162
|
-
props.showProduct = [];
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
const payment = computed(() => store.state.payments.current)
|
167
|
-
|
168
|
-
function confirmOrder(status, prop) {
|
169
|
-
// alert(status)
|
170
|
-
if (status === 'Подтвержден') {
|
171
|
-
store.dispatch('leftovers/create', {type: 'loss', order: route.params._id, positions: store.state.orders.current.items} )
|
172
|
-
}
|
173
|
-
|
174
|
-
if (status === 'Создан') {
|
175
|
-
store.dispatch('leftovers/delete', route.params._id)
|
176
|
-
}
|
177
|
-
|
178
|
-
store.dispatch('orders/confirmOrder', {_id: route.params._id, status: status, prop: prop} )
|
179
|
-
}
|
180
|
-
|
181
|
-
function changePaymentStatus() {
|
182
|
-
store.dispatch('orders/changePaymentStatus', route.params._id)
|
183
|
-
}
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
</script>
|
188
|
-
|
189
|
-
<style lang="scss">
|
190
|
-
|
191
|
-
.vue-select {
|
192
|
-
width: inherit;
|
193
|
-
|
194
|
-
margin-right: 1rem;
|
195
|
-
}
|
196
|
-
.vue-select-header {
|
197
|
-
height: 3rem;
|
198
|
-
}
|
199
|
-
</style>
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<section class="section">
|
3
|
-
<h1>{{product.name}}</h1>
|
4
|
-
<p>{{product.description}}</p>
|
5
|
-
<p>{{product.price}} рублей</p>
|
6
|
-
<button @click="test()">test</button>
|
7
|
-
<button @click="test()" class="button">Редактировать</button>
|
8
|
-
</section>
|
9
|
-
</template>
|
10
|
-
|
11
|
-
<script setup>
|
12
|
-
// Import libs
|
13
|
-
import { computed, onMounted } from 'vue'
|
14
|
-
import { useStore } from 'vuex'
|
15
|
-
import { useRoute } from 'vue-router'
|
16
|
-
// Import components
|
17
|
-
// Accessing router and store
|
18
|
-
const store = useStore()
|
19
|
-
const route = useRoute()
|
20
|
-
// Data prefetching
|
21
|
-
await store.dispatch('fetchProduct', route.params._id)
|
22
|
-
// Accessing state
|
23
|
-
const product = computed(() => store.state.product)
|
24
|
-
</script>
|
25
|
-
|
26
|
-
<style lang="scss">
|
27
|
-
|
28
|
-
</style>
|