@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
@@ -0,0 +1,319 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="for-transition w-100">
|
3
|
+
|
4
|
+
<div class="pd-b-zero pd-t-zero pd-thin">
|
5
|
+
<Breadcrumbs class="pd-medium bg-grey radius-big"/>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="pd-thin">
|
9
|
+
<header class="flex-nowrap flex bg-grey pd-medium radius-big">
|
10
|
+
<h1 v-if="route.params.spot" class="mn-r-auto">Edit Spot</h1>
|
11
|
+
<h1 v-else class="mn-r-auto">Create Spot</h1>
|
12
|
+
|
13
|
+
<section class="flex-nowrap flex pd-thin">
|
14
|
+
<Button :submit="onSubmit" :callback="redirectTo">Save Spot</Button>
|
15
|
+
</section>
|
16
|
+
|
17
|
+
</header>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="pd-b-zero pd-t-zero pd-thin cols-2 gap-thin">
|
21
|
+
|
22
|
+
<div class="flex-stretch flex-column flex">
|
23
|
+
|
24
|
+
<div class="mn-thin bg-grey pd-medium o-hidden radius-big">
|
25
|
+
<h3 class="mn-semi">Profile</h3>
|
26
|
+
|
27
|
+
<div class="radius-small flex-nowrap flex">
|
28
|
+
<UploadImage
|
29
|
+
v-model:photo="spots.state.spot.profile.photo"
|
30
|
+
:uploadPath="'organizations/' + spots.state.spot.name + '/avatars'"
|
31
|
+
class="w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
|
32
|
+
/>
|
33
|
+
<div class="w-100 flex-child-grow-1 flex-child ">
|
34
|
+
<Field
|
35
|
+
v-model:field="spots.state.spot.profile.name"
|
36
|
+
label="Name"
|
37
|
+
placeholder="Spot Name"
|
38
|
+
class="mn-small bg-white radius-small pd-medium"
|
39
|
+
:validation="organizationName"
|
40
|
+
/>
|
41
|
+
<Field
|
42
|
+
v-model:field="spots.state.spot.profile.description"
|
43
|
+
label="Description"
|
44
|
+
placeholder="Spot description (max 120 symbols)"
|
45
|
+
class="bg-white radius-small pd-medium"
|
46
|
+
:validation="organizationName"
|
47
|
+
/>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div class="bg-grey pd-medium o-hidden radius-big">
|
53
|
+
<h3 class="mn-semi">Details</h3>
|
54
|
+
|
55
|
+
<p class="p-medium mn-small">Please the available delivery options:</p>
|
56
|
+
<div class="mn-medium flex-nowrap flex">
|
57
|
+
<Checkbox
|
58
|
+
label="Pickup"
|
59
|
+
name="Delivery"
|
60
|
+
value="pickup"
|
61
|
+
class="w-100 mn-r-small bg-white radius-small pd-small"
|
62
|
+
:radio="spots.state.spot.delivery"
|
63
|
+
/>
|
64
|
+
<Checkbox
|
65
|
+
label="Delivery"
|
66
|
+
name="Delivery"
|
67
|
+
value="courier"
|
68
|
+
class="w-100 mn-r-small bg-white radius-small pd-small"
|
69
|
+
:radio="spots.state.spot.delivery"
|
70
|
+
/>
|
71
|
+
<Checkbox
|
72
|
+
label="Post"
|
73
|
+
name="Delivery"
|
74
|
+
value="post"
|
75
|
+
class="w-100 bg-white radius-small pd-small"
|
76
|
+
:radio="spots.state.spot.delivery"
|
77
|
+
/>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
<p class="p-medium mn-small">Please select the available payment methods:</p>
|
81
|
+
<div class="flex-nowrap flex">
|
82
|
+
<Checkbox
|
83
|
+
label="Cash"
|
84
|
+
name="Payment"
|
85
|
+
value="cash"
|
86
|
+
class="w-100 mn-r-small bg-white radius-small pd-small"
|
87
|
+
:radio="spots.state.spot.payment"
|
88
|
+
/>
|
89
|
+
<Checkbox
|
90
|
+
label="Bank Transfer"
|
91
|
+
name="Payment"
|
92
|
+
value="bank"
|
93
|
+
class="w-100 mn-r-small bg-white radius-small pd-small"
|
94
|
+
:radio="spots.state.spot.payment"
|
95
|
+
/>
|
96
|
+
<Checkbox
|
97
|
+
label="Crypto"
|
98
|
+
name="Payment"
|
99
|
+
value="crypto"
|
100
|
+
class="w-100 bg-white radius-small pd-small"
|
101
|
+
:radio="spots.state.spot.payment"
|
102
|
+
/>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div class="bg-grey pd-medium o-hidden radius-big">
|
108
|
+
<h3 class="mn-semi">Location</h3>
|
109
|
+
<Address
|
110
|
+
:apiKey="GOOGLE_MAPS_API_KEY"
|
111
|
+
:address="spots.state.spot.address"
|
112
|
+
:location="spots.state.spot.location"
|
113
|
+
label="Address"
|
114
|
+
placeholder="Enter delivery address"
|
115
|
+
class="
|
116
|
+
bg-white radius-small pd-small mn-small
|
117
|
+
"
|
118
|
+
@update:location="newLocation => {
|
119
|
+
spots.state.spot.location = newLocation;
|
120
|
+
}"
|
121
|
+
@update:address="newAddress => {
|
122
|
+
spots.state.spot.address = newAddress;
|
123
|
+
}"
|
124
|
+
/>
|
125
|
+
|
126
|
+
<p class="mn-small p-medium">Or choose on map:</p>
|
127
|
+
|
128
|
+
<LocationMarker
|
129
|
+
:address="spots.state.spot.address"
|
130
|
+
:location="spots.state.spot.location"
|
131
|
+
:apiKey="GOOGLE_MAPS_API_KEY"
|
132
|
+
class="radius-big o-hidden"
|
133
|
+
@update:location="newLocation => {
|
134
|
+
spots.state.spot.location = newLocation;
|
135
|
+
}"
|
136
|
+
@update:address="newAddress => {
|
137
|
+
spots.state.spot.address = newAddress;
|
138
|
+
}"
|
139
|
+
/>
|
140
|
+
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
<section class="flex-nowrap flex pd-thin">
|
145
|
+
<Button :submit="onDelete" :callback="redirectToDash" class="bg-grey">Delete Spot</Button>
|
146
|
+
</section>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<!-- <div id="dash" class="pd-medium bg-white">
|
151
|
+
|
152
|
+
|
153
|
+
<div class="mn-regular flex-v-center flex-nowrap flex">
|
154
|
+
<h3 class="mn-r-small">Команда</h3>
|
155
|
+
<div>
|
156
|
+
<a class="t-main h5" @click="openMemberPopup()">+</a>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
<Popup title="Добавить участника" @close-popup="closeMemberPopup" :isPopupOpen="isOpenAddMemberPopup">
|
161
|
+
<SpotMemberModify
|
162
|
+
:members="spots.state.spot.members"
|
163
|
+
:member="selectedMember"
|
164
|
+
:users="users"
|
165
|
+
@callback="closeMemberPopup"
|
166
|
+
/>
|
167
|
+
</Popup>
|
168
|
+
|
169
|
+
|
170
|
+
<ul class=mn-small>
|
171
|
+
<li v-if="spots.state.spot.members.length < 1">В отделе еще нет участников</li>
|
172
|
+
<User
|
173
|
+
class="bg-grey o-hidden radius-small mn-thin"
|
174
|
+
v-for="(member, index) in spots.state.spot.members"
|
175
|
+
:key="index"
|
176
|
+
:user="member.user"
|
177
|
+
:position="member.position"
|
178
|
+
@click="openMemberPopup(index)"
|
179
|
+
/>
|
180
|
+
</ul>
|
181
|
+
|
182
|
+
|
183
|
+
<Popup title="Добавить подотдел" @close-popup="closeSpotPopup" :isPopupOpen="isOpenSpotPopup">
|
184
|
+
<SpotSubSpotModify
|
185
|
+
:spots="spots.state.spot.subspots"
|
186
|
+
:spot="selectedSpot"
|
187
|
+
:mainspot="spots.state.spot"
|
188
|
+
:allspots="spots.state.spots"
|
189
|
+
@callback="closeSpotPopup"
|
190
|
+
/>
|
191
|
+
</Popup>
|
192
|
+
|
193
|
+
<div class="mn-regular flex-v-center flex-nowrap flex">
|
194
|
+
<h3 class="mn-r-small">Подотделы </h3>
|
195
|
+
<div>
|
196
|
+
<a class="t-main h5" @click="openSpotPopup()">+</a>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
<ul class="mn-small">
|
201
|
+
<li v-if="spots.state.spot.subspots.length < 1">В отделе еще нет подотделов</li>
|
202
|
+
<SpotSub
|
203
|
+
v-for="(subspot, index) in spots.state.spot.subspots"
|
204
|
+
:key="index" class="bg-grey o-hidden radius-small mn-thin"
|
205
|
+
:spot="subspot"
|
206
|
+
@click="openSpotPopup(index)"
|
207
|
+
/>
|
208
|
+
</ul>
|
209
|
+
|
210
|
+
|
211
|
+
</div> -->
|
212
|
+
</div>
|
213
|
+
</template>
|
214
|
+
|
215
|
+
<script setup>
|
216
|
+
import { ref } from "vue";
|
217
|
+
import { useRoute, useRouter } from "vue-router";
|
218
|
+
import Cookies from "js-cookie";
|
219
|
+
import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'
|
220
|
+
import UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';
|
221
|
+
|
222
|
+
|
223
|
+
import Tab from "@pf/src/components/Tab/Tab.vue";
|
224
|
+
import Field from "@pf/src/components/Field/Field.vue";
|
225
|
+
import Select from "@pf/src/components/Select/Select.vue";
|
226
|
+
import Checkbox from "@pf/src/components/Checkbox/Checkbox.vue";
|
227
|
+
import Address from "@pf/src/components/Address/Address.vue";
|
228
|
+
import LocationMarker from "@pf/src/components/LocationMarker/LocationMarker.vue";
|
229
|
+
import Button from "@pf/src/components/Button/Button.vue";
|
230
|
+
import Popup from "@pf/src/components/Popup/Popup.vue";
|
231
|
+
|
232
|
+
import EditArray from "@pf/src/modules/organizations/components/blocks/EditArray.vue";
|
233
|
+
import SpotSub from "@pf/src/modules/spots/components/blocks/SpotSub.vue";
|
234
|
+
import SpotMemberModify from "@pf/src/modules/spots/components/blocks/SpotMemberModify.vue";
|
235
|
+
// import SpotSubSpotModify from "@pf/src/modules/spots/components/blocks/SpotSubSpotModify.vue";
|
236
|
+
import User from '@pf/src/modules/organizations/components/blocks/User.vue';
|
237
|
+
|
238
|
+
import * as spots from "@pf/src/modules/spots/store/spots";
|
239
|
+
import * as memberships from "@pf/src/modules/organizations/store/memberships";
|
240
|
+
|
241
|
+
const router = useRouter();
|
242
|
+
const route = useRoute();
|
243
|
+
const tabOrganization = ref("details");
|
244
|
+
const showAddNew = ref(false);
|
245
|
+
|
246
|
+
async function fetchData() {
|
247
|
+
if (route.params.spot) {
|
248
|
+
await memberships.actions.read(route.params.spot);
|
249
|
+
}
|
250
|
+
const users = ref(memberships.state.memberships);
|
251
|
+
|
252
|
+
await spots.actions.read(route.params._id);
|
253
|
+
if (route.params.spot) await spots.actions.readOne(route.params.spot);
|
254
|
+
}
|
255
|
+
|
256
|
+
fetchData();
|
257
|
+
|
258
|
+
const members = ref(spots.state.spot.members);
|
259
|
+
|
260
|
+
const isOpenAddMemberPopup = ref(false);
|
261
|
+
const selectedMember = ref(null);
|
262
|
+
|
263
|
+
function openMemberPopup(member) {
|
264
|
+
isOpenAddMemberPopup.value = true;
|
265
|
+
if (typeof member === "number") selectedMember.value = member;
|
266
|
+
}
|
267
|
+
|
268
|
+
function closeMemberPopup() {
|
269
|
+
isOpenAddMemberPopup.value = false;
|
270
|
+
selectedMember.value = null;
|
271
|
+
}
|
272
|
+
|
273
|
+
const isOpenSpotPopup = ref(false);
|
274
|
+
const selectedSpot = ref(null);
|
275
|
+
|
276
|
+
function openSpotPopup(spot) {
|
277
|
+
isOpenSpotPopup.value = true;
|
278
|
+
if (typeof spot === "number") selectedSpot.value = spot;
|
279
|
+
}
|
280
|
+
|
281
|
+
function closeSpotPopup() {
|
282
|
+
isOpenSpotPopup.value = false;
|
283
|
+
selectedSpot.value = null;
|
284
|
+
}
|
285
|
+
|
286
|
+
async function onSubmit() {
|
287
|
+
if (route.params.spot) {
|
288
|
+
await spots.actions.update(
|
289
|
+
route.params._id,
|
290
|
+
spots.state.spot
|
291
|
+
);
|
292
|
+
}
|
293
|
+
if (!route.params.spot) {
|
294
|
+
await spots.actions.create(
|
295
|
+
route.params._id,
|
296
|
+
spots.state.spot
|
297
|
+
);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
|
301
|
+
function redirectTo() {
|
302
|
+
router.replace({ name: "Spot", params: { _id: route.params._id, spot: spots.state.spot._id } });
|
303
|
+
}
|
304
|
+
|
305
|
+
async function onDelete() {
|
306
|
+
await spots.actions.delete(
|
307
|
+
route.params._id,
|
308
|
+
spots.state.spot
|
309
|
+
);
|
310
|
+
}
|
311
|
+
|
312
|
+
function redirectDash() {
|
313
|
+
router.replace({ name: "Organization" });
|
314
|
+
}
|
315
|
+
</script>
|
316
|
+
|
317
|
+
<style scoped>
|
318
|
+
@import "vue-select/dist/vue-select.css";
|
319
|
+
</style>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<template>
|
2
|
+
<transition name="slide-fade">
|
3
|
+
<div>
|
4
|
+
<EmptyState
|
5
|
+
v-if="FirstLevelSpots.length < 1"
|
6
|
+
title="You don't have any spots yet."
|
7
|
+
description="Add spots to your hub."
|
8
|
+
action="Add spot"
|
9
|
+
:callback="() => $router.push(`/spots/${props.organization._id}/spots/create`)"
|
10
|
+
/>
|
11
|
+
|
12
|
+
<div>
|
13
|
+
<CardSpot
|
14
|
+
v-for="(spot, index) in FirstLevelSpots"
|
15
|
+
:key="index"
|
16
|
+
:spot="spot"
|
17
|
+
:organization="organization"
|
18
|
+
class="radius-big bg-grey mn-thin"
|
19
|
+
/>
|
20
|
+
<button
|
21
|
+
v-if="FirstLevelSpots.length > 0 && auth.state.user._id === organization.owner"
|
22
|
+
@click="$router.push(`/spots/${props.organization._id}/spots/create`)"
|
23
|
+
class="mn-thin button w-100"
|
24
|
+
>
|
25
|
+
Add spot
|
26
|
+
</button>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</transition>
|
30
|
+
</template>
|
31
|
+
|
32
|
+
<script setup>
|
33
|
+
import { ref, computed } from 'vue';
|
34
|
+
import Tab from '@pf/src/components/Tab/Tab.vue';
|
35
|
+
import EmptyState from '@pf/src/modules/organizations/components/blocks/EmptyState.vue';
|
36
|
+
import CardSpot from '@pf/src/modules/spots/components/blocks/CardSpot.vue';
|
37
|
+
import { state as spotState, actions as spotActions } from '@pf/src/modules/spots/store/spots';
|
38
|
+
import * as auth from '@pf/src/modules/auth/store/auth'
|
39
|
+
|
40
|
+
const props = defineProps({
|
41
|
+
organization: Object,
|
42
|
+
units: Array,
|
43
|
+
memberships: Array
|
44
|
+
});
|
45
|
+
|
46
|
+
const tabStructure = ref('spots');
|
47
|
+
|
48
|
+
await spotActions.read(props.organization._id);
|
49
|
+
|
50
|
+
const FirstLevelSpots = computed(() => {
|
51
|
+
const spots = spotState.spots;
|
52
|
+
|
53
|
+
const subspotIds = spots.flatMap(spot =>
|
54
|
+
spot.subspots.map(subspot => subspot._id)
|
55
|
+
);
|
56
|
+
|
57
|
+
return spots.filter(spot =>
|
58
|
+
!subspotIds.includes(spot._id)
|
59
|
+
);
|
60
|
+
});
|
61
|
+
</script>
|
62
|
+
|
63
|
+
<style scoped>
|
64
|
+
</style>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
const controllerFactory = (db) => {
|
2
|
+
const Spot = db.spot;
|
3
|
+
|
4
|
+
const readOne = (req, res) => {
|
5
|
+
Spot.findOne({_id: req.params._id})
|
6
|
+
.populate('members.user')
|
7
|
+
.populate('subspots')
|
8
|
+
.then(spot => {
|
9
|
+
if (!spot) {
|
10
|
+
return res.status(404).send({ message: "Отдел не найден" });
|
11
|
+
}
|
12
|
+
res.send(spot);
|
13
|
+
})
|
14
|
+
.catch(err => {
|
15
|
+
res.status(500).send({ message: err.message });
|
16
|
+
});
|
17
|
+
};
|
18
|
+
|
19
|
+
const read = (req, res) => {
|
20
|
+
Spot.find({ organization: req.params._id })
|
21
|
+
.populate('members.user')
|
22
|
+
.populate('subspots')
|
23
|
+
.then(spots => {
|
24
|
+
if (!spots) {
|
25
|
+
return res.status(404).send({ message: "Spots not found" });
|
26
|
+
}
|
27
|
+
res.send(spots);
|
28
|
+
})
|
29
|
+
.catch(err => {
|
30
|
+
res.status(500).send({ message: err.message });
|
31
|
+
});
|
32
|
+
};
|
33
|
+
|
34
|
+
const create = async (req, res) => {
|
35
|
+
try {
|
36
|
+
const newSpot = new Spot({
|
37
|
+
...req.body,
|
38
|
+
organization: req.params._id
|
39
|
+
});
|
40
|
+
|
41
|
+
const data = await newSpot.save();
|
42
|
+
res.send(data);
|
43
|
+
} catch (err) {
|
44
|
+
res.status(500).send({ message: err.message });
|
45
|
+
}
|
46
|
+
};
|
47
|
+
|
48
|
+
const update = (req, res) => {
|
49
|
+
Spot.findOneAndUpdate({ _id: req.body._id}, req.body, { new: true })
|
50
|
+
.then(spot => {
|
51
|
+
if (!spot) {
|
52
|
+
return res.status(404).send({ message: "Spot not found" });
|
53
|
+
}
|
54
|
+
res.send(spot);
|
55
|
+
})
|
56
|
+
.catch(err => {
|
57
|
+
res.status(500).send({ message: err.message });
|
58
|
+
});
|
59
|
+
};
|
60
|
+
|
61
|
+
const deleteSpot = (req, res) => {
|
62
|
+
Spot.findOneAndRemove({ _id: req.body._id, organization: req.params._id })
|
63
|
+
.then(spot => {
|
64
|
+
if (!spot) {
|
65
|
+
return res.status(404).send({ message: "Spot not found" });
|
66
|
+
}
|
67
|
+
res.send({ message: "Spot deleted successfully" });
|
68
|
+
})
|
69
|
+
.catch(err => {
|
70
|
+
res.status(500).send({ message: err.message });
|
71
|
+
});
|
72
|
+
};
|
73
|
+
|
74
|
+
return {
|
75
|
+
readOne,
|
76
|
+
read,
|
77
|
+
create,
|
78
|
+
update,
|
79
|
+
delete: deleteSpot
|
80
|
+
};
|
81
|
+
};
|
82
|
+
|
83
|
+
module.exports = controllerFactory;
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module.exports = (mongoose) => {
|
2
|
+
// Схема отдела
|
3
|
+
const spotSchema = new mongoose.Schema({
|
4
|
+
owner: {
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
6
|
+
ref: 'User',
|
7
|
+
},
|
8
|
+
organization: {
|
9
|
+
type: mongoose.Schema.Types.ObjectId,
|
10
|
+
ref: 'Organization',
|
11
|
+
},
|
12
|
+
profile: {
|
13
|
+
photo: { type: String },
|
14
|
+
name: { type: String, required: true },
|
15
|
+
description: { type: String },
|
16
|
+
categories: [String]
|
17
|
+
},
|
18
|
+
// Working hours
|
19
|
+
address: String,
|
20
|
+
// Position on map
|
21
|
+
location: {
|
22
|
+
lat: Number,
|
23
|
+
lng: Number,
|
24
|
+
type: {
|
25
|
+
type: String,
|
26
|
+
enum: ['Point'], // 'location.type' must be 'Point'
|
27
|
+
required: true
|
28
|
+
},
|
29
|
+
coordinates: {
|
30
|
+
type: [Number],
|
31
|
+
required: true
|
32
|
+
}
|
33
|
+
},
|
34
|
+
worktime: [{
|
35
|
+
day: String,
|
36
|
+
time: {
|
37
|
+
start: String,
|
38
|
+
end: String
|
39
|
+
}
|
40
|
+
}],
|
41
|
+
// Marketplace options
|
42
|
+
delivery: [String],
|
43
|
+
payment: [String],
|
44
|
+
members: [
|
45
|
+
{
|
46
|
+
user: {
|
47
|
+
type: mongoose.Schema.Types.ObjectId,
|
48
|
+
ref: 'User',
|
49
|
+
},
|
50
|
+
position: {
|
51
|
+
type: String,
|
52
|
+
default: 'Member'
|
53
|
+
},
|
54
|
+
},
|
55
|
+
],
|
56
|
+
subspots: [
|
57
|
+
{
|
58
|
+
type: mongoose.Schema.Types.ObjectId,
|
59
|
+
ref: 'Spot',
|
60
|
+
},
|
61
|
+
],
|
62
|
+
});
|
63
|
+
|
64
|
+
spotSchema.index({ organization: 1 })
|
65
|
+
|
66
|
+
spotSchema.index({ location: '2dsphere' });
|
67
|
+
|
68
|
+
|
69
|
+
const Spot = mongoose.model('Spot', spotSchema);
|
70
|
+
|
71
|
+
return Spot
|
72
|
+
}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import layoutEmpty from '@pf/src/modules/globals/components/layouts/Empty.vue'
|
2
2
|
import layoutSpots from '../components/layouts/Spots.vue'
|
3
3
|
|
4
|
+
import * as validationAuth from '@pf/src/modules/middlewares/client/auth.validation.js';
|
5
|
+
|
4
6
|
const spots = [
|
5
7
|
{
|
6
8
|
path: 'spots',
|
@@ -29,7 +31,38 @@ const spots = [
|
|
29
31
|
]
|
30
32
|
}
|
31
33
|
]
|
32
|
-
}
|
34
|
+
},
|
35
|
+
{
|
36
|
+
path: ':_id/spots/create',
|
37
|
+
name: 'Spot Creation',
|
38
|
+
meta: {
|
39
|
+
title: 'Создание отдела',
|
40
|
+
},
|
41
|
+
beforeEnter: [
|
42
|
+
validationAuth.requiresAuth,
|
43
|
+
],
|
44
|
+
component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/SpotEdit.vue'),
|
45
|
+
}, {
|
46
|
+
path: ':_id/spots/:deparment',
|
47
|
+
name: 'Spot',
|
48
|
+
meta: {
|
49
|
+
title: 'Отдел',
|
50
|
+
},
|
51
|
+
beforeEnter: [
|
52
|
+
validationAuth.requiresAuth,
|
53
|
+
],
|
54
|
+
component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/Spot.vue'),
|
55
|
+
}, {
|
56
|
+
path: ':_id/spots/:spot/edit',
|
57
|
+
name: 'Spot Edit',
|
58
|
+
meta: {
|
59
|
+
title: 'Редактирование отдела',
|
60
|
+
},
|
61
|
+
beforeEnter: [
|
62
|
+
validationAuth.requiresAuth,
|
63
|
+
],
|
64
|
+
component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/SpotEdit.vue'),
|
65
|
+
},
|
33
66
|
]
|
34
67
|
}
|
35
68
|
];
|
@@ -0,0 +1,31 @@
|
|
1
|
+
// Factories
|
2
|
+
const controllerFactory = require("../controllers/spots.controller");
|
3
|
+
// Routes
|
4
|
+
module.exports = function(app, db) {
|
5
|
+
const controller = controllerFactory(db);
|
6
|
+
|
7
|
+
app.use(function(req, res, next) {
|
8
|
+
res.header(
|
9
|
+
"Access-Control-Allow-Headers",
|
10
|
+
"Access-Control-Allow-Origin",
|
11
|
+
"x-access-token, Origin, Content-Type, Accept"
|
12
|
+
);
|
13
|
+
next();
|
14
|
+
});
|
15
|
+
|
16
|
+
// Get organization spots by _id
|
17
|
+
app.get("/api/spots/:_id", controller.read);
|
18
|
+
|
19
|
+
// Get spot by _id
|
20
|
+
app.get("/api/spots/get/:_id", controller.readOne);
|
21
|
+
|
22
|
+
// Add organization spot
|
23
|
+
app.post("/api/spots/:_id/create", controller.create);
|
24
|
+
|
25
|
+
// Update organization spot
|
26
|
+
app.post("/api/spots/:_id/update", controller.update);
|
27
|
+
|
28
|
+
// Delete organization spot
|
29
|
+
app.delete("/api/spots/:_id/delete", controller.delete);
|
30
|
+
|
31
|
+
};
|