@ozdao/prometheus-framework 0.1.36 → 0.1.38
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 +1 -1
- package/dist/auth.server.mjs +1 -1
- 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 +217 -189
- package/dist/community.server.mjs +217 -189
- 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 +100 -210
- package/dist/events.server.mjs +100 -210
- 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 +212 -256
- package/dist/users.server.js +1 -1
- package/dist/users.server.mjs +1 -1
- package/package.json +5 -1
- package/src/components/Field/Field.vue +34 -9
- package/src/components/SelectMulti/SelectMulti.vue +18 -22
- 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/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/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,221 @@
|
|
1
|
+
import { reactive as K, toRefs as Q, ref as f, onMounted as W, computed as k, resolveComponent as X, openBlock as o, createElementBlock as n, Fragment as B, createElementVNode as s, createTextVNode as _, toDisplayString as l, unref as e, createCommentVNode as i, createVNode as Y, renderList as Z } from "vue";
|
2
|
+
import { useRoute as ss } from "vue-router";
|
3
|
+
import { a as h, s as y } from "./orders-13c10d49.mjs";
|
4
|
+
import "./index-a661083c.mjs";
|
5
|
+
import "./globals-96ba60e4.mjs";
|
6
|
+
import "vue-i18n";
|
7
|
+
const es = /* @__PURE__ */ s("header", { class: "mn-medium flex-v-center flex-nowrap flex" }, [
|
8
|
+
/* @__PURE__ */ s("h2", { class: "mn-r-medium" }, "Edit Order")
|
9
|
+
], -1), ts = { class: "gap-thin flex-nowrap flex mn-semi" }, os = { class: "w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium" }, ns = { class: "mn-small p-big" }, ls = /* @__PURE__ */ s("br", null, null, -1), is = /* @__PURE__ */ s("button", { class: "button" }, "Подтвердить заказ", -1), as = { class: "w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium" }, cs = { class: "mn-semi p-big" }, ds = /* @__PURE__ */ s("br", null, null, -1), rs = /* @__PURE__ */ s("button", { class: "button" }, "Изменить статус оплаты", -1), _s = { class: "mn-thin cols-2" }, ms = { class: "" }, us = { class: "w-100 mn-small" }, hs = { class: "cols-2 mn-medium" }, ps = { class: "col flex block" }, vs = { class: "mn-small w-100" }, fs = /* @__PURE__ */ s("br", null, null, -1), ks = { class: "mn-small w-100" }, ys = { class: "mn-small w-100" }, bs = { class: "col flex block" }, ws = { class: "mn-small w-100" }, gs = { class: "mn-small w-100" }, Cs = { class: "mn-small w-100" }, xs = { class: "block" }, Os = { class: "w-100" }, $s = { class: "" }, Ps = { class: "order-list" }, Is = { class: "flex" }, Vs = /* @__PURE__ */ s("h5", { class: "mn-small" }, " Состав заказа ", -1), Es = {
|
10
|
+
key: 0,
|
11
|
+
class: "mn-small w-100 block"
|
12
|
+
}, zs = { class: "mn-semi" }, Ns = { class: "text-left" }, Ts = { class: "name" }, Ls = { class: "mn-small flex" }, qs = { class: "small-underline variant" }, Ss = {
|
13
|
+
key: 0,
|
14
|
+
class: ""
|
15
|
+
}, As = {
|
16
|
+
key: 1,
|
17
|
+
class: ""
|
18
|
+
}, Bs = {
|
19
|
+
key: 2,
|
20
|
+
class: ""
|
21
|
+
}, Fs = {
|
22
|
+
key: 3,
|
23
|
+
class: ""
|
24
|
+
}, Rs = { key: 4 }, Ds = { class: "t-demi" }, Ms = {
|
25
|
+
key: 0,
|
26
|
+
class: "flex-nowrap flex w-100"
|
27
|
+
}, Us = ["onInput", "value"], js = ["onClick"], Gs = ["onClick"], Hs = ["onClick"], Js = { class: "mn-thinw-100 flex-v-center flex block" }, Ks = { class: "p-big" }, Qs = {
|
28
|
+
key: 0,
|
29
|
+
class: "p-big t-semi"
|
30
|
+
}, Ws = {
|
31
|
+
key: 1,
|
32
|
+
class: "p-big t-semi"
|
33
|
+
}, Xs = {
|
34
|
+
key: 2,
|
35
|
+
class: "p-big t-semi"
|
36
|
+
}, Ys = { key: 3 }, Zs = { key: 4 }, se = { key: 5 }, ee = /* @__PURE__ */ s("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ce = {
|
37
|
+
__name: "EditOrder",
|
38
|
+
props: ["showProduct"],
|
39
|
+
setup(F) {
|
40
|
+
const R = F, b = ss();
|
41
|
+
R.showProduct = [];
|
42
|
+
let m = K([]);
|
43
|
+
Q(m);
|
44
|
+
var r = f(!1);
|
45
|
+
let a = f({}), D = f([]);
|
46
|
+
function M() {
|
47
|
+
h.addProductToOrder(), r.value = !r.value;
|
48
|
+
}
|
49
|
+
W(async () => {
|
50
|
+
await h.fetchProducts(), await h.fetchOrder(b.params.id), a.value = y.current, D.value = y.all;
|
51
|
+
});
|
52
|
+
function U(d) {
|
53
|
+
h.deleteItemFromOrder(d);
|
54
|
+
}
|
55
|
+
function j() {
|
56
|
+
h.updateOrderItems(b.params.id);
|
57
|
+
}
|
58
|
+
function w(d) {
|
59
|
+
m[d] = !m[d];
|
60
|
+
}
|
61
|
+
function g() {
|
62
|
+
r.value = !r.value;
|
63
|
+
}
|
64
|
+
const G = k(() => y.products.all), p = k(() => 100), H = k(() => []);
|
65
|
+
return (d, c) => {
|
66
|
+
var C, x, O, $, P, I, V, E, z, N, T, L, q, S, A;
|
67
|
+
const J = X("vue-select");
|
68
|
+
return o(), n(B, null, [
|
69
|
+
es,
|
70
|
+
s("section", ts, [
|
71
|
+
s("div", os, [
|
72
|
+
s("p", ns, [
|
73
|
+
_(" Статус заказа:"),
|
74
|
+
ls,
|
75
|
+
_(l(e(a).status), 1)
|
76
|
+
]),
|
77
|
+
is
|
78
|
+
]),
|
79
|
+
s("div", as, [
|
80
|
+
s("p", cs, [
|
81
|
+
_("Статус оплаты:"),
|
82
|
+
ds,
|
83
|
+
_(l((C = e(a).payment) == null ? void 0 : C.status), 1)
|
84
|
+
]),
|
85
|
+
rs
|
86
|
+
])
|
87
|
+
]),
|
88
|
+
s("div", _s, [
|
89
|
+
s("section", ms, [
|
90
|
+
s("h5", us, [
|
91
|
+
_("Информация о заказе "),
|
92
|
+
e(r) === !1 ? (o(), n("a", {
|
93
|
+
key: 0,
|
94
|
+
class: "mn-l-small t-main h5",
|
95
|
+
onClick: c[0] || (c[0] = (t) => d.reserOrderList())
|
96
|
+
}, "Редактировать")) : i("", !0)
|
97
|
+
]),
|
98
|
+
s("div", hs, [
|
99
|
+
s("div", ps, [
|
100
|
+
s("p", vs, [
|
101
|
+
_(" Номер клиента: " + l((x = e(a).info) == null ? void 0 : x.phone), 1),
|
102
|
+
fs
|
103
|
+
]),
|
104
|
+
s("p", ks, " Имя клиента: " + l((O = e(a).info) == null ? void 0 : O.name) + " " + l(($ = e(a).info) == null ? void 0 : $.surname), 1),
|
105
|
+
s("p", ys, " Контактный email: " + l((P = e(a).info) == null ? void 0 : P.email), 1)
|
106
|
+
]),
|
107
|
+
s("div", bs, [
|
108
|
+
s("p", ws, " Тип доставки: " + l((I = e(a).info) == null ? void 0 : I.delivery), 1),
|
109
|
+
s("p", gs, " Город: " + l((V = e(a).info) == null ? void 0 : V.city), 1),
|
110
|
+
s("p", Cs, " Адресс: " + l((E = e(a).info) == null ? void 0 : E.adress), 1)
|
111
|
+
])
|
112
|
+
]),
|
113
|
+
s("div", xs, [
|
114
|
+
s("p", Os, " Комментарий: " + l((z = e(a).info) == null ? void 0 : z.comment), 1)
|
115
|
+
])
|
116
|
+
]),
|
117
|
+
s("section", $s, [
|
118
|
+
s("div", Ps, [
|
119
|
+
s("div", Is, [
|
120
|
+
Vs,
|
121
|
+
s("div", null, [
|
122
|
+
e(r) === !1 ? (o(), n("a", {
|
123
|
+
key: 0,
|
124
|
+
class: "t-main h5",
|
125
|
+
onClick: c[1] || (c[1] = (t) => g())
|
126
|
+
}, "Добавить")) : (o(), n("a", {
|
127
|
+
key: 1,
|
128
|
+
class: "t-main h5",
|
129
|
+
onClick: c[2] || (c[2] = (t) => g())
|
130
|
+
}, "Закрыть")),
|
131
|
+
e(r) === !1 ? (o(), n("a", {
|
132
|
+
key: 2,
|
133
|
+
class: "mn-l-small t-main h5",
|
134
|
+
onClick: c[3] || (c[3] = (t) => d.reserOrderList())
|
135
|
+
}, "Сбросить")) : i("", !0),
|
136
|
+
e(r) === !1 ? (o(), n("a", {
|
137
|
+
key: 3,
|
138
|
+
class: "mn-l-small t-main h5",
|
139
|
+
onClick: c[4] || (c[4] = (t) => j())
|
140
|
+
}, "Сохранить")) : i("", !0)
|
141
|
+
])
|
142
|
+
]),
|
143
|
+
e(r) !== !1 ? (o(), n("div", Es, [
|
144
|
+
Y(J, {
|
145
|
+
options: e(G),
|
146
|
+
modelValue: d.techStack,
|
147
|
+
"onUpdate:modelValue": c[5] || (c[5] = (t) => d.techStack = t),
|
148
|
+
"label-by": "name",
|
149
|
+
searchable: "",
|
150
|
+
"clear-on-close": "",
|
151
|
+
"close-on-select": !0
|
152
|
+
}, null, 8, ["options", "modelValue"]),
|
153
|
+
s("button", {
|
154
|
+
onClick: c[6] || (c[6] = (t) => M()),
|
155
|
+
class: "w-25 button"
|
156
|
+
}, "Добавить в заказ")
|
157
|
+
])) : i("", !0),
|
158
|
+
s("ul", zs, [
|
159
|
+
(o(!0), n(B, null, Z(e(H), (t, u) => (o(), n("li", {
|
160
|
+
key: t.id,
|
161
|
+
class: "shop-cart-item mn-small block"
|
162
|
+
}, [
|
163
|
+
s("div", Ns, [
|
164
|
+
s("p", Ts, l(t.name), 1),
|
165
|
+
s("div", Ls, [
|
166
|
+
s("div", qs, [
|
167
|
+
!t.size && !t.color ? (o(), n("span", Ss, "One-size")) : i("", !0),
|
168
|
+
t.size ? (o(), n("span", As, l(t.size), 1)) : i("", !0),
|
169
|
+
t.color && t.size ? (o(), n("span", Bs, ", ")) : i("", !0),
|
170
|
+
t.color ? (o(), n("span", Fs, l(t.color), 1)) : i("", !0),
|
171
|
+
t.edit ? (o(), n("div", Rs, l(t.edit), 1)) : i("", !0)
|
172
|
+
]),
|
173
|
+
s("p", Ds, l(t.quantity) + " x " + l(t.price / 100) + " ₽ ", 1)
|
174
|
+
]),
|
175
|
+
e(m)[u] ? (o(), n("div", Ms, [
|
176
|
+
s("input", {
|
177
|
+
onInput: (v) => d.updateInputText("orders", "current.items[" + u + "].quantity", v),
|
178
|
+
value: t.quantity,
|
179
|
+
placeholder: "Маргарита",
|
180
|
+
class: "mn-small input-text input"
|
181
|
+
}, null, 40, Us)
|
182
|
+
])) : i("", !0),
|
183
|
+
e(m)[u] ? i("", !0) : (o(), n("a", {
|
184
|
+
key: 1,
|
185
|
+
onClick: (v) => w(u)
|
186
|
+
}, "Редактировать", 8, js)),
|
187
|
+
e(m)[u] ? (o(), n("a", {
|
188
|
+
key: 2,
|
189
|
+
onClick: (v) => U(t)
|
190
|
+
}, "Удалить", 8, Gs)) : i("", !0),
|
191
|
+
e(m)[u] ? (o(), n("a", {
|
192
|
+
key: 3,
|
193
|
+
onClick: (v) => w(u)
|
194
|
+
}, "Закрыть", 8, Hs)) : i("", !0)
|
195
|
+
])
|
196
|
+
]))), 128))
|
197
|
+
])
|
198
|
+
])
|
199
|
+
])
|
200
|
+
]),
|
201
|
+
s("div", Js, [
|
202
|
+
s("p", Ks, [
|
203
|
+
_("Сумма к оплате: "),
|
204
|
+
((N = e(a).info) == null ? void 0 : N.delivery) === "Самовывоз" ? (o(), n("span", Qs, l(e(p) / 100) + " ₽", 1)) : i("", !0),
|
205
|
+
((T = e(a).info) == null ? void 0 : T.delivery) === "Курьером" ? (o(), n("span", Ws, l(e(p) / 100 + 350) + " ₽", 1)) : i("", !0),
|
206
|
+
((L = e(a).info) == null ? void 0 : L.delivery) === "Почтой" ? (o(), n("span", Xs, l(e(p) / 100 + 550) + " ₽", 1)) : i("", !0),
|
207
|
+
_(" (Заказ " + l(e(p) / 100) + " ₽ + доставка ", 1),
|
208
|
+
((q = e(a).info) == null ? void 0 : q.delivery) === "Самовывоз" ? (o(), n("span", Ys, "0")) : i("", !0),
|
209
|
+
((S = e(a).info) == null ? void 0 : S.delivery) === "Курьером" ? (o(), n("span", Zs, "350")) : i("", !0),
|
210
|
+
((A = e(a).info) == null ? void 0 : A.delivery) === "Почтой" ? (o(), n("span", se, "550")) : i("", !0),
|
211
|
+
_(" ₽) ")
|
212
|
+
]),
|
213
|
+
ee
|
214
|
+
])
|
215
|
+
], 64);
|
216
|
+
};
|
217
|
+
}
|
218
|
+
};
|
219
|
+
export {
|
220
|
+
ce as default
|
221
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("vue-router"),c=require("./orders-37f041aa.js");require("./index-b41aac19.js");require("./globals-928eb13c.js");require("vue-i18n");const F=e.createElementVNode("header",{class:"mn-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Edit Order")],-1),R={class:"gap-thin flex-nowrap flex mn-semi"},A={class:"w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium"},M={class:"mn-small p-big"},j=e.createElementVNode("br",null,null,-1),U=e.createElementVNode("button",{class:"button"},"Подтвердить заказ",-1),G={class:"w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium"},H={class:"mn-semi p-big"},J=e.createElementVNode("br",null,null,-1),K=e.createElementVNode("button",{class:"button"},"Изменить статус оплаты",-1),Q={class:"mn-thin cols-2"},W={class:""},X={class:"w-100 mn-small"},Y={class:"cols-2 mn-medium"},Z={class:"col flex block"},ee={class:"mn-small w-100"},te=e.createElementVNode("br",null,null,-1),oe={class:"mn-small w-100"},ne={class:"mn-small w-100"},se={class:"col flex block"},le={class:"mn-small w-100"},ce={class:"mn-small w-100"},ae={class:"mn-small w-100"},re={class:"block"},ie={class:"w-100"},de={class:""},me={class:"order-list"},ue={class:"flex"},_e=e.createElementVNode("h5",{class:"mn-small"}," Состав заказа ",-1),pe={key:0,class:"mn-small w-100 block"},ke={class:"mn-semi"},fe={class:"text-left"},Ve={class:"name"},Ne={class:"mn-small flex"},Ee={class:"small-underline variant"},he={key:0,class:""},ye={key:1,class:""},ve={key:2,class:""},Be={key:3,class:""},be={key:4},ge={class:"t-demi"},Ce={key:0,class:"flex-nowrap flex w-100"},Se=["onInput","value"],we=["onClick"],De=["onClick"],xe=["onClick"],Te={class:"mn-thinw-100 flex-v-center flex block"},Oe={class:"p-big"},$e={key:0,class:"p-big t-semi"},qe={key:1,class:"p-big t-semi"},Pe={key:2,class:"p-big t-semi"},Ie={key:3},ze={key:4},Le={key:5},Fe=e.createElementVNode("button",{class:"mn-l-auto button"},"Запросить онлайн",-1),Re={__name:"EditOrder",props:["showProduct"],setup(D){const x=D,m=L.useRoute();x.showProduct=[];let a=e.reactive([]);e.toRefs(a);var l=e.ref(!1);let o=e.ref({}),T=e.ref([]);function O(){c.actions.addProductToOrder(),l.value=!l.value}e.onMounted(async()=>{await c.actions.fetchProducts(),await c.actions.fetchOrder(m.params.id),o.value=c.state.current,T.value=c.state.all});function $(s){c.actions.deleteItemFromOrder(s)}function q(){c.actions.updateOrderItems(m.params.id)}function u(s){a[s]=!a[s]}function _(){l.value=!l.value}const P=e.computed(()=>c.state.products.all),i=e.computed(()=>100),I=e.computed(()=>[]);return(s,n)=>{var p,k,f,V,N,E,h,y,v,B,b,g,C,S,w;const z=e.resolveComponent("vue-select");return e.openBlock(),e.createElementBlock(e.Fragment,null,[F,e.createElementVNode("section",R,[e.createElementVNode("div",A,[e.createElementVNode("p",M,[e.createTextVNode(" Статус заказа:"),j,e.createTextVNode(e.toDisplayString(e.unref(o).status),1)]),U]),e.createElementVNode("div",G,[e.createElementVNode("p",H,[e.createTextVNode("Статус оплаты:"),J,e.createTextVNode(e.toDisplayString((p=e.unref(o).payment)==null?void 0:p.status),1)]),K])]),e.createElementVNode("div",Q,[e.createElementVNode("section",W,[e.createElementVNode("h5",X,[e.createTextVNode("Информация о заказе "),e.unref(l)===!1?(e.openBlock(),e.createElementBlock("a",{key:0,class:"mn-l-small t-main h5",onClick:n[0]||(n[0]=t=>s.reserOrderList())},"Редактировать")):e.createCommentVNode("",!0)]),e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("p",ee,[e.createTextVNode(" Номер клиента: "+e.toDisplayString((k=e.unref(o).info)==null?void 0:k.phone),1),te]),e.createElementVNode("p",oe," Имя клиента: "+e.toDisplayString((f=e.unref(o).info)==null?void 0:f.name)+" "+e.toDisplayString((V=e.unref(o).info)==null?void 0:V.surname),1),e.createElementVNode("p",ne," Контактный email: "+e.toDisplayString((N=e.unref(o).info)==null?void 0:N.email),1)]),e.createElementVNode("div",se,[e.createElementVNode("p",le," Тип доставки: "+e.toDisplayString((E=e.unref(o).info)==null?void 0:E.delivery),1),e.createElementVNode("p",ce," Город: "+e.toDisplayString((h=e.unref(o).info)==null?void 0:h.city),1),e.createElementVNode("p",ae," Адресс: "+e.toDisplayString((y=e.unref(o).info)==null?void 0:y.adress),1)])]),e.createElementVNode("div",re,[e.createElementVNode("p",ie," Комментарий: "+e.toDisplayString((v=e.unref(o).info)==null?void 0:v.comment),1)])]),e.createElementVNode("section",de,[e.createElementVNode("div",me,[e.createElementVNode("div",ue,[_e,e.createElementVNode("div",null,[e.unref(l)===!1?(e.openBlock(),e.createElementBlock("a",{key:0,class:"t-main h5",onClick:n[1]||(n[1]=t=>_())},"Добавить")):(e.openBlock(),e.createElementBlock("a",{key:1,class:"t-main h5",onClick:n[2]||(n[2]=t=>_())},"Закрыть")),e.unref(l)===!1?(e.openBlock(),e.createElementBlock("a",{key:2,class:"mn-l-small t-main h5",onClick:n[3]||(n[3]=t=>s.reserOrderList())},"Сбросить")):e.createCommentVNode("",!0),e.unref(l)===!1?(e.openBlock(),e.createElementBlock("a",{key:3,class:"mn-l-small t-main h5",onClick:n[4]||(n[4]=t=>q())},"Сохранить")):e.createCommentVNode("",!0)])]),e.unref(l)!==!1?(e.openBlock(),e.createElementBlock("div",pe,[e.createVNode(z,{options:e.unref(P),modelValue:s.techStack,"onUpdate:modelValue":n[5]||(n[5]=t=>s.techStack=t),"label-by":"name",searchable:"","clear-on-close":"","close-on-select":!0},null,8,["options","modelValue"]),e.createElementVNode("button",{onClick:n[6]||(n[6]=t=>O()),class:"w-25 button"},"Добавить в заказ")])):e.createCommentVNode("",!0),e.createElementVNode("ul",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(I),(t,r)=>(e.openBlock(),e.createElementBlock("li",{key:t.id,class:"shop-cart-item mn-small block"},[e.createElementVNode("div",fe,[e.createElementVNode("p",Ve,e.toDisplayString(t.name),1),e.createElementVNode("div",Ne,[e.createElementVNode("div",Ee,[!t.size&&!t.color?(e.openBlock(),e.createElementBlock("span",he,"One-size")):e.createCommentVNode("",!0),t.size?(e.openBlock(),e.createElementBlock("span",ye,e.toDisplayString(t.size),1)):e.createCommentVNode("",!0),t.color&&t.size?(e.openBlock(),e.createElementBlock("span",ve,", ")):e.createCommentVNode("",!0),t.color?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(t.color),1)):e.createCommentVNode("",!0),t.edit?(e.openBlock(),e.createElementBlock("div",be,e.toDisplayString(t.edit),1)):e.createCommentVNode("",!0)]),e.createElementVNode("p",ge,e.toDisplayString(t.quantity)+" x "+e.toDisplayString(t.price/100)+" ₽ ",1)]),e.unref(a)[r]?(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("input",{onInput:d=>s.updateInputText("orders","current.items["+r+"].quantity",d),value:t.quantity,placeholder:"Маргарита",class:"mn-small input-text input"},null,40,Se)])):e.createCommentVNode("",!0),e.unref(a)[r]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("a",{key:1,onClick:d=>u(r)},"Редактировать",8,we)),e.unref(a)[r]?(e.openBlock(),e.createElementBlock("a",{key:2,onClick:d=>$(t)},"Удалить",8,De)):e.createCommentVNode("",!0),e.unref(a)[r]?(e.openBlock(),e.createElementBlock("a",{key:3,onClick:d=>u(r)},"Закрыть",8,xe)):e.createCommentVNode("",!0)])]))),128))])])])]),e.createElementVNode("div",Te,[e.createElementVNode("p",Oe,[e.createTextVNode("Сумма к оплате: "),((B=e.unref(o).info)==null?void 0:B.delivery)==="Самовывоз"?(e.openBlock(),e.createElementBlock("span",$e,e.toDisplayString(e.unref(i)/100)+" ₽",1)):e.createCommentVNode("",!0),((b=e.unref(o).info)==null?void 0:b.delivery)==="Курьером"?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(e.unref(i)/100+350)+" ₽",1)):e.createCommentVNode("",!0),((g=e.unref(o).info)==null?void 0:g.delivery)==="Почтой"?(e.openBlock(),e.createElementBlock("span",Pe,e.toDisplayString(e.unref(i)/100+550)+" ₽",1)):e.createCommentVNode("",!0),e.createTextVNode(" (Заказ "+e.toDisplayString(e.unref(i)/100)+" ₽ + доставка ",1),((C=e.unref(o).info)==null?void 0:C.delivery)==="Самовывоз"?(e.openBlock(),e.createElementBlock("span",Ie,"0")):e.createCommentVNode("",!0),((S=e.unref(o).info)==null?void 0:S.delivery)==="Курьером"?(e.openBlock(),e.createElementBlock("span",ze,"350")):e.createCommentVNode("",!0),((w=e.unref(o).info)==null?void 0:w.delivery)==="Почтой"?(e.openBlock(),e.createElementBlock("span",Le,"550")):e.createCommentVNode("",!0),e.createTextVNode(" ₽) ")]),Fe])],64)}}};exports.default=Re;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const t=require("vue"),l={class:"mn-regular"},i={class:"mn-small t-transp p-medium"},a={__name:"EmptyState",props:{title:{type:String,default:"У вас еще нет организации"},description:{type:String,default:"Для использования сервиса, вам необходимо добавить вашу организацию."},action:{type:String},callback:{type:Function,default:()=>{}}},setup(e){return(o,n)=>(t.openBlock(),t.createElementBlock("section",null,[t.createElementVNode("h3",l,t.toDisplayString(e.title),1),t.createElementVNode("p",i,t.toDisplayString(e.description),1),e.action?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=(...c)=>e.callback&&e.callback(...c)),class:"t-white bg-second w-100 button"},t.toDisplayString(e.action),1)):t.createCommentVNode("",!0)]))}};exports._sfc_main=a;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { openBlock as c, createElementBlock as a, createElementVNode as l, toDisplayString as e, createCommentVNode as o } from "vue";
|
2
|
+
const s = { class: "mn-regular" }, r = { class: "mn-small t-transp p-medium" }, d = {
|
3
|
+
__name: "EmptyState",
|
4
|
+
props: {
|
5
|
+
title: {
|
6
|
+
type: String,
|
7
|
+
default: "У вас еще нет организации"
|
8
|
+
},
|
9
|
+
description: {
|
10
|
+
type: String,
|
11
|
+
default: "Для использования сервиса, вам необходимо добавить вашу организацию."
|
12
|
+
},
|
13
|
+
action: {
|
14
|
+
type: String
|
15
|
+
},
|
16
|
+
callback: {
|
17
|
+
type: Function,
|
18
|
+
default: () => {
|
19
|
+
}
|
20
|
+
}
|
21
|
+
},
|
22
|
+
setup(t) {
|
23
|
+
return (m, n) => (c(), a("section", null, [
|
24
|
+
l("h3", s, e(t.title), 1),
|
25
|
+
l("p", r, e(t.description), 1),
|
26
|
+
t.action ? (c(), a("button", {
|
27
|
+
key: 0,
|
28
|
+
onClick: n[0] || (n[0] = (...i) => t.callback && t.callback(...i)),
|
29
|
+
class: "t-white bg-second w-100 button"
|
30
|
+
}, e(t.action), 1)) : o("", !0)
|
31
|
+
]));
|
32
|
+
}
|
33
|
+
};
|
34
|
+
export {
|
35
|
+
d as _
|
36
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),i=require("vue-router");require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const o=require("./Feed-22464fcd.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const g=require("./EmptyState-d65bab5b.js"),y=require("./SkeletonEventShort-6c9e3940.js"),c=require("./auth-06d35b82.js");const f={class:"today-events"},d={__name:"List",props:{category:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},period:{type:String,default:null},phase:{type:String,default:null}},setup(s){const t=s,r=e.ref([]),n=e.ref(!0),_=e.ref(0),u=e.ref(5);return e.onMounted(async()=>{const l=await o.read({skip:_.value,limit:u.value,sortOrder:"desc",category:t.category,user:t.user,owner:t.owner,organization:t.organization,period:t.period,phase:t.phase});r.value=l,n.value=!1}),(l,v)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[n.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,a=>(e.openBlock(),e.createBlock(y.SkeletonEventShort,{key:a}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!n.value&&r.value.length<1?(e.openBlock(),e.createBlock(g._sfc_main,{key:0,title:"No Events Today",description:"Today, are no events available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!n.value&&r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(a,m)=>(e.openBlock(),e.createBlock(o._sfc_main$1,{onClick:h=>l.$router.push({name:"Event",params:{url:a.url}}),key:a._id,event:a,owner:s.user,type:"short",class:e.normalizeClass(["pd-medium",{"br-b br-solid br-black-transp-10":m!==r.value.length-1}])},null,8,["onClick","event","owner","class"]))),128)):e.createCommentVNode("",!0)]),_:1})]))}},p={__name:"Events",setup(s){const t=i.useRoute();return i.useRouter(),(r,n)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(d,{user:c.state.user._id,class:"bg-grey mn-thin radius-big",phase:"week"},null,8,["user"]),e.createVNode(o._sfc_main,{category:e.unref(t).params.category,user:c.state.user._id,period:e.unref(t).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}},k=Object.freeze(Object.defineProperty({__proto__:null,default:p},Symbol.toStringTag,{value:"Module"}));exports.Events=k;exports._sfc_main=d;exports._sfc_main$1=p;
|
@@ -0,0 +1,123 @@
|
|
1
|
+
import { ref as o, onMounted as k, openBlock as t, createElementBlock as l, createVNode as s, TransitionGroup as _, withCtx as c, Fragment as g, renderList as f, createBlock as d, createCommentVNode as p, Transition as S, normalizeClass as w, unref as y } from "vue";
|
2
|
+
import { useRoute as E, useRouter as $ } from "vue-router";
|
3
|
+
import "vue-i18n";
|
4
|
+
import "./globals-96ba60e4.mjs";
|
5
|
+
import "./Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
6
|
+
import { r as z, a as C, _ as L, s as T } from "./Feed-7b80704d.mjs";
|
7
|
+
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
8
|
+
import { _ as x } from "./EmptyState-e404b05d.mjs";
|
9
|
+
import { S as N } from "./SkeletonEventShort-f030e56f.mjs";
|
10
|
+
import { s as v } from "./auth-ec618cb3.mjs";
|
11
|
+
const B = { class: "today-events" }, O = {
|
12
|
+
__name: "List",
|
13
|
+
props: {
|
14
|
+
category: {
|
15
|
+
type: String,
|
16
|
+
default: null
|
17
|
+
},
|
18
|
+
organization: {
|
19
|
+
type: String,
|
20
|
+
default: null
|
21
|
+
},
|
22
|
+
owner: {
|
23
|
+
type: String,
|
24
|
+
default: null
|
25
|
+
},
|
26
|
+
user: {
|
27
|
+
type: [String, Number],
|
28
|
+
default: null
|
29
|
+
},
|
30
|
+
period: {
|
31
|
+
type: String,
|
32
|
+
default: null
|
33
|
+
},
|
34
|
+
phase: {
|
35
|
+
type: String,
|
36
|
+
default: null
|
37
|
+
}
|
38
|
+
},
|
39
|
+
setup(u) {
|
40
|
+
const e = u, r = o([]), a = o(!0), h = o(0), m = o(5);
|
41
|
+
return k(async () => {
|
42
|
+
const i = await z({
|
43
|
+
skip: h.value,
|
44
|
+
limit: m.value,
|
45
|
+
sortOrder: "desc",
|
46
|
+
category: e.category,
|
47
|
+
user: e.user,
|
48
|
+
owner: e.owner,
|
49
|
+
organization: e.organization,
|
50
|
+
period: e.period,
|
51
|
+
phase: e.phase
|
52
|
+
});
|
53
|
+
r.value = i, a.value = !1;
|
54
|
+
}), (i, D) => (t(), l("section", B, [
|
55
|
+
s(_, {
|
56
|
+
tag: "ul",
|
57
|
+
name: "fade",
|
58
|
+
class: "o-hidden bg-grey radius-big"
|
59
|
+
}, {
|
60
|
+
default: c(() => [
|
61
|
+
a.value ? (t(!0), l(g, { key: 0 }, f(m.value, (n) => (t(), d(N, { key: n }))), 128)) : p("", !0)
|
62
|
+
]),
|
63
|
+
_: 1
|
64
|
+
}),
|
65
|
+
s(S, { name: "fade" }, {
|
66
|
+
default: c(() => [
|
67
|
+
!a.value && r.value.length < 1 ? (t(), d(x, {
|
68
|
+
key: 0,
|
69
|
+
title: "No Events Today",
|
70
|
+
description: "Today, are no events available. Please check back later.",
|
71
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
72
|
+
})) : p("", !0)
|
73
|
+
]),
|
74
|
+
_: 1
|
75
|
+
}),
|
76
|
+
s(_, {
|
77
|
+
tag: "ul",
|
78
|
+
name: "fade",
|
79
|
+
class: "container"
|
80
|
+
}, {
|
81
|
+
default: c(() => [
|
82
|
+
!a.value && r.value.length > 0 ? (t(!0), l(g, { key: 0 }, f(r.value, (n, b) => (t(), d(C, {
|
83
|
+
onClick: (M) => i.$router.push({ name: "Event", params: { url: n.url } }),
|
84
|
+
key: n._id,
|
85
|
+
event: n,
|
86
|
+
owner: u.user,
|
87
|
+
type: "short",
|
88
|
+
class: w(["pd-medium", {
|
89
|
+
"br-b br-solid br-black-transp-10": b !== r.value.length - 1
|
90
|
+
}])
|
91
|
+
}, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : p("", !0)
|
92
|
+
]),
|
93
|
+
_: 1
|
94
|
+
})
|
95
|
+
]));
|
96
|
+
}
|
97
|
+
}, j = {
|
98
|
+
__name: "Events",
|
99
|
+
setup(u) {
|
100
|
+
const e = E();
|
101
|
+
return $(), (r, a) => (t(), l("section", null, [
|
102
|
+
s(O, {
|
103
|
+
user: v.user._id,
|
104
|
+
class: "bg-grey mn-thin radius-big",
|
105
|
+
phase: "week"
|
106
|
+
}, null, 8, ["user"]),
|
107
|
+
s(L, {
|
108
|
+
category: y(e).params.category,
|
109
|
+
user: v.user._id,
|
110
|
+
period: y(e).query.period,
|
111
|
+
selectedDate: T.filter.date
|
112
|
+
}, null, 8, ["category", "user", "period", "selectedDate"])
|
113
|
+
]));
|
114
|
+
}
|
115
|
+
}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
116
|
+
__proto__: null,
|
117
|
+
default: j
|
118
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
119
|
+
export {
|
120
|
+
K as E,
|
121
|
+
O as _,
|
122
|
+
j as a
|
123
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const N=require("./EmptyState-d65bab5b.js"),w=require("./Chips-d47704e6.js"),D=require("./IconEdit-c0469b45.js"),V=require("vue-router"),x=require("./SkeletonEvent-eb284de8.js"),U=require("./index-b41aac19.js"),h=require("./globals-928eb13c.js"),$={key:0,class:"o-hidden pos-relative bg-grey mn-small w-100"},z=["src"],P=["src"],I={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},M={key:0,class:"t-semi"},F={class:"t-semi"},L={key:0,class:"t-semi uppercase"},R={key:1,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},q={key:0,class:""},O={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},j={key:2,class:"mn-small p-big"},E={__name:"CardEvent",props:["event","user","short","type"],setup(t){const r=t;e.ref(new Date),V.useRouter(),e.computed(()=>r.event.content.find(a=>a.type.name==="ImageUpload")),e.computed(()=>r.event.content.find(a=>a.type.name==="Textarea"));const s=e.computed(()=>{const a=new Date,o=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()),n=new Date(r.event.date.start),c=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())-o;if(c<0)return"Finished";if(c===0)return"Starting Now";{const f=Math.floor(c/1e3),g=Math.floor(f/60),k=Math.floor(g/60),C=Math.floor(k/24);return C>0?`${C} days until event`:k>0?`${k} hours until event`:g>0?`${g} minutes until event`:`${f} seconds until event`}}),l=e.computed(()=>{const a=new Date(r.event.date.start),o={day:"2-digit",month:"2-digit"};return a.toLocaleDateString(void 0,o)}),i=e.computed(()=>{console.log(r.event.date.start),console.log(r.event.date.end);const a=new Date(r.event.date.start),o=new Date(r.event.date.end),n=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(a),y=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(o);return`${n}-${y}`}),d=e.computed(()=>{const a=r.event.name;return a.length>26?`${a.substring(0,22)}…`:a});return(a,o)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(w._sfc_main,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:e.unref(s)},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,z),e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,P)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(D.IconEdit,{key:0,onClick:o[0]||(o[0]=e.withModifiers(n=>a.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",I,[t.type!=="short"?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(e.unref(l))+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",F,e.toDisplayString(e.unref(i)),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",L,e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",R,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",q,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",O,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",j,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(w._sfc_main$1,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}},p=U.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),u=e.reactive({all:[],filter:{tags:[],period:"",date:null},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}});async function v(t={}){t.params=t.params||{},t.params.skip=t.skip||0,t.params.limit=t.limit||9,t.params.tags=t.tags||[],t.phase&&(t.params={phase:t.phase}),t.url&&(t.params={url:t.url}),t.period&&(t.params.period=t.period),t.category&&(t.params.category=t.category),t.organization&&(t.params.organization=t.organization),t.date&&(t.params.date=t.date),t.participant&&(t.params.participant=t.participant),t.owner&&(t.params.owner=t.owner),t.creator&&(t.params.creator=t.creator),t.user&&(t.params.user=t.user),t.sortOrder&&(t.params.sortOrder=t.sortOrder),t.sortParam&&(t.params.sortParam=t.sortParam),t.params.skip=t.skip||0,t.params.limit=t.limit||10;try{console.log("Request params:"+t.params);const r=await p.get("/api/events/read",{params:t.params});return console.log(t.params),t.url?m(r.data,"current"):m(r.data,"all"),Promise.resolve(r.data)}catch(r){return h.setError(r),Promise.reject(r)}}async function b(t){return p.post("/api/events/create",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(h.setError(r),Promise.reject(r)))}async function B(t){return p.post("/api/events/update",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(h.setError(r),Promise.reject(r)))}async function T(t){return await p.post("/api/events/delete",{_id:t}).then(r=>{const s=u.all.findIndex(l=>l._id===t);return s!==-1&&u.all.splice(s,1),Promise.resolve(r.data)},r=>(h.setError(r),Promise.reject(r)))}function m(t,r){u[r]=t}function S(){u.current={_id:"",cover:"",url:"",phase:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}}e.watch(u,(t,r)=>{});const H=Object.freeze(Object.defineProperty({__proto__:null,clean:S,create:b,read:v,remove:T,set:m,state:u,update:B},Symbol.toStringTag,{value:"Module"})),G={class:"feed"},Y={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},user:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},phase:{type:String,default:null}},setup(t){const r=t,s=e.ref([]),l=e.ref(!1),i=e.ref(!0),d=e.ref(0),a=e.ref(20),o=async()=>{if(l.value){d.value+=a.value;const n=await v({skip:d.value,limit:a.value,category:r.category,sortOrder:r.sortOrder,participant:r.participant,creator:r.creator,user:r.user,date:r.selectedDate,owner:r.owner,organization:r.organization,period:r.period,phase:r.phase});n.length===0?l.value=!1:l.value=!0,s.value=[...s.value,...n]}};return e.onMounted(async()=>{i.value=!0,console.log(r.selectedDate);const n=await v({skip:d.value,limit:a.value,category:r.category,participant:r.participant,sortOrder:r.sortOrder,user:r.user,owner:r.owner,creator:r.creator,date:r.selectedDate,organization:r.organization,period:r.period,phase:r.phase});n.length===0?l.value=!1:l.value=!0,s.value=n,i.value=!1}),(n,y)=>(e.openBlock(),e.createElementBlock("section",G,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[i.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,c=>(e.openBlock(),e.createBlock(x.SkeletonEvent,{key:c}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!i.value&&s.value.length<1?(e.openBlock(),e.createBlock(N._sfc_main,{key:0,title:"No Events Found",description:"Currently, there are no events available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"container"},{default:e.withCtx(()=>[!i.value&&s.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.value,(c,f)=>(e.openBlock(),e.createBlock(E,{onClick:g=>n.$router.push({name:"Event",params:{url:c.url}}),key:c._id,event:c,user:t.user,type:"normal",class:e.normalizeClass(["bg-grey radius-big mn-medium",{"br-b br-solid br-black-transp-10":f!==s.value.length-1}])},null,8,["onClick","event","user","class"]))),128)):e.createCommentVNode("",!0),l.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports._sfc_main=Y;exports._sfc_main$1=E;exports.clean=S;exports.create=b;exports.events=H;exports.read=v;exports.remove=T;exports.state=u;exports.update=B;
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import { ref as s, onMounted as _, openBlock as a, createElementBlock as o, Fragment as y, createVNode as c, Transition as d, withCtx as m, unref as v, createBlock as p, createCommentVNode as k, normalizeClass as h, renderList as S } from "vue";
|
2
|
+
import { L as N } from "./Loader-cd422786.mjs";
|
3
|
+
import { _ as C } from "./EmptyState-e404b05d.mjs";
|
4
|
+
import { r as b, _ as L } from "./CardBlogpost-38016b80.mjs";
|
5
|
+
const M = {
|
6
|
+
__name: "Feed",
|
7
|
+
props: {
|
8
|
+
category: {
|
9
|
+
type: String,
|
10
|
+
default: null
|
11
|
+
},
|
12
|
+
limit: {
|
13
|
+
type: Number,
|
14
|
+
default: 7
|
15
|
+
},
|
16
|
+
skip: {
|
17
|
+
type: Number,
|
18
|
+
default: 0
|
19
|
+
},
|
20
|
+
owner: {
|
21
|
+
type: String,
|
22
|
+
default: null
|
23
|
+
},
|
24
|
+
creator: {
|
25
|
+
type: String,
|
26
|
+
default: null
|
27
|
+
},
|
28
|
+
following: {
|
29
|
+
type: String,
|
30
|
+
default: null
|
31
|
+
},
|
32
|
+
status: {
|
33
|
+
type: String,
|
34
|
+
default: "published"
|
35
|
+
},
|
36
|
+
user: {
|
37
|
+
type: [String, Number],
|
38
|
+
default: null
|
39
|
+
},
|
40
|
+
period: {
|
41
|
+
type: String,
|
42
|
+
default: null
|
43
|
+
}
|
44
|
+
},
|
45
|
+
setup(f) {
|
46
|
+
const e = f, l = s([]), r = s(!0);
|
47
|
+
let n = s(!0), u = s(e.skip), i = s(e.limit);
|
48
|
+
const w = async () => {
|
49
|
+
if (r.value) {
|
50
|
+
u.value += i.value;
|
51
|
+
const t = await b({
|
52
|
+
skip: u.value,
|
53
|
+
limit: i.value,
|
54
|
+
category: e.category,
|
55
|
+
user: e.user,
|
56
|
+
owner: e.owner,
|
57
|
+
following: e.following,
|
58
|
+
creator: e.creator,
|
59
|
+
status: e.status,
|
60
|
+
period: e.period
|
61
|
+
});
|
62
|
+
t.length === 0 && (r.value = !1), l.value = [...l.value, ...t];
|
63
|
+
}
|
64
|
+
};
|
65
|
+
return _(async () => {
|
66
|
+
const t = await b({
|
67
|
+
skip: u.value,
|
68
|
+
limit: i.value,
|
69
|
+
category: e.category,
|
70
|
+
user: e.user,
|
71
|
+
owner: e.owner,
|
72
|
+
following: e.following,
|
73
|
+
status: e.status,
|
74
|
+
creator: e.creator,
|
75
|
+
period: e.period
|
76
|
+
});
|
77
|
+
t.length === 0 ? r.value = !1 : r.value = !0, l.value = t, n.value = !1;
|
78
|
+
}), (t, B) => (a(), o(y, null, [
|
79
|
+
c(d, { name: "scaleTransition" }, {
|
80
|
+
default: m(() => [
|
81
|
+
v(n) ? (a(), p(N, {
|
82
|
+
key: 0,
|
83
|
+
class: "z-index-5 pos-t-50 left-t-50 pos-absolute"
|
84
|
+
})) : k("", !0)
|
85
|
+
]),
|
86
|
+
_: 1
|
87
|
+
}),
|
88
|
+
c(d, { name: "scaleTransition" }, {
|
89
|
+
default: m(() => [
|
90
|
+
!v(n) && l.value.length < 1 ? (a(), p(C, {
|
91
|
+
key: 0,
|
92
|
+
title: "No Blog Posts Found",
|
93
|
+
description: "Currently, there are no posts available in this blog. Please check back later.",
|
94
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
95
|
+
})) : (a(), o("div", {
|
96
|
+
key: 1,
|
97
|
+
class: h(t.$attrs.class)
|
98
|
+
}, [
|
99
|
+
(a(!0), o(y, null, S(l.value, (g) => (a(), p(L, {
|
100
|
+
key: g._id,
|
101
|
+
blogpost: g,
|
102
|
+
user: f.user,
|
103
|
+
class: "mn-medium"
|
104
|
+
}, null, 8, ["blogpost", "user"]))), 128)),
|
105
|
+
c(d, { name: "scaleTransition" }, {
|
106
|
+
default: m(() => [
|
107
|
+
r.value && l.value.length > 0 ? (a(), o("button", {
|
108
|
+
key: 0,
|
109
|
+
onClick: w,
|
110
|
+
class: "w-100 bg-main button"
|
111
|
+
}, " Load more ")) : k("", !0)
|
112
|
+
]),
|
113
|
+
_: 1
|
114
|
+
})
|
115
|
+
], 2))
|
116
|
+
]),
|
117
|
+
_: 1
|
118
|
+
})
|
119
|
+
], 64));
|
120
|
+
}
|
121
|
+
};
|
122
|
+
export {
|
123
|
+
M as _
|
124
|
+
};
|