@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,56 @@
|
|
1
|
+
function getPeriodConditions(period) {
|
2
|
+
const date = new Date();
|
3
|
+
const matchStage = [];
|
4
|
+
|
5
|
+
switch (period) {
|
6
|
+
case 'today':
|
7
|
+
date.setDate(date.getDate() - 1);
|
8
|
+
break;
|
9
|
+
case 'week':
|
10
|
+
date.setDate(date.getDate() - 7);
|
11
|
+
break;
|
12
|
+
case 'month':
|
13
|
+
date.setMonth(date.getMonth() - 1);
|
14
|
+
break;
|
15
|
+
case 'year':
|
16
|
+
date.setFullYear(date.getFullYear() - 1);
|
17
|
+
break;
|
18
|
+
default:
|
19
|
+
date.setFullYear(date.getFullYear() - 1);
|
20
|
+
}
|
21
|
+
|
22
|
+
if (date) {
|
23
|
+
return [{ $match: { createdAt: { $gte: date } } }];
|
24
|
+
} else {
|
25
|
+
return []
|
26
|
+
};
|
27
|
+
}
|
28
|
+
|
29
|
+
async function getCategoryConditions(category, user) {
|
30
|
+
const aggregationStages = [];
|
31
|
+
|
32
|
+
if (category) {
|
33
|
+
switch (category) {
|
34
|
+
case 'featured':
|
35
|
+
aggregationStages.push({ $match: { tags: { $in: ["Featured"] } } });
|
36
|
+
break;
|
37
|
+
case 'popular':
|
38
|
+
aggregationStages.push({ $sort: { views: -1, likes: -1 } });
|
39
|
+
break;
|
40
|
+
case 'new':
|
41
|
+
aggregationStages.push({ $sort: { createdAt: -1 } });
|
42
|
+
break;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
// Возвращаем накопленные этапы агрегации.
|
47
|
+
console.log(aggregationStages)
|
48
|
+
return aggregationStages;
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
module.exports = {
|
53
|
+
getPeriodConditions,
|
54
|
+
getCategoryConditions,
|
55
|
+
// ... other functions that you might want to export
|
56
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
const ObjectId = require('mongoose').Types.ObjectId;
|
2
|
+
|
3
|
+
function getCommentsLookupStage() {
|
4
|
+
return {
|
5
|
+
$lookup: {
|
6
|
+
from: "comments",
|
7
|
+
localField: "_id",
|
8
|
+
foreignField: "target",
|
9
|
+
as: "comments"
|
10
|
+
}
|
11
|
+
};
|
12
|
+
}
|
13
|
+
|
14
|
+
function getReactionsLookupStage() {
|
15
|
+
return {
|
16
|
+
$lookup: {
|
17
|
+
from: "reactions",
|
18
|
+
localField: "_id",
|
19
|
+
foreignField: "target",
|
20
|
+
as: "reactions"
|
21
|
+
}
|
22
|
+
};
|
23
|
+
}
|
24
|
+
|
25
|
+
function getReactionsCommentsFields(user) {
|
26
|
+
return {
|
27
|
+
$addFields: {
|
28
|
+
numberOfComments: { $size: "$comments" },
|
29
|
+
numberOfReactions: { $size: "$reactions" },
|
30
|
+
isReacted: {
|
31
|
+
$in: [
|
32
|
+
new ObjectId(user), // make sure db is accessible or pass as param
|
33
|
+
"$reactions.user"
|
34
|
+
]
|
35
|
+
},
|
36
|
+
reactionId: {
|
37
|
+
$let: {
|
38
|
+
vars: {
|
39
|
+
reactionIndex: {
|
40
|
+
$indexOfArray: [
|
41
|
+
"$reactions.user",
|
42
|
+
new ObjectId(user) // same here for db accessibility
|
43
|
+
]
|
44
|
+
}
|
45
|
+
},
|
46
|
+
in: {
|
47
|
+
$cond: [
|
48
|
+
{ $gte: ["$$reactionIndex", 0] },
|
49
|
+
{ $arrayElemAt: ["$reactions._id", "$$reactionIndex"] },
|
50
|
+
null
|
51
|
+
]
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
};
|
57
|
+
}
|
58
|
+
|
59
|
+
module.exports = {
|
60
|
+
getCommentsLookupStage,
|
61
|
+
getReactionsLookupStage,
|
62
|
+
getReactionsCommentsFields
|
63
|
+
};
|
@@ -3,18 +3,22 @@ const controllerFactory = require("../controllers/blog.controller");
|
|
3
3
|
const middlewareFactoryGlobal = require('@pf/src/modules/middlewares/server');
|
4
4
|
const middlewareFactoryCommunity = require('../middlewares/server');
|
5
5
|
|
6
|
-
module.exports = function(app, db) {
|
6
|
+
module.exports = function(app, db, origins) {
|
7
7
|
const controller = controllerFactory(db);
|
8
8
|
|
9
9
|
const { authJwt } = middlewareFactoryGlobal(db);
|
10
10
|
const { verifyBlogpost } = middlewareFactoryCommunity(db);
|
11
11
|
|
12
12
|
app.use(function(req, res, next) {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
|
14
|
+
const origin = req.headers.origin;
|
15
|
+
|
16
|
+
if (origins.includes(origin)) {
|
17
|
+
res.setHeader('Access-Control-Allow-Origin', origin);
|
18
|
+
}
|
19
|
+
|
20
|
+
res.header("Access-Control-Allow-Headers", "x-access-token, Origin, Content-Type, Accept");
|
21
|
+
|
18
22
|
next();
|
19
23
|
});
|
20
24
|
|
@@ -56,14 +56,14 @@ async function read(options = {}) {
|
|
56
56
|
if (options.category) {
|
57
57
|
options.params.category = options.category;
|
58
58
|
}
|
59
|
-
//
|
60
|
-
if (options.organization) {
|
61
|
-
options.params.organization = options.organization;
|
62
|
-
}
|
63
|
-
// Author
|
59
|
+
// Owner
|
64
60
|
if (options.owner) {
|
65
61
|
options.params.owner = options.owner;
|
66
62
|
}
|
63
|
+
// Following
|
64
|
+
if (options.following) {
|
65
|
+
options.params.following = options.following;
|
66
|
+
}
|
67
67
|
// Creator
|
68
68
|
if (options.creator) {
|
69
69
|
options.params.creator = options.creator;
|
@@ -134,9 +134,8 @@
|
|
134
134
|
|
135
135
|
import IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'
|
136
136
|
|
137
|
-
import CardHeader from '@pf/src/components/
|
138
|
-
import CardFooter from '@pf/src/components/
|
139
|
-
|
137
|
+
import CardHeader from '@pf/src/modules/globals/components/blocks/CardHeader.vue'
|
138
|
+
import CardFooter from '@pf/src/modules/globals/components/blocks/CardFooter.vue'
|
140
139
|
import { ref, computed } from 'vue'
|
141
140
|
import { useRouter } from 'vue-router'
|
142
141
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<template>
|
2
2
|
<section class="feed">
|
3
3
|
<TransitionGroup tag="ul" name="scaleTransition" class="o-hidden bg-grey radius-big">
|
4
4
|
<SkeletonEvent
|
@@ -88,7 +88,7 @@ f<template>
|
|
88
88
|
type: String,
|
89
89
|
default: null
|
90
90
|
},
|
91
|
-
|
91
|
+
phase: {
|
92
92
|
type: String,
|
93
93
|
default: null
|
94
94
|
}
|
@@ -117,7 +117,7 @@ f<template>
|
|
117
117
|
owner: props.owner,
|
118
118
|
organization: props.organization,
|
119
119
|
period: props.period,
|
120
|
-
|
120
|
+
phase: props.phase
|
121
121
|
});
|
122
122
|
|
123
123
|
if (data.length === 0) {
|
@@ -145,7 +145,7 @@ f<template>
|
|
145
145
|
date: props.selectedDate,
|
146
146
|
organization: props.organization,
|
147
147
|
period: props.period,
|
148
|
-
|
148
|
+
phase: props.phase
|
149
149
|
});
|
150
150
|
|
151
151
|
if (data.length === 0) {
|
@@ -79,7 +79,7 @@
|
|
79
79
|
type: String,
|
80
80
|
default: null
|
81
81
|
},
|
82
|
-
|
82
|
+
phase: {
|
83
83
|
type: String,
|
84
84
|
default: null
|
85
85
|
}
|
@@ -101,7 +101,7 @@
|
|
101
101
|
owner: props.owner,
|
102
102
|
organization: props.organization,
|
103
103
|
period: props.period,
|
104
|
-
|
104
|
+
phase: props.phase
|
105
105
|
});
|
106
106
|
|
107
107
|
eventsList.value = data;
|
@@ -18,16 +18,16 @@ const middlewareFactory = (db) => {
|
|
18
18
|
...queryProcessorGlobals.getBasicOptions(
|
19
19
|
req.query
|
20
20
|
),
|
21
|
-
...
|
21
|
+
...queryProcessor.getDateConditions(
|
22
22
|
req.query.date
|
23
23
|
),
|
24
|
-
...
|
24
|
+
...queryProcessor.getPeriodConditions(
|
25
25
|
req.query.period,
|
26
26
|
req.query.periodStart,
|
27
27
|
req.query.periodEnd
|
28
28
|
),
|
29
|
-
...
|
30
|
-
req.query.
|
29
|
+
...queryProcessor.getPhaseConditions(
|
30
|
+
req.query.phase
|
31
31
|
),
|
32
32
|
// Tickets and Participants
|
33
33
|
queryProcessor.getTicketsLookupStage(),
|
@@ -51,10 +51,12 @@ const middlewareFactory = (db) => {
|
|
51
51
|
queryProcessor.getProjectStage(),
|
52
52
|
// Pagination
|
53
53
|
...queryProcessorGlobals.getSortingOptions(
|
54
|
-
req.query
|
54
|
+
req.query.sortParam,
|
55
|
+
req.query.sortOrder,
|
55
56
|
),
|
56
57
|
...queryProcessorGlobals.getPaginationOptions(
|
57
|
-
req.query
|
58
|
+
req.query.skip,
|
59
|
+
req.query.limit
|
58
60
|
)
|
59
61
|
];
|
60
62
|
|
@@ -1,5 +1,111 @@
|
|
1
1
|
const ObjectId = require('mongoose').Types.ObjectId;
|
2
2
|
|
3
|
+
function getDateConditions(date) {
|
4
|
+
if (date) {
|
5
|
+
const dateString = date.toString(); // Just to ensure it's a string
|
6
|
+
|
7
|
+
const day = parseInt(dateString.substring(0, 2), 10);
|
8
|
+
const month = parseInt(dateString.substring(2, 4), 10) - 1; // months are 0-based in JavaScript
|
9
|
+
const year = parseInt(dateString.substring(4, 8), 10);
|
10
|
+
|
11
|
+
const customDate = new Date(year, month, day);
|
12
|
+
customDate.setHours(0, 0, 0, 0); // Set the start of the day
|
13
|
+
|
14
|
+
const customDateEnd = new Date(year, month, day);
|
15
|
+
customDateEnd.setHours(23, 59, 59, 999); // Set the end of the day
|
16
|
+
|
17
|
+
return [{ $match: { "date.start": { $gte: customDate, $lte: customDateEnd } } }];
|
18
|
+
} else {
|
19
|
+
return []
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
function getPeriodConditions(period,periodStart, periodEnd) {
|
24
|
+
const now = new Date();
|
25
|
+
|
26
|
+
let startDate, endDate;
|
27
|
+
|
28
|
+
if (periodStart && periodEnd) {
|
29
|
+
startDate = new Date(periodStart);
|
30
|
+
endDate = new Date(periodEnd);
|
31
|
+
|
32
|
+
return [{
|
33
|
+
$match: {
|
34
|
+
"date.start": {
|
35
|
+
$gte: startDate,
|
36
|
+
$lte: endDate
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}];
|
40
|
+
} else if (period) {
|
41
|
+
startDate = new Date(now.getTime()); // Make a copy
|
42
|
+
endDate = new Date(now.getTime()); // New end date variable
|
43
|
+
|
44
|
+
switch (period) {
|
45
|
+
case 'today':
|
46
|
+
startDate.setHours(0, 0, 0, 0);
|
47
|
+
endDate.setHours(23, 59, 59, 999);
|
48
|
+
break;
|
49
|
+
case 'week':
|
50
|
+
endDate.setDate(now.getDate() + 7);
|
51
|
+
break;
|
52
|
+
case 'month':
|
53
|
+
endDate.setDate(now.getDate() + 30); // Or endDate.setMonth(now.getMonth() + 1); based on your requirement
|
54
|
+
break;
|
55
|
+
case 'year':
|
56
|
+
endDate.setFullYear(now.getFullYear() + 1);
|
57
|
+
break;
|
58
|
+
default:
|
59
|
+
break;
|
60
|
+
}
|
61
|
+
return [{
|
62
|
+
$match: {
|
63
|
+
"date.start": {
|
64
|
+
$gte: startDate,
|
65
|
+
$lte: endDate
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}];
|
69
|
+
} else {
|
70
|
+
return []
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
function getPhaseConditions(phase) {
|
75
|
+
const now = new Date();
|
76
|
+
|
77
|
+
const todayStart = new Date(now.getTime());
|
78
|
+
todayStart.setHours(0, 0, 0, 0);
|
79
|
+
const todayEnd = new Date(now.getTime());
|
80
|
+
todayEnd.setHours(23, 59, 59, 999);
|
81
|
+
|
82
|
+
let matchConditions = [];
|
83
|
+
|
84
|
+
switch (phase) {
|
85
|
+
case 'finished':
|
86
|
+
matchConditions.push({ "date.start": { $lt: now } });
|
87
|
+
break;
|
88
|
+
case 'today':
|
89
|
+
matchConditions.push({ "date.start": { $gte: todayStart, $lte: todayEnd } });
|
90
|
+
break;
|
91
|
+
case 'live':
|
92
|
+
matchConditions.push({ "date.start": { $lte: now } });
|
93
|
+
matchConditions.push({ "date.end": { $gte: now } });
|
94
|
+
break;
|
95
|
+
case 'planned':
|
96
|
+
matchConditions.push({ "date.start": { $gt: now } });
|
97
|
+
break;
|
98
|
+
default:
|
99
|
+
break;
|
100
|
+
}
|
101
|
+
|
102
|
+
if (matchConditions && matchConditions.length > 0) {
|
103
|
+
return [{ $match: { $and: matchConditions } }];
|
104
|
+
} else {
|
105
|
+
return []
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
3
109
|
function getTicketsLookupStage() {
|
4
110
|
return {
|
5
111
|
$lookup: {
|
@@ -65,7 +171,7 @@ function getProjectStage() {
|
|
65
171
|
url: 1,
|
66
172
|
cover: 1,
|
67
173
|
name: 1,
|
68
|
-
|
174
|
+
phase: 1,
|
69
175
|
description: 1,
|
70
176
|
content: 1,
|
71
177
|
owner: 1,
|
@@ -109,6 +215,10 @@ function getParticipantStages(participantQuery) {
|
|
109
215
|
}
|
110
216
|
|
111
217
|
module.exports = {
|
218
|
+
getDateConditions,
|
219
|
+
getPhaseConditions,
|
220
|
+
getPeriodConditions,
|
221
|
+
|
112
222
|
getTicketsLookupStage,
|
113
223
|
getParticipantsPhotosStage,
|
114
224
|
getNumberOfTicketsStage,
|
@@ -46,10 +46,6 @@ module.exports = (db) => {
|
|
46
46
|
applyOwnershipSchema(EventSchema,db);
|
47
47
|
applyMetadataSchema(EventSchema,db);
|
48
48
|
|
49
|
-
EventSchema.post('aggregate', async function(docs) {
|
50
|
-
console.log(EventSchema)
|
51
|
-
});
|
52
|
-
|
53
49
|
const Event = db.mongoose.model("Event", EventSchema);
|
54
50
|
|
55
51
|
return Event;
|
@@ -4,7 +4,7 @@ const controllerFactory = require("../controllers/events.controller");
|
|
4
4
|
const middlewareFactoryGlobal = require('@pf/src/modules/middlewares/server');
|
5
5
|
const middlewareFactoryEvents = require('../middlewares/server');
|
6
6
|
// Routes
|
7
|
-
module.exports = function(app, db) {
|
7
|
+
module.exports = function(app, db, origins) {
|
8
8
|
const controller = controllerFactory(db);
|
9
9
|
|
10
10
|
const { authJwt } = middlewareFactoryGlobal(db);
|
@@ -12,11 +12,14 @@ module.exports = function(app, db) {
|
|
12
12
|
|
13
13
|
app.use(function(req, res, next) {
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
const origin = req.headers.origin;
|
16
|
+
|
17
|
+
if (origins.includes(origin)) {
|
18
|
+
res.setHeader('Access-Control-Allow-Origin', origin);
|
19
|
+
}
|
20
|
+
|
21
|
+
res.header("Access-Control-Allow-Headers", "x-access-token, Origin, Content-Type, Accept");
|
22
|
+
|
20
23
|
next();
|
21
24
|
});
|
22
25
|
|
@@ -46,12 +46,10 @@ async function read(options = {}) {
|
|
46
46
|
options.params.skip = options.skip || 0;
|
47
47
|
options.params.limit = options.limit || 9;
|
48
48
|
options.params.tags = options.tags || [];
|
49
|
-
|
50
|
-
//
|
51
|
-
|
52
|
-
|
53
|
-
if (options.status) {
|
54
|
-
options.params = { status: options.status };
|
49
|
+
|
50
|
+
// Handle phase
|
51
|
+
if (options.phase) {
|
52
|
+
options.params = { phase: options.phase };
|
55
53
|
}
|
56
54
|
// Handle fetching a specific event by _id
|
57
55
|
if (options.url) {
|
@@ -165,7 +163,7 @@ function clean () {
|
|
165
163
|
_id: "",
|
166
164
|
cover: "",
|
167
165
|
url: "",
|
168
|
-
|
166
|
+
phase: "",
|
169
167
|
name: "",
|
170
168
|
tags: [],
|
171
169
|
date: {
|
@@ -78,8 +78,23 @@
|
|
78
78
|
<div v-if="members" class="w-4r i-thin">
|
79
79
|
<!-- Круг с числом участников -->
|
80
80
|
<span
|
81
|
-
:style="{
|
82
|
-
|
81
|
+
:style="{
|
82
|
+
position: 'absolute',
|
83
|
+
top: '0px',
|
84
|
+
right: '0px'
|
85
|
+
}"
|
86
|
+
class="
|
87
|
+
br-solid
|
88
|
+
br-2px
|
89
|
+
br-white
|
90
|
+
z-index-1
|
91
|
+
radius-big
|
92
|
+
i-thin
|
93
|
+
bg-second
|
94
|
+
flex flex-center
|
95
|
+
t-white
|
96
|
+
p-small
|
97
|
+
t-semi"
|
83
98
|
>
|
84
99
|
{{members}}
|
85
100
|
</span>
|
@@ -89,8 +104,20 @@
|
|
89
104
|
v-for="(photo, index) in membersPhotos.slice(0,2)"
|
90
105
|
:key="index"
|
91
106
|
:src="(FILE_SERVER_URL || '') + photo"
|
92
|
-
:style="{
|
93
|
-
|
107
|
+
:style="{
|
108
|
+
position: 'absolute',
|
109
|
+
top: '0px',
|
110
|
+
right: (index * 20 + 20) + '%',
|
111
|
+
zIndex: 1 - index
|
112
|
+
}"
|
113
|
+
class="
|
114
|
+
br-solid
|
115
|
+
br-2px
|
116
|
+
br-white
|
117
|
+
i-thin
|
118
|
+
bg-grey
|
119
|
+
radius-big
|
120
|
+
"
|
94
121
|
/>
|
95
122
|
</div>
|
96
123
|
</div>
|
@@ -0,0 +1,136 @@
|
|
1
|
+
<template>
|
2
|
+
<section class="feed">
|
3
|
+
|
4
|
+
<TransitionGroup tag="ul" name="scaleTransition" class="o-hidden bg-grey radius-big">
|
5
|
+
<SkeletonEvent
|
6
|
+
v-if="isLoading"
|
7
|
+
v-for="i in currentLimit" :key="i"
|
8
|
+
/>
|
9
|
+
</TransitionGroup>
|
10
|
+
|
11
|
+
<transition name="scaleTransition">
|
12
|
+
<EmptyState
|
13
|
+
v-if="!isLoading && itemsList.length < 1"
|
14
|
+
:title="states.empty.title"
|
15
|
+
:description="states.empty.description"
|
16
|
+
class="pd-medium mn-thin bg-grey radius-big"
|
17
|
+
/>
|
18
|
+
</transition>
|
19
|
+
|
20
|
+
<!-- <SortProducts
|
21
|
+
|
22
|
+
/> -->
|
23
|
+
|
24
|
+
<TransitionGroup tag="ul" name="scaleTransition" class="cols-1 gap-thin">
|
25
|
+
|
26
|
+
|
27
|
+
<slot
|
28
|
+
v-if="!isLoading && itemsList.length > 0"
|
29
|
+
:items="itemsList"
|
30
|
+
:user="user"
|
31
|
+
></slot>
|
32
|
+
|
33
|
+
<button
|
34
|
+
v-if="hasMoreItems && itemsList.length > 0"
|
35
|
+
@click="loadMoreItems"
|
36
|
+
class="w-100 bg-main button"
|
37
|
+
>
|
38
|
+
Load more
|
39
|
+
</button>
|
40
|
+
</TransitionGroup>
|
41
|
+
</section>
|
42
|
+
</template>
|
43
|
+
|
44
|
+
<script setup>
|
45
|
+
import { ref, computed, onMounted } from 'vue';
|
46
|
+
|
47
|
+
import SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'
|
48
|
+
|
49
|
+
import Loader from '@pf/src/components/Loader/Loader.vue';
|
50
|
+
import EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';
|
51
|
+
import SortProducts from '@pf/src/modules/products/components/sections/SortProducts.vue'
|
52
|
+
|
53
|
+
// Пропсы
|
54
|
+
const props = defineProps({
|
55
|
+
states: {
|
56
|
+
type: Object,
|
57
|
+
default: () => ({
|
58
|
+
empty: {
|
59
|
+
title: String,
|
60
|
+
description: String,
|
61
|
+
},
|
62
|
+
}),
|
63
|
+
},
|
64
|
+
store: {
|
65
|
+
type: Object,
|
66
|
+
default: () => ({
|
67
|
+
read: Function,
|
68
|
+
state: Object,
|
69
|
+
}),
|
70
|
+
},
|
71
|
+
options: {
|
72
|
+
type: Object,
|
73
|
+
default: () => ({
|
74
|
+
category: null,
|
75
|
+
limit: 20,
|
76
|
+
skip: 0 ,
|
77
|
+
owner: null,
|
78
|
+
creator: null,
|
79
|
+
user: null,
|
80
|
+
status: null,
|
81
|
+
period: null,
|
82
|
+
}),
|
83
|
+
},
|
84
|
+
});
|
85
|
+
|
86
|
+
const itemsList = ref([]);
|
87
|
+
const hasMoreItems = ref(true);
|
88
|
+
|
89
|
+
let isLoading = ref(true);
|
90
|
+
|
91
|
+
let currentSkip = ref(props.options.skip ? props.options.skip : 0);
|
92
|
+
let currentLimit = ref(props.options.limit ? props.options.limit : 10);
|
93
|
+
|
94
|
+
const query = computed(() => ({
|
95
|
+
skip: currentSkip.value,
|
96
|
+
limit: currentLimit.value,
|
97
|
+
...props.options
|
98
|
+
}));
|
99
|
+
|
100
|
+
const loadMoreItems = async () => {
|
101
|
+
if (hasMoreItems.value) {
|
102
|
+
currentSkip.value += currentLimit.value;
|
103
|
+
|
104
|
+
const data = await props.store.read({
|
105
|
+
skip: currentSkip.value,
|
106
|
+
limit: currentLimit.value,
|
107
|
+
...props.options
|
108
|
+
});
|
109
|
+
|
110
|
+
if (data.length === 0) {
|
111
|
+
hasMoreItems.value = false;
|
112
|
+
}
|
113
|
+
|
114
|
+
itemsList.value = [...itemsList.value, ...data];
|
115
|
+
}
|
116
|
+
};
|
117
|
+
|
118
|
+
onMounted(async () => {
|
119
|
+
console.log(props.options)
|
120
|
+
const data = await props.store.read({
|
121
|
+
skip: currentSkip.value,
|
122
|
+
limit: currentLimit.value,
|
123
|
+
...props.options
|
124
|
+
});
|
125
|
+
|
126
|
+
if (data.length === 0) {
|
127
|
+
hasMoreItems.value = false;
|
128
|
+
} else {
|
129
|
+
hasMoreItems.value = true;
|
130
|
+
}
|
131
|
+
|
132
|
+
itemsList.value = data;
|
133
|
+
|
134
|
+
isLoading.value = false;
|
135
|
+
});
|
136
|
+
</script>
|