@ozdao/martyrs 0.2.561 → 0.2.563
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{abac-DC2x92Pa.js → abac-DYoheWuc.js} +2 -1
- package/dist/{core.logger-VRHh-WUW.js → core.cache-DALYFDdy.js} +10 -59
- package/dist/core.logger-C3q8A9dl.js +51 -0
- package/dist/core.server.js +1 -1
- package/dist/{crud-DFFgLl09.js → crud-C7FSTUes.js} +2 -1
- package/dist/inventory.server.js +4 -3
- package/dist/{main-DQtUY5ma.js → main-CmjWiDVF.js} +2837 -2548
- package/dist/marketplace.server.js +389 -0
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +3 -3
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue2.js → Menu.vue.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +1 -0
- package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.js → Spoiler.vue2.js} +2 -2
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +3 -6
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +3 -3
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js +59 -171
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterCheckbox.vue2.js +64 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterCheckbox.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterDateRange.vue2.js +160 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterDateRange.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterOptions.vue.js +46 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterOptions.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js +105 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FiltersGroup.vue.js +166 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FiltersGroup.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +4 -0
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -0
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/marketplace.client.js +5 -9
- package/dist/martyrs/src/modules/marketplace/marketplace.client.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +242 -0
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js.map +1 -0
- package/dist/martyrs/src/modules/marketplace/views/router/marketplace.router.js +39 -0
- package/dist/martyrs/src/modules/marketplace/views/router/marketplace.router.js.map +1 -0
- package/dist/martyrs/src/modules/marketplace/views/store/marketplace.js +65 -2
- package/dist/martyrs/src/modules/marketplace/views/store/marketplace.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -0
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +4 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/music.server.js +4 -3
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/orders.server.js +2 -2
- package/dist/organizations.server.js +10 -215
- package/dist/products.server.js +4 -3
- package/dist/queryProcessorOrganizations-BB11WFpc.js +221 -0
- package/dist/rents.server.js +2 -1
- package/dist/style.css +10 -1
- package/dist/{web-Cyc6i_pv.js → web-cNKIl_cL.js} +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Checkbox/Checkbox.vue +1 -1
- package/src/modules/core/views/components/layouts/Client.vue +7 -11
- package/src/modules/core/views/components/partials/Header.vue +1 -1
- package/src/modules/core/views/components/sections/Filters.vue +47 -161
- package/src/modules/core/views/components/sections/filters/FilterCheckbox.vue +12 -31
- package/src/modules/core/views/components/sections/filters/FilterDateRange.vue +15 -15
- package/src/modules/core/views/components/sections/filters/FilterOptions.vue +12 -43
- package/src/modules/core/views/components/sections/filters/FilterRange.vue +59 -36
- package/src/modules/core/views/components/sections/filters/FiltersGroup.vue +177 -0
- package/src/modules/core/views/utils/vue-app-renderer.js +12 -0
- package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
- package/src/modules/marketplace/controllers/marketplace.controller.js +123 -0
- package/src/modules/marketplace/controllers/utils/lookupConfigs.js +130 -0
- package/src/modules/marketplace/controllers/utils/queryProcessorMarketplace.js +211 -0
- package/src/modules/marketplace/marketplace.client.js +3 -10
- package/src/modules/marketplace/marketplace.server.js +22 -0
- package/src/modules/marketplace/routes/marketplace.routes.js +34 -0
- package/src/modules/marketplace/views/components/pages/Marketplace.vue +273 -0
- package/src/modules/marketplace/views/router/marketplace.router.js +37 -30
- package/src/modules/marketplace/views/store/marketplace.js +74 -3
- package/src/modules/organizations/components/blocks/CardOrganization.vue +8 -8
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/controllers/utils/queryProcessorOrganizations.js +8 -1
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +0 -1
- package/dist/martyrs/src/modules/marketplace/marketplace.router.js +0 -63
- package/dist/martyrs/src/modules/marketplace/marketplace.router.js.map +0 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +0 -326
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +0 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js +0 -74
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js.map +0 -1
- package/src/modules/core/views/components/sections/filters/FilterPrice.vue +0 -81
- package/src/modules/marketplace/marketplace.router.js +0 -66
- package/src/modules/marketplace/views/components/layouts/Marketplace.vue +0 -363
- package/src/modules/marketplace/views/components/pages/Catalog.vue +0 -73
package/dist/martyrs.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, a as o, b as d, C as r, k as t, c as l, d as i, e as p, f as u, g as n, h as M, i as S, j as c, F as m, l as C, n as F, o as g, p as h, L as b, q as k, M as x, r as B, I, s as T, t as U, u as f, v as w, S as D, w as E, x as L, y as P, z as q, A as y, B as A, D as G, E as j, U as v, G as z, H, m as R } from "./main-
|
|
1
|
+
import { _ as e, a as o, b as d, C as r, k as t, c as l, d as i, e as p, f as u, g as n, h as M, i as S, j as c, F as m, l as C, n as F, o as g, p as h, L as b, q as k, M as x, r as B, I, s as T, t as U, u as f, v as w, S as D, w as E, x as L, y as P, z as q, A as y, B as A, D as G, E as j, U as v, G as z, H, m as R } from "./main-CmjWiDVF.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Address,
|
|
4
4
|
o as Breadcrumbs,
|
package/dist/music.server.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { c as coreabac } from "./core.abac-DUPBnlk6.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { C as CacheNamespaced } from "./core.cache-DALYFDdy.js";
|
|
3
|
+
import { L as LoggerNamespaced } from "./core.logger-C3q8A9dl.js";
|
|
4
|
+
import { C as CRUD } from "./crud-C7FSTUes.js";
|
|
5
|
+
import { A as ABAC } from "./abac-DYoheWuc.js";
|
|
5
6
|
import { V as Verifier, a as Validator } from "./core.verifier-gPPX_jhf.js";
|
|
6
7
|
import fs$1 from "fs";
|
|
7
8
|
import path$1 from "path";
|
package/dist/orders.server.js
CHANGED
|
@@ -4,8 +4,8 @@ import "./mailing-DuEFRsa3.js";
|
|
|
4
4
|
import { m as modelsFactory, a as applyProfileSchema } from "./profile.schema-CjLOfG7b.js";
|
|
5
5
|
import { a as applyOwnershipSchema } from "./ownership.schema-fwwDf_e5.js";
|
|
6
6
|
import { a as applyCredentialsSchema } from "./credentials.schema--2vvcu8c.js";
|
|
7
|
-
import { C as CRUD } from "./crud-
|
|
8
|
-
import { A as ABAC } from "./abac-
|
|
7
|
+
import { C as CRUD } from "./crud-C7FSTUes.js";
|
|
8
|
+
import { A as ABAC } from "./abac-DYoheWuc.js";
|
|
9
9
|
import axios from "axios";
|
|
10
10
|
import { V as Verifier, a as Validator } from "./core.verifier-gPPX_jhf.js";
|
|
11
11
|
import { m as middlewareIndexFactory } from "./index-_Edcmck_.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ABAC } from "./abac-
|
|
1
|
+
import { A as ABAC } from "./abac-DYoheWuc.js";
|
|
2
2
|
import { a as applyCredentialsSchema } from "./credentials.schema--2vvcu8c.js";
|
|
3
3
|
import { a as applyOwnershipSchema } from "./ownership.schema-fwwDf_e5.js";
|
|
4
4
|
import { a as applyEngagementSchema } from "./engagement.schema-fh6W1fb_.js";
|
|
@@ -8,10 +8,10 @@ import { uuid } from "uuidv4";
|
|
|
8
8
|
import { q as queryProcessorCore } from "./queryProcessor-CBQgZycY.js";
|
|
9
9
|
import { Types } from "mongoose";
|
|
10
10
|
import { c as coreabac } from "./core.abac-DUPBnlk6.js";
|
|
11
|
-
import { C as CacheNamespaced } from "./core.
|
|
11
|
+
import { C as CacheNamespaced } from "./core.cache-DALYFDdy.js";
|
|
12
12
|
import { a as addUserStatusFields, b as addMembersQuantity } from "./addUserStatusFields-Cc-JpmPo.js";
|
|
13
13
|
import jwt from "jsonwebtoken";
|
|
14
|
-
import
|
|
14
|
+
import { g as getRequestedLookups, a as getBasicMatchConditions, b as getLookupStages, c as getPostableConditions, d as getContainConditions, e as getPriceConditions, f as getLocationStages } from "./queryProcessorOrganizations-BB11WFpc.js";
|
|
15
15
|
import { V as Verifier, a as Validator } from "./core.verifier-gPPX_jhf.js";
|
|
16
16
|
const controllerFactory$2 = (db) => {
|
|
17
17
|
const Department = db.department;
|
|
@@ -666,7 +666,7 @@ const invitesRoutes = (function(app, db) {
|
|
|
666
666
|
app.put("/api/invites/update", controller.update);
|
|
667
667
|
app.post("/api/invites/delete", controller.delete);
|
|
668
668
|
});
|
|
669
|
-
const ObjectId
|
|
669
|
+
const ObjectId = { Types }.Types.ObjectId;
|
|
670
670
|
const controllerFactory$1 = (db) => {
|
|
671
671
|
const Membership = db.membership;
|
|
672
672
|
const Department = db.department;
|
|
@@ -694,9 +694,9 @@ const controllerFactory$1 = (db) => {
|
|
|
694
694
|
},
|
|
695
695
|
{
|
|
696
696
|
$match: {
|
|
697
|
-
...req.query.user && { user: new ObjectId
|
|
697
|
+
...req.query.user && { user: new ObjectId(req.query.user) },
|
|
698
698
|
...req.query.type && { type: req.query.type },
|
|
699
|
-
...req.query.target && { target: new ObjectId
|
|
699
|
+
...req.query.target && { target: new ObjectId(req.query.target) },
|
|
700
700
|
...req.query.role && { role: { $in: req.query.role } },
|
|
701
701
|
...req.query.search && {
|
|
702
702
|
$or: [
|
|
@@ -777,10 +777,10 @@ const controllerFactory$1 = (db) => {
|
|
|
777
777
|
const { _id, type, target, user, role } = req.body;
|
|
778
778
|
console.log("Delete membership request:", { _id, type, target, user, role });
|
|
779
779
|
try {
|
|
780
|
-
const query = _id ? { _id: new ObjectId
|
|
780
|
+
const query = _id ? { _id: new ObjectId(_id) } : {
|
|
781
781
|
type,
|
|
782
|
-
target: new ObjectId
|
|
783
|
-
user: new ObjectId
|
|
782
|
+
target: new ObjectId(target),
|
|
783
|
+
user: new ObjectId(user),
|
|
784
784
|
role
|
|
785
785
|
};
|
|
786
786
|
console.log("Delete query:", query);
|
|
@@ -881,211 +881,6 @@ const lookupConfigs = {
|
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
};
|
|
884
|
-
const ObjectId = { Types }.Types.ObjectId;
|
|
885
|
-
const { Client } = googleMapsServicesJs;
|
|
886
|
-
const client = new Client({});
|
|
887
|
-
const getRequestedLookups = (query) => query.lookup ? Array.isArray(query.lookup) ? query.lookup : [query.lookup] : [];
|
|
888
|
-
const getLookupStages = (requestedLookups, configs) => {
|
|
889
|
-
if (!requestedLookups) return [];
|
|
890
|
-
const lookupsArray = Array.isArray(requestedLookups) ? requestedLookups : requestedLookups.split(",");
|
|
891
|
-
return lookupsArray.map((lookup) => configs[lookup]).filter(Boolean).flatMap((config) => [
|
|
892
|
-
{ $lookup: config.lookup },
|
|
893
|
-
// Оберните lookup в объект с $lookup
|
|
894
|
-
...config.additionalStages || []
|
|
895
|
-
]);
|
|
896
|
-
};
|
|
897
|
-
const getLocationStages = async (query) => {
|
|
898
|
-
if (!hasLocationParams(query)) {
|
|
899
|
-
return { stages: [], userLocation: null };
|
|
900
|
-
}
|
|
901
|
-
const location = await resolveLocation(query);
|
|
902
|
-
const radius = getRadius(query);
|
|
903
|
-
const geoStages = radius ? [
|
|
904
|
-
{
|
|
905
|
-
$match: {
|
|
906
|
-
"spots.location.coordinates": {
|
|
907
|
-
$geoWithin: {
|
|
908
|
-
$centerSphere: [[location.coordinates[0], location.coordinates[1]], radius]
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
] : [];
|
|
914
|
-
return {
|
|
915
|
-
stages: [...geoStages, ...getDistanceStages(location)],
|
|
916
|
-
userLocation: location
|
|
917
|
-
};
|
|
918
|
-
};
|
|
919
|
-
const getRadius = (query) => {
|
|
920
|
-
if (query.locationRadius) return parseFloat(query.locationRadius) / 6378.1;
|
|
921
|
-
if (query.city) return 25 / 6378.1;
|
|
922
|
-
if (query.state) return 50 / 6378.1;
|
|
923
|
-
return null;
|
|
924
|
-
};
|
|
925
|
-
const hasLocationParams = (query) => query.location || query.address || query.city || query.state || query.country;
|
|
926
|
-
const resolveLocation = async (query) => {
|
|
927
|
-
if (query.location) {
|
|
928
|
-
const parsedLocation = typeof query.location === "string" ? JSON.parse(query.location) : query.location;
|
|
929
|
-
const coordinates = parsedLocation.lng ? [parsedLocation.lng, parsedLocation.lat] : parsedLocation.coordinates;
|
|
930
|
-
return { coordinates: coordinates.map((coord) => parseFloat(coord)) };
|
|
931
|
-
}
|
|
932
|
-
const searchString = [query.address, query.city, query.state, query.country].filter(Boolean).join(", ");
|
|
933
|
-
try {
|
|
934
|
-
const geoResponse = await client.geocode({
|
|
935
|
-
params: {
|
|
936
|
-
address: searchString,
|
|
937
|
-
key: process.env.GOOGLE_MAPS_API_KEY
|
|
938
|
-
}
|
|
939
|
-
});
|
|
940
|
-
if (!geoResponse.data.results?.length) {
|
|
941
|
-
throw new Error("Unable to geocode the provided location.");
|
|
942
|
-
}
|
|
943
|
-
const { lng, lat } = geoResponse.data.results[0].geometry.location;
|
|
944
|
-
return { coordinates: [lng, lat] };
|
|
945
|
-
} catch (err) {
|
|
946
|
-
throw new Error("Error occurred while geocoding.");
|
|
947
|
-
}
|
|
948
|
-
};
|
|
949
|
-
const getDistanceStages = (location) => [
|
|
950
|
-
{
|
|
951
|
-
$addFields: {
|
|
952
|
-
spots: {
|
|
953
|
-
$map: {
|
|
954
|
-
input: "$spots",
|
|
955
|
-
as: "spot",
|
|
956
|
-
in: {
|
|
957
|
-
$mergeObjects: [
|
|
958
|
-
"$$spot",
|
|
959
|
-
{
|
|
960
|
-
distance: {
|
|
961
|
-
$function: {
|
|
962
|
-
body: `function(spotCoords, userCoords, isMiles) {
|
|
963
|
-
function toRad(x) {
|
|
964
|
-
return x * Math.PI / 180;
|
|
965
|
-
}
|
|
966
|
-
var lon1 = spotCoords[0];
|
|
967
|
-
var lat1 = spotCoords[1];
|
|
968
|
-
var lon2 = userCoords[0];
|
|
969
|
-
var lat2 = userCoords[1];
|
|
970
|
-
var R = 6371;
|
|
971
|
-
if (isMiles) R = 3959;
|
|
972
|
-
var x1 = lat2 - lat1;
|
|
973
|
-
var dLat = toRad(x1);
|
|
974
|
-
var x2 = lon2 - lon1;
|
|
975
|
-
var dLon = toRad(x2);
|
|
976
|
-
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
|
977
|
-
Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) *
|
|
978
|
-
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
|
979
|
-
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
980
|
-
var d = R * c;
|
|
981
|
-
return d;
|
|
982
|
-
}`,
|
|
983
|
-
args: ["$$spot.location.coordinates", location.coordinates, false],
|
|
984
|
-
lang: "js"
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
]
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
},
|
|
994
|
-
{
|
|
995
|
-
$addFields: {
|
|
996
|
-
distance: { $min: "$spots.distance" },
|
|
997
|
-
distanceExist: {
|
|
998
|
-
$cond: {
|
|
999
|
-
if: { $eq: [{ $type: "$distance" }, "double"] },
|
|
1000
|
-
then: true,
|
|
1001
|
-
else: false
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
];
|
|
1007
|
-
const getPriceConditions = (prices) => {
|
|
1008
|
-
if (!prices) return [];
|
|
1009
|
-
const priceRanges = prices.split(",");
|
|
1010
|
-
const priceConditions = priceRanges.map((priceRange) => {
|
|
1011
|
-
if (priceRange.startsWith("<")) return { "products.price": { $lt: parseInt(priceRange.slice(1)) } };
|
|
1012
|
-
if (priceRange.startsWith(">")) return { "products.price": { $gt: parseInt(priceRange.slice(1)) } };
|
|
1013
|
-
const [min, max] = priceRange.split("-").map(Number);
|
|
1014
|
-
return { "products.price": { $gte: min, $lte: max } };
|
|
1015
|
-
});
|
|
1016
|
-
return priceConditions.length > 0 ? [{ $match: { $or: priceConditions } }] : [];
|
|
1017
|
-
};
|
|
1018
|
-
const getContainConditions = (contain) => {
|
|
1019
|
-
if (!contain) return [];
|
|
1020
|
-
const conditions = contain.map((property) => ({
|
|
1021
|
-
[property]: { $exists: true, $not: { $size: 0 } }
|
|
1022
|
-
}));
|
|
1023
|
-
return conditions.length > 0 ? [{ $match: { $and: conditions } }] : [];
|
|
1024
|
-
};
|
|
1025
|
-
const getBasicMatchConditions = (query) => [
|
|
1026
|
-
...query._id ? [{ _id: new ObjectId(query._id) }] : [],
|
|
1027
|
-
...query.owner ? [{ owner: new ObjectId(query.owner) }] : [],
|
|
1028
|
-
...query.types ? [{ types: { $in: query.types } }] : [],
|
|
1029
|
-
...query.member ? [
|
|
1030
|
-
{
|
|
1031
|
-
memberships: {
|
|
1032
|
-
$elemMatch: {
|
|
1033
|
-
user: new ObjectId(query.member),
|
|
1034
|
-
role: "member"
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
] : [],
|
|
1039
|
-
...query.subscriber ? [
|
|
1040
|
-
{
|
|
1041
|
-
memberships: {
|
|
1042
|
-
$elemMatch: {
|
|
1043
|
-
user: new ObjectId(query.subscriber),
|
|
1044
|
-
role: "subscriber"
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
] : [],
|
|
1049
|
-
...query.categories?.split(",").length > 0 ? [{ "products.category": { $in: query.categories?.split(",") } }] : [],
|
|
1050
|
-
...query.delivery?.split(",").length > 0 ? [{ "spots.delivery": { $all: query.delivery?.split(",") } }] : []
|
|
1051
|
-
];
|
|
1052
|
-
const getPostableConditions = (postableId) => {
|
|
1053
|
-
if (!postableId) return [];
|
|
1054
|
-
return [
|
|
1055
|
-
{
|
|
1056
|
-
$match: {
|
|
1057
|
-
$or: [
|
|
1058
|
-
{ owner: new ObjectId(postableId) },
|
|
1059
|
-
{
|
|
1060
|
-
$and: [
|
|
1061
|
-
{ types: { $elemMatch: { $eq: "public" } } },
|
|
1062
|
-
{
|
|
1063
|
-
memberships: {
|
|
1064
|
-
$elemMatch: {
|
|
1065
|
-
user: new ObjectId(postableId)
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
]
|
|
1070
|
-
},
|
|
1071
|
-
{
|
|
1072
|
-
$and: [
|
|
1073
|
-
{ types: { $elemMatch: { $in: ["exclusive", "hidden"] } } },
|
|
1074
|
-
{
|
|
1075
|
-
memberships: {
|
|
1076
|
-
$elemMatch: {
|
|
1077
|
-
user: new ObjectId(postableId),
|
|
1078
|
-
role: { $ne: "subscriber" }
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
]
|
|
1083
|
-
}
|
|
1084
|
-
]
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
];
|
|
1088
|
-
};
|
|
1089
884
|
const controllerFactory = (db) => {
|
|
1090
885
|
const Organization = db.organization;
|
|
1091
886
|
const Department = db.department;
|
|
@@ -1108,7 +903,7 @@ const controllerFactory = (db) => {
|
|
|
1108
903
|
...queryProcessorCore.getSearchOptions(req.query.search, {
|
|
1109
904
|
fields: requestedLookups.includes("products") ? ["profile.name", "products.name"] : ["profile.name"]
|
|
1110
905
|
}),
|
|
1111
|
-
...requestedLookups.includes("products") && req.query.prices ? getPriceConditions(req.query.prices) : [],
|
|
906
|
+
...requestedLookups.includes("products") && (req.query.prices || req.query.priceMin || req.query.priceMax) ? getPriceConditions(req.query.prices, req.query.priceMin, req.query.priceMax) : [],
|
|
1112
907
|
...requestedLookups.includes("spots") ? (await getLocationStages(req.query)).stages : [],
|
|
1113
908
|
...requestedLookups.includes("memberships") ? [addUserStatusFields(req.query.user), addMembersQuantity(req.query.user)] : [],
|
|
1114
909
|
...matchConditions.length > 0 ? [{ $match: { $and: matchConditions } }] : [],
|
package/dist/products.server.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as CacheNamespaced } from "./core.cache-DALYFDdy.js";
|
|
2
|
+
import { L as LoggerNamespaced } from "./core.logger-C3q8A9dl.js";
|
|
2
3
|
import { q as queryProcessorCore } from "./queryProcessor-CBQgZycY.js";
|
|
3
4
|
import OpenAI from "openai";
|
|
4
5
|
import { Types } from "mongoose";
|
|
@@ -9,8 +10,8 @@ import { a as applyOwnershipSchema } from "./ownership.schema-fwwDf_e5.js";
|
|
|
9
10
|
import { m as middlewareFactory } from "./authJwt-J1csaMWA.js";
|
|
10
11
|
import { c as coreabac } from "./core.abac-DUPBnlk6.js";
|
|
11
12
|
import { a as Validator, V as Verifier } from "./core.verifier-gPPX_jhf.js";
|
|
12
|
-
import { C as CRUD } from "./crud-
|
|
13
|
-
import { A as ABAC } from "./abac-
|
|
13
|
+
import { C as CRUD } from "./crud-C7FSTUes.js";
|
|
14
|
+
import { A as ABAC } from "./abac-DYoheWuc.js";
|
|
14
15
|
const controllerFactory$1 = (db) => {
|
|
15
16
|
const Category = db.category;
|
|
16
17
|
const logger = new LoggerNamespaced(db);
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import * as googleMapsServicesJs from "@googlemaps/google-maps-services-js";
|
|
2
|
+
import { Types } from "mongoose";
|
|
3
|
+
const ObjectId = { Types }.Types.ObjectId;
|
|
4
|
+
const { Client } = googleMapsServicesJs;
|
|
5
|
+
const client = new Client({});
|
|
6
|
+
const getRequestedLookups = (query) => query.lookup ? Array.isArray(query.lookup) ? query.lookup : [query.lookup] : [];
|
|
7
|
+
const getLookupStages = (requestedLookups, configs) => {
|
|
8
|
+
if (!requestedLookups) return [];
|
|
9
|
+
const lookupsArray = Array.isArray(requestedLookups) ? requestedLookups : requestedLookups.split(",");
|
|
10
|
+
return lookupsArray.map((lookup) => configs[lookup]).filter(Boolean).flatMap((config) => [
|
|
11
|
+
{ $lookup: config.lookup },
|
|
12
|
+
// Оберните lookup в объект с $lookup
|
|
13
|
+
...config.additionalStages || []
|
|
14
|
+
]);
|
|
15
|
+
};
|
|
16
|
+
const getLocationStages = async (query) => {
|
|
17
|
+
if (!hasLocationParams(query)) {
|
|
18
|
+
return { stages: [], userLocation: null };
|
|
19
|
+
}
|
|
20
|
+
const location = await resolveLocation(query);
|
|
21
|
+
const radius = getRadius(query);
|
|
22
|
+
const geoStages = radius ? [
|
|
23
|
+
{
|
|
24
|
+
$match: {
|
|
25
|
+
"spots.location.coordinates": {
|
|
26
|
+
$geoWithin: {
|
|
27
|
+
$centerSphere: [[location.coordinates[0], location.coordinates[1]], radius]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
] : [];
|
|
33
|
+
return {
|
|
34
|
+
stages: [...geoStages, ...getDistanceStages(location)],
|
|
35
|
+
userLocation: location
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
const getRadius = (query) => {
|
|
39
|
+
if (query.locationRadius) return parseFloat(query.locationRadius) / 6378.1;
|
|
40
|
+
if (query.city) return 25 / 6378.1;
|
|
41
|
+
if (query.state) return 50 / 6378.1;
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
44
|
+
const hasLocationParams = (query) => query.location || query.address || query.city || query.state || query.country;
|
|
45
|
+
const resolveLocation = async (query) => {
|
|
46
|
+
if (query.location) {
|
|
47
|
+
const parsedLocation = typeof query.location === "string" ? JSON.parse(query.location) : query.location;
|
|
48
|
+
const coordinates = parsedLocation.lng ? [parsedLocation.lng, parsedLocation.lat] : parsedLocation.coordinates;
|
|
49
|
+
return { coordinates: coordinates.map((coord) => parseFloat(coord)) };
|
|
50
|
+
}
|
|
51
|
+
const searchString = [query.address, query.city, query.state, query.country].filter(Boolean).join(", ");
|
|
52
|
+
try {
|
|
53
|
+
const geoResponse = await client.geocode({
|
|
54
|
+
params: {
|
|
55
|
+
address: searchString,
|
|
56
|
+
key: process.env.GOOGLE_MAPS_API_KEY
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
if (!geoResponse.data.results?.length) {
|
|
60
|
+
throw new Error("Unable to geocode the provided location.");
|
|
61
|
+
}
|
|
62
|
+
const { lng, lat } = geoResponse.data.results[0].geometry.location;
|
|
63
|
+
return { coordinates: [lng, lat] };
|
|
64
|
+
} catch (err) {
|
|
65
|
+
throw new Error("Error occurred while geocoding.");
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const getDistanceStages = (location) => [
|
|
69
|
+
{
|
|
70
|
+
$addFields: {
|
|
71
|
+
spots: {
|
|
72
|
+
$map: {
|
|
73
|
+
input: "$spots",
|
|
74
|
+
as: "spot",
|
|
75
|
+
in: {
|
|
76
|
+
$mergeObjects: [
|
|
77
|
+
"$$spot",
|
|
78
|
+
{
|
|
79
|
+
distance: {
|
|
80
|
+
$function: {
|
|
81
|
+
body: `function(spotCoords, userCoords, isMiles) {
|
|
82
|
+
function toRad(x) {
|
|
83
|
+
return x * Math.PI / 180;
|
|
84
|
+
}
|
|
85
|
+
var lon1 = spotCoords[0];
|
|
86
|
+
var lat1 = spotCoords[1];
|
|
87
|
+
var lon2 = userCoords[0];
|
|
88
|
+
var lat2 = userCoords[1];
|
|
89
|
+
var R = 6371;
|
|
90
|
+
if (isMiles) R = 3959;
|
|
91
|
+
var x1 = lat2 - lat1;
|
|
92
|
+
var dLat = toRad(x1);
|
|
93
|
+
var x2 = lon2 - lon1;
|
|
94
|
+
var dLon = toRad(x2);
|
|
95
|
+
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
|
96
|
+
Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) *
|
|
97
|
+
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
|
98
|
+
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
99
|
+
var d = R * c;
|
|
100
|
+
return d;
|
|
101
|
+
}`,
|
|
102
|
+
args: ["$$spot.location.coordinates", location.coordinates, false],
|
|
103
|
+
lang: "js"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
$addFields: {
|
|
115
|
+
distance: { $min: "$spots.distance" },
|
|
116
|
+
distanceExist: {
|
|
117
|
+
$cond: {
|
|
118
|
+
if: { $eq: [{ $type: "$distance" }, "double"] },
|
|
119
|
+
then: true,
|
|
120
|
+
else: false
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
];
|
|
126
|
+
const getPriceConditions = (prices, priceMin, priceMax) => {
|
|
127
|
+
if (priceMin && priceMin.trim() !== "" || priceMax && priceMax.trim() !== "") {
|
|
128
|
+
const min = priceMin && priceMin.trim() !== "" ? priceMin : "0";
|
|
129
|
+
const max = priceMax && priceMax.trim() !== "" ? priceMax : "999999";
|
|
130
|
+
prices = `${min}-${max}`;
|
|
131
|
+
}
|
|
132
|
+
if (!prices) return [];
|
|
133
|
+
const priceRanges = prices.split(",");
|
|
134
|
+
const priceConditions = priceRanges.map((priceRange) => {
|
|
135
|
+
if (priceRange.startsWith("<")) return { "products.price": { $lt: parseInt(priceRange.slice(1)) } };
|
|
136
|
+
if (priceRange.startsWith(">")) return { "products.price": { $gt: parseInt(priceRange.slice(1)) } };
|
|
137
|
+
const [min, max] = priceRange.split("-").map(Number);
|
|
138
|
+
return { "products.price": { $gte: min, $lte: max } };
|
|
139
|
+
});
|
|
140
|
+
return priceConditions.length > 0 ? [{ $match: { $or: priceConditions } }] : [];
|
|
141
|
+
};
|
|
142
|
+
const getContainConditions = (contain) => {
|
|
143
|
+
if (!contain) return [];
|
|
144
|
+
const conditions = contain.map((property) => ({
|
|
145
|
+
[property]: { $exists: true, $not: { $size: 0 } }
|
|
146
|
+
}));
|
|
147
|
+
return conditions.length > 0 ? [{ $match: { $and: conditions } }] : [];
|
|
148
|
+
};
|
|
149
|
+
const getBasicMatchConditions = (query) => [
|
|
150
|
+
...query._id ? [{ _id: new ObjectId(query._id) }] : [],
|
|
151
|
+
...query.owner ? [{ owner: new ObjectId(query.owner) }] : [],
|
|
152
|
+
...query.types ? [{ types: { $in: query.types } }] : [],
|
|
153
|
+
...query.member ? [
|
|
154
|
+
{
|
|
155
|
+
memberships: {
|
|
156
|
+
$elemMatch: {
|
|
157
|
+
user: new ObjectId(query.member),
|
|
158
|
+
role: "member"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
] : [],
|
|
163
|
+
...query.subscriber ? [
|
|
164
|
+
{
|
|
165
|
+
memberships: {
|
|
166
|
+
$elemMatch: {
|
|
167
|
+
user: new ObjectId(query.subscriber),
|
|
168
|
+
role: "subscriber"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
] : [],
|
|
173
|
+
...query.categories?.split(",").length > 0 ? [{ "products.category": { $in: query.categories?.split(",") } }] : [],
|
|
174
|
+
...query.delivery?.split(",").length > 0 ? [{ "spots.delivery": { $all: query.delivery?.split(",") } }] : []
|
|
175
|
+
];
|
|
176
|
+
const getPostableConditions = (postableId) => {
|
|
177
|
+
if (!postableId) return [];
|
|
178
|
+
return [
|
|
179
|
+
{
|
|
180
|
+
$match: {
|
|
181
|
+
$or: [
|
|
182
|
+
{ owner: new ObjectId(postableId) },
|
|
183
|
+
{
|
|
184
|
+
$and: [
|
|
185
|
+
{ types: { $elemMatch: { $eq: "public" } } },
|
|
186
|
+
{
|
|
187
|
+
memberships: {
|
|
188
|
+
$elemMatch: {
|
|
189
|
+
user: new ObjectId(postableId)
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
$and: [
|
|
197
|
+
{ types: { $elemMatch: { $in: ["exclusive", "hidden"] } } },
|
|
198
|
+
{
|
|
199
|
+
memberships: {
|
|
200
|
+
$elemMatch: {
|
|
201
|
+
user: new ObjectId(postableId),
|
|
202
|
+
role: { $ne: "subscriber" }
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
};
|
|
213
|
+
export {
|
|
214
|
+
getBasicMatchConditions as a,
|
|
215
|
+
getLookupStages as b,
|
|
216
|
+
getPostableConditions as c,
|
|
217
|
+
getContainConditions as d,
|
|
218
|
+
getPriceConditions as e,
|
|
219
|
+
getLocationStages as f,
|
|
220
|
+
getRequestedLookups as g
|
|
221
|
+
};
|
package/dist/rents.server.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { m as middlewareIndexFactory } from "./index-_Edcmck_.js";
|
|
2
2
|
import { c as coreabac } from "./core.abac-DUPBnlk6.js";
|
|
3
|
-
import {
|
|
3
|
+
import { C as CacheNamespaced } from "./core.cache-DALYFDdy.js";
|
|
4
|
+
import { L as LoggerNamespaced } from "./core.logger-C3q8A9dl.js";
|
|
4
5
|
import { V as Verifier, a as Validator } from "./core.verifier-gPPX_jhf.js";
|
|
5
6
|
import { q as queryProcessorCore } from "./queryProcessor-CBQgZycY.js";
|
|
6
7
|
const queryValidatorConfig = {
|
package/dist/style.css
CHANGED
|
@@ -801,11 +801,20 @@ button[data-v-54787afa]:disabled {
|
|
|
801
801
|
transform: translate(-50%, -100%);
|
|
802
802
|
margin-top: -8px;
|
|
803
803
|
}
|
|
804
|
+
.filter-checkbox[data-v-d3175613] {
|
|
805
|
+
max-height: 300px;
|
|
806
|
+
overflow-y: auto;
|
|
807
|
+
}
|
|
808
|
+
|
|
804
809
|
.icon-custom {
|
|
805
810
|
background: white;
|
|
806
811
|
}
|
|
807
812
|
|
|
808
|
-
.
|
|
813
|
+
.filter-date-range[data-v-dbe77cee] {
|
|
814
|
+
width: 100%;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.filters-content[data-v-2c930cac] {
|
|
809
818
|
max-height: 60vh;
|
|
810
819
|
overflow-y: auto;
|
|
811
820
|
}
|
package/package.json
CHANGED
|
@@ -137,7 +137,7 @@ async function Submit() {
|
|
|
137
137
|
</Transition>
|
|
138
138
|
|
|
139
139
|
<!-- Counter -->
|
|
140
|
-
<div v-if="counter" class="button-counter flex flex-center">
|
|
140
|
+
<div v-if="counter" class="button-counter font-second flex flex-center">
|
|
141
141
|
<span>{{ counter }}</span>
|
|
142
142
|
</div>
|
|
143
143
|
</button>
|
|
@@ -354,15 +354,11 @@
|
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
store.core.state.isOpenLocationPopup = true;
|
|
363
|
-
} else {
|
|
364
|
-
store.core.state.isOpenLocationPopup = false;
|
|
365
|
-
}
|
|
357
|
+
if (!store.core.state.position && route.meta.location) {
|
|
358
|
+
store.core.state.isOpenLocationPopup = true;
|
|
359
|
+
} else {
|
|
360
|
+
store.core.state.isOpenLocationPopup = false;
|
|
361
|
+
}
|
|
366
362
|
|
|
367
363
|
if (referalCode.value) {
|
|
368
364
|
localStorage.setItem('referalCode', referalCode.value);
|
|
@@ -373,11 +369,11 @@
|
|
|
373
369
|
|
|
374
370
|
const componentKey = computed(() => {
|
|
375
371
|
// Собираем только значимые параметры (ID сущностей)
|
|
376
|
-
const significantParams = ['_id', 'product', 'organization', 'categoryPath']
|
|
372
|
+
const significantParams = ['_id', 'product', 'organization', 'categoryPath', 'country', 'state', 'city']
|
|
377
373
|
.map(param => route.params[param])
|
|
378
374
|
.filter(Boolean)
|
|
379
375
|
.join('-');
|
|
380
|
-
|
|
376
|
+
|
|
381
377
|
return significantParams || route.name;
|
|
382
378
|
});
|
|
383
379
|
</script>
|