@ozdao/martyrs 0.2.560 → 0.2.562
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/{main-DQtUY5ma.js → main-TV4u6Jux.js} +2915 -2626
- package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +3 -3
- package/dist/martyrs/src/components/Button/Button.vue.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/Dropdown/{Dropdown.vue2.js → Dropdown.vue.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/Field/{Field.vue.js → Field.vue2.js} +2 -2
- package/dist/martyrs/src/components/Field/Field.vue2.js.map +1 -0
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +2 -2
- package/dist/martyrs/src/components/Select/{Select.vue.js → Select.vue2.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue2.js.map +1 -0
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js → SelectMulti.vue.js} +2 -2
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.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/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- 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 +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +2 -2
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.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 +2 -2
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +2 -2
- 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 +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js +59 -171
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +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 +168 -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 +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +4 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +3 -3
- 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 +3 -3
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +4 -4
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +159 -239
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js +5 -6
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js.map +1 -1
- 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 +3 -3
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- 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 +2 -2
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- 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/notifications/components/pages/Notifications.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +3 -3
- 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 +3 -3
- package/dist/martyrs/src/modules/orders/components/pages/Orders.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 +4 -2
- 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 +3 -3
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +2 -2
- 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 +5 -5
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- 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 +6 -4
- 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 +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +5 -5
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +3 -3
- 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 +2 -2
- package/dist/martyrs/src/modules/products/products.client.js +3 -1
- package/dist/martyrs/src/modules/products/products.client.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +3 -3
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.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 +2 -2
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +3 -3
- 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 +4 -4
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- 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/organizations.server.js +7 -2
- package/dist/style.css +10 -1
- package/dist/{web-Cyc6i_pv.js → web-Cq5tyhkl.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 +178 -0
- package/src/modules/core/views/utils/vue-app-renderer.js +12 -0
- 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.server.js +22 -0
- package/src/modules/marketplace/routes/marketplace.routes.js +34 -0
- package/src/modules/marketplace/views/components/layouts/Marketplace.vue +194 -275
- package/src/modules/marketplace/views/components/pages/Catalog.vue +6 -5
- package/src/modules/marketplace/views/router/marketplace.router.js +43 -28
- 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/src/modules/products/products.client.js +3 -0
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Field/Field.vue.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue.js.map +0 -1
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +0 -1
- package/src/modules/core/views/components/sections/filters/FilterPrice.vue +0 -81
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-TV4u6Jux.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Address,
|
|
4
4
|
o as Breadcrumbs,
|
|
@@ -1004,7 +1004,12 @@ const getDistanceStages = (location) => [
|
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
1006
|
];
|
|
1007
|
-
const getPriceConditions = (prices) => {
|
|
1007
|
+
const getPriceConditions = (prices, priceMin, priceMax) => {
|
|
1008
|
+
if (priceMin && priceMin.trim() !== "" || priceMax && priceMax.trim() !== "") {
|
|
1009
|
+
const min = priceMin && priceMin.trim() !== "" ? priceMin : "0";
|
|
1010
|
+
const max = priceMax && priceMax.trim() !== "" ? priceMax : "999999";
|
|
1011
|
+
prices = `${min}-${max}`;
|
|
1012
|
+
}
|
|
1008
1013
|
if (!prices) return [];
|
|
1009
1014
|
const priceRanges = prices.split(",");
|
|
1010
1015
|
const priceConditions = priceRanges.map((priceRange) => {
|
|
@@ -1108,7 +1113,7 @@ const controllerFactory = (db) => {
|
|
|
1108
1113
|
...queryProcessorCore.getSearchOptions(req.query.search, {
|
|
1109
1114
|
fields: requestedLookups.includes("products") ? ["profile.name", "products.name"] : ["profile.name"]
|
|
1110
1115
|
}),
|
|
1111
|
-
...requestedLookups.includes("products") && req.query.prices ? getPriceConditions(req.query.prices) : [],
|
|
1116
|
+
...requestedLookups.includes("products") && (req.query.prices || req.query.priceMin || req.query.priceMax) ? getPriceConditions(req.query.prices, req.query.priceMin, req.query.priceMax) : [],
|
|
1112
1117
|
...requestedLookups.includes("spots") ? (await getLocationStages(req.query)).stages : [],
|
|
1113
1118
|
...requestedLookups.includes("memberships") ? [addUserStatusFields(req.query.user), addMembersQuantity(req.query.user)] : [],
|
|
1114
1119
|
...matchConditions.length > 0 ? [{ $match: { $and: matchConditions } }] : [],
|
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>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex t-nowrap gap-thin">
|
|
2
|
+
<div class="flex o-x-scroll scroll-hide t-nowrap gap-thin">
|
|
3
3
|
<!-- All Filters Button -->
|
|
4
4
|
<button
|
|
5
5
|
@click="showAllFilters = true"
|
|
6
6
|
class="pd-small radius-medium bg-light flex-v-center flex gap-micro cursor-pointer"
|
|
7
7
|
:class="{ 'bg-main': activeFiltersCount > 0 }"
|
|
8
8
|
>
|
|
9
|
-
<IconFilter class="i-
|
|
9
|
+
<IconFilter class="i-regular" />
|
|
10
10
|
<span class="h-1r"></span>
|
|
11
11
|
<span v-if="activeFiltersCount">{{ activeFiltersCount }}</span>
|
|
12
12
|
</button>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
class="pd-small radius-medium bg-light cursor-pointer flex-v-center flex gap-micro"
|
|
20
20
|
:class="{ 'selected bg-main': isFilterActive(filter) }"
|
|
21
21
|
>
|
|
22
|
-
<IconCalendar v-if="filter.type === 'date'" class="mn-r-micro i-
|
|
22
|
+
<IconCalendar v-if="filter.type === 'date'" class="mn-r-micro i-regular" />
|
|
23
23
|
<span class="t-nowrap">{{ filter.type === 'date' && getFilterValue(filter) ? formatFilterValue(filter) : filter.title }}</span>
|
|
24
24
|
<span v-if="getFilterValue(filter) && filter.type !== 'date'" class="mn-l-micro">
|
|
25
25
|
{{ formatFilterValue(filter) }}
|
|
@@ -29,95 +29,19 @@
|
|
|
29
29
|
<!-- All Filters Popup -->
|
|
30
30
|
<Popup
|
|
31
31
|
:isPopupOpen="showAllFilters"
|
|
32
|
-
@close-popup="
|
|
32
|
+
@close-popup="closeAllFilters"
|
|
33
33
|
:align="isPhone() ? 'bottom center' : 'center center'"
|
|
34
34
|
class="w-min-20r bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium"
|
|
35
35
|
>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
>
|
|
46
|
-
<h4 class="mn-b-small">{{ filter.title }}</h4>
|
|
47
|
-
|
|
48
|
-
<!-- Checkbox Filter -->
|
|
49
|
-
<div v-if="filter.type === 'checkbox'">
|
|
50
|
-
<Checkbox
|
|
51
|
-
v-for="option in filter.options"
|
|
52
|
-
:key="option.value"
|
|
53
|
-
:label="option.label"
|
|
54
|
-
:value="option.value"
|
|
55
|
-
v-model:radio="tempSelected[filter.value]"
|
|
56
|
-
mode="checkbox"
|
|
57
|
-
class="mn-b-micro"
|
|
58
|
-
/>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<!-- Radio Filter -->
|
|
62
|
-
<div v-else-if="filter.type === 'radio'">
|
|
63
|
-
<div
|
|
64
|
-
v-for="option in filter.options"
|
|
65
|
-
:key="option.value"
|
|
66
|
-
@click="tempSelected[filter.value] = option.value"
|
|
67
|
-
class="pd-small radius-small cursor-pointer mn-b-micro"
|
|
68
|
-
:class="{
|
|
69
|
-
'bg-main': tempSelected[filter.value] === option.value,
|
|
70
|
-
'bg-light': tempSelected[filter.value] !== option.value
|
|
71
|
-
}"
|
|
72
|
-
>
|
|
73
|
-
{{ option.label }}
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<!-- Range Filter -->
|
|
78
|
-
<div v-else-if="filter.type === 'range'" class="flex gap-thin">
|
|
79
|
-
<Field
|
|
80
|
-
v-model:field="tempSelected[filter.value].min"
|
|
81
|
-
:placeholder="filter.minPlaceholder || 'Min'"
|
|
82
|
-
type="number"
|
|
83
|
-
:label="returnCurrency()"
|
|
84
|
-
class="w-50 bg-light pd-small radius-small"
|
|
85
|
-
/>
|
|
86
|
-
<Field
|
|
87
|
-
v-model:field="tempSelected[filter.value].max"
|
|
88
|
-
:placeholder="filter.maxPlaceholder || 'Max'"
|
|
89
|
-
type="number"
|
|
90
|
-
:label="returnCurrency()"
|
|
91
|
-
class="w-50 bg-light pd-small radius-small"
|
|
92
|
-
/>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
<!-- Date Filter -->
|
|
96
|
-
<div v-else-if="filter.type === 'date'">
|
|
97
|
-
<Calendar
|
|
98
|
-
v-model:date="tempSelected[filter.value]"
|
|
99
|
-
:allowRange="true"
|
|
100
|
-
:disablePastDates="true"
|
|
101
|
-
class="bg-light radius-small"
|
|
102
|
-
/>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<div class="flex gap-thin mn-t-medium">
|
|
108
|
-
<button
|
|
109
|
-
@click="applyAllFilters"
|
|
110
|
-
class="button bg-main flex-child-full"
|
|
111
|
-
>
|
|
112
|
-
Apply
|
|
113
|
-
</button>
|
|
114
|
-
<button
|
|
115
|
-
@click="resetFilters"
|
|
116
|
-
class="button bg-light"
|
|
117
|
-
>
|
|
118
|
-
Reset Filters
|
|
119
|
-
</button>
|
|
120
|
-
</div>
|
|
36
|
+
<FiltersGroup
|
|
37
|
+
:filters="filters"
|
|
38
|
+
v-model:selected="tempSelected"
|
|
39
|
+
:immediate="false"
|
|
40
|
+
:showHeader="true"
|
|
41
|
+
:showApplyButton="true"
|
|
42
|
+
:showResetButton="true"
|
|
43
|
+
@update:selected="applyAllFilters"
|
|
44
|
+
/>
|
|
121
45
|
</Popup>
|
|
122
46
|
|
|
123
47
|
<!-- Individual Filter Popups -->
|
|
@@ -125,58 +49,27 @@
|
|
|
125
49
|
v-for="filter in filters"
|
|
126
50
|
:key="`popup-${filter.value}`"
|
|
127
51
|
:isPopupOpen="individualPopups[filter.value]"
|
|
128
|
-
@close-popup="
|
|
52
|
+
@close-popup="cancelFilter(filter.value)"
|
|
129
53
|
:align="isPhone() ? 'bottom center' : 'center center'"
|
|
130
54
|
class="bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium"
|
|
131
55
|
>
|
|
132
56
|
<h4 class="mn-b-medium">{{ filter.title }}</h4>
|
|
133
|
-
|
|
134
|
-
<!-- Checkbox Filter -->
|
|
135
|
-
<div v-if="filter.type === 'checkbox'">
|
|
136
|
-
<Checkbox
|
|
137
|
-
v-for="option in filter.options"
|
|
138
|
-
:key="option.value"
|
|
139
|
-
:label="option.label"
|
|
140
|
-
:value="option.value"
|
|
141
|
-
v-model:radio="tempSelected[filter.value]"
|
|
142
|
-
mode="checkbox"
|
|
143
|
-
class="mn-b-micro"
|
|
144
|
-
/>
|
|
145
|
-
</div>
|
|
146
57
|
|
|
147
|
-
<!--
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
class="pd-small radius-small cursor-pointer mn-b-micro"
|
|
154
|
-
:class="{
|
|
155
|
-
'bg-main': tempSelected[filter.value] === option.value,
|
|
156
|
-
'bg-light': tempSelected[filter.value] !== option.value
|
|
157
|
-
}"
|
|
158
|
-
>
|
|
159
|
-
{{ option.label }}
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
58
|
+
<!-- Checkbox Filter -->
|
|
59
|
+
<FilterCheckbox
|
|
60
|
+
v-if="filter.type === 'checkbox'"
|
|
61
|
+
v-model="tempSelected[filter.value]"
|
|
62
|
+
:options="filter.options"
|
|
63
|
+
/>
|
|
162
64
|
|
|
163
65
|
<!-- Range Filter -->
|
|
164
|
-
<
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
/>
|
|
172
|
-
<Field
|
|
173
|
-
v-model:field="tempSelected[filter.value].max"
|
|
174
|
-
:placeholder="filter.maxPlaceholder || 'Max'"
|
|
175
|
-
type="number"
|
|
176
|
-
:label="returnCurrency()"
|
|
177
|
-
class="w-50 bg-light pd-small radius-small"
|
|
178
|
-
/>
|
|
179
|
-
</div>
|
|
66
|
+
<FilterRange
|
|
67
|
+
v-else-if="filter.type === 'range'"
|
|
68
|
+
v-model="tempSelected[filter.value]"
|
|
69
|
+
:minPlaceholder="filter.minPlaceholder || 'Min'"
|
|
70
|
+
:maxPlaceholder="filter.maxPlaceholder || 'Max'"
|
|
71
|
+
:label="filter.label"
|
|
72
|
+
/>
|
|
180
73
|
|
|
181
74
|
<!-- Date Filter -->
|
|
182
75
|
<div v-else-if="filter.type === 'date'">
|
|
@@ -190,21 +83,26 @@
|
|
|
190
83
|
</div>
|
|
191
84
|
</div>
|
|
192
85
|
|
|
86
|
+
<!-- Radio/Options Filter -->
|
|
87
|
+
<FilterOptions
|
|
88
|
+
v-else-if="filter.type === 'radio'"
|
|
89
|
+
v-model="tempSelected[filter.value]"
|
|
90
|
+
:options="filter.options"
|
|
91
|
+
/>
|
|
92
|
+
|
|
193
93
|
<div class="flex gap-thin mn-t-medium">
|
|
194
|
-
|
|
195
|
-
@click="cancelFilter(filter.value)"
|
|
94
|
+
<button
|
|
95
|
+
@click="cancelFilter(filter.value)"
|
|
196
96
|
class="bg-light button flex-child-full"
|
|
197
97
|
>
|
|
198
98
|
Cancel
|
|
199
99
|
</button>
|
|
200
|
-
|
|
201
|
-
@click="applyFilter(filter.value)"
|
|
100
|
+
<button
|
|
101
|
+
@click="applyFilter(filter.value)"
|
|
202
102
|
class="bg-main w-100 button flex-child-full"
|
|
203
103
|
>
|
|
204
104
|
Apply
|
|
205
105
|
</button>
|
|
206
|
-
|
|
207
|
-
|
|
208
106
|
</div>
|
|
209
107
|
</Popup>
|
|
210
108
|
</div>
|
|
@@ -214,9 +112,12 @@
|
|
|
214
112
|
import { ref, computed, reactive, watch } from 'vue'
|
|
215
113
|
import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js'
|
|
216
114
|
import Popup from '@martyrs/src/components/Popup/Popup.vue'
|
|
217
|
-
import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'
|
|
218
|
-
import Field from '@martyrs/src/components/Field/Field.vue'
|
|
219
115
|
import Calendar from '@martyrs/src/components/Calendar/Calendar.vue'
|
|
116
|
+
import FiltersGroup from './filters/FiltersGroup.vue'
|
|
117
|
+
import FilterCheckbox from './filters/FilterCheckbox.vue'
|
|
118
|
+
import FilterRange from './filters/FilterRange.vue'
|
|
119
|
+
import FilterDateRange from './filters/FilterDateRange.vue'
|
|
120
|
+
import FilterOptions from './filters/FilterOptions.vue'
|
|
220
121
|
import IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'
|
|
221
122
|
import IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue'
|
|
222
123
|
import IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'
|
|
@@ -367,8 +268,8 @@ const cancelFilter = (filterValue) => {
|
|
|
367
268
|
individualPopups[filterValue] = false
|
|
368
269
|
}
|
|
369
270
|
|
|
370
|
-
const applyAllFilters = () => {
|
|
371
|
-
Object.entries(
|
|
271
|
+
const applyAllFilters = (newValues) => {
|
|
272
|
+
Object.entries(newValues).forEach(([key, value]) => {
|
|
372
273
|
if (selected.value[key] !== value) {
|
|
373
274
|
selected.value[key] = value
|
|
374
275
|
emit('select', { filter: key, value })
|
|
@@ -377,23 +278,8 @@ const applyAllFilters = () => {
|
|
|
377
278
|
showAllFilters.value = false
|
|
378
279
|
}
|
|
379
280
|
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
if (filter.type === 'checkbox') {
|
|
383
|
-
tempSelected[filter.value] = []
|
|
384
|
-
selected.value[filter.value] = []
|
|
385
|
-
} else if (filter.type === 'range') {
|
|
386
|
-
tempSelected[filter.value] = { min: '', max: '' }
|
|
387
|
-
selected.value[filter.value] = { min: '', max: '' }
|
|
388
|
-
} else if (filter.type === 'date') {
|
|
389
|
-
tempSelected[filter.value] = null
|
|
390
|
-
selected.value[filter.value] = null
|
|
391
|
-
} else {
|
|
392
|
-
tempSelected[filter.value] = null
|
|
393
|
-
selected.value[filter.value] = null
|
|
394
|
-
}
|
|
395
|
-
emit('select', { filter: filter.value, value: null })
|
|
396
|
-
})
|
|
281
|
+
const closeAllFilters = () => {
|
|
282
|
+
showAllFilters.value = false
|
|
397
283
|
}
|
|
398
284
|
</script>
|
|
399
285
|
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
<!-- FilterCheckbox.vue -->
|
|
2
2
|
<template>
|
|
3
3
|
<div class="filter-checkbox">
|
|
4
|
-
<
|
|
4
|
+
<Checkbox
|
|
5
5
|
v-for="(option, index) in normalizedOptions"
|
|
6
6
|
:key="option.value"
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
v-model:radio="model"
|
|
8
|
+
:label="option.label"
|
|
9
|
+
:value="option.value"
|
|
10
|
+
mode="checkbox"
|
|
11
|
+
class="br-solid br-1px br-light pd-small radius-small mn-b-micro"
|
|
12
|
+
@update:radio="emit('apply')"
|
|
13
|
+
/>
|
|
13
14
|
</div>
|
|
14
15
|
</template>
|
|
15
16
|
|
|
16
17
|
<script setup>
|
|
17
|
-
import {
|
|
18
|
+
import { computed } from 'vue'
|
|
19
|
+
import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'
|
|
18
20
|
|
|
19
21
|
const props = defineProps({
|
|
20
22
|
options: {
|
|
@@ -28,14 +30,12 @@ const model = defineModel({
|
|
|
28
30
|
default: () => []
|
|
29
31
|
})
|
|
30
32
|
|
|
31
|
-
const emit = defineEmits(['
|
|
32
|
-
|
|
33
|
-
const localValue = ref([...(model.value || [])])
|
|
33
|
+
const emit = defineEmits(['apply'])
|
|
34
34
|
|
|
35
35
|
// Normalize options to always have label and value
|
|
36
36
|
const normalizedOptions = computed(() => {
|
|
37
37
|
if (!props.options || !Array.isArray(props.options)) return []
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
return props.options.map((option, index) => {
|
|
40
40
|
if (typeof option === 'string') {
|
|
41
41
|
return { label: option, value: option }
|
|
@@ -49,25 +49,6 @@ const normalizedOptions = computed(() => {
|
|
|
49
49
|
return { label: String(option), value: `option-${index}` }
|
|
50
50
|
})
|
|
51
51
|
})
|
|
52
|
-
|
|
53
|
-
const isSelected = (value) => {
|
|
54
|
-
return localValue.value.includes(value)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const toggleOption = (value) => {
|
|
58
|
-
const idx = localValue.value.indexOf(value)
|
|
59
|
-
if (idx > -1) {
|
|
60
|
-
localValue.value.splice(idx, 1)
|
|
61
|
-
} else {
|
|
62
|
-
localValue.value.push(value)
|
|
63
|
-
}
|
|
64
|
-
model.value = [...localValue.value]
|
|
65
|
-
emit('apply')
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
watch(() => model.value, (newVal) => {
|
|
69
|
-
localValue.value = [...(newVal || [])]
|
|
70
|
-
}, { deep: true })
|
|
71
52
|
</script>
|
|
72
53
|
|
|
73
54
|
<style scoped>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<!-- FilterDateRange.vue -->
|
|
2
2
|
<template>
|
|
3
3
|
<div class="filter-date-range">
|
|
4
|
-
<!-- Quick options -->
|
|
5
|
-
<div
|
|
4
|
+
<!-- Quick options (only if provided) -->
|
|
5
|
+
<div
|
|
6
|
+
v-if="dateOptions.length > 0"
|
|
6
7
|
v-for="option in dateOptions"
|
|
7
8
|
:key="option.value"
|
|
8
9
|
@click="selectOption(option.value)"
|
|
@@ -11,19 +12,21 @@
|
|
|
11
12
|
>
|
|
12
13
|
{{ option.label }}
|
|
13
14
|
</div>
|
|
14
|
-
|
|
15
|
-
<!-- Custom dates -->
|
|
16
|
-
<div
|
|
17
|
-
@click="() => {
|
|
18
|
-
:class="{ 'bg-light':
|
|
19
|
-
class="pd-small radius-small cursor-pointer hover-bg-light transition-all
|
|
15
|
+
|
|
16
|
+
<!-- Custom dates with icon (like in Products) -->
|
|
17
|
+
<div
|
|
18
|
+
@click="() => { showCalendar = true }"
|
|
19
|
+
:class="{ 'bg-light': model }"
|
|
20
|
+
class="pd-small field-wrapper radius-small bg-light cursor-pointer hover-bg-light transition-all flex-v-center flex gap-thin"
|
|
20
21
|
>
|
|
21
|
-
|
|
22
|
+
<IconCalendar class="i-medium" />
|
|
23
|
+
<span>{{ dateRangeLabel }}</span>
|
|
22
24
|
</div>
|
|
23
25
|
|
|
24
26
|
<!-- Calendar Popup -->
|
|
25
27
|
<Popup
|
|
26
|
-
|
|
28
|
+
:isPopupOpen="showCalendar"
|
|
29
|
+
@close-popup="showCalendar = false"
|
|
27
30
|
class="pd-medium bg-white radius-medium"
|
|
28
31
|
style="min-width: 350px;"
|
|
29
32
|
>
|
|
@@ -58,6 +61,7 @@
|
|
|
58
61
|
import { ref, computed, watch } from 'vue'
|
|
59
62
|
import Calendar from '@martyrs/src/components/Calendar/Calendar.vue'
|
|
60
63
|
import Popup from '@martyrs/src/components/Popup/Popup.vue'
|
|
64
|
+
import IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'
|
|
61
65
|
import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js'
|
|
62
66
|
|
|
63
67
|
const { formatDate } = useGlobalMixins()
|
|
@@ -65,11 +69,7 @@ const { formatDate } = useGlobalMixins()
|
|
|
65
69
|
const props = defineProps({
|
|
66
70
|
dateOptions: {
|
|
67
71
|
type: Array,
|
|
68
|
-
default: () => [
|
|
69
|
-
{ label: 'Available today', value: 'today' },
|
|
70
|
-
{ label: 'This week', value: 'week' },
|
|
71
|
-
{ label: 'This month', value: 'month' }
|
|
72
|
-
]
|
|
72
|
+
default: () => []
|
|
73
73
|
}
|
|
74
74
|
})
|
|
75
75
|
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
<!-- filters/FilterOptions.vue -->
|
|
2
2
|
<template>
|
|
3
3
|
<div class="filter-options">
|
|
4
|
-
<
|
|
4
|
+
<Checkbox
|
|
5
5
|
v-for="option in options"
|
|
6
6
|
:key="option.value"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/>
|
|
15
|
-
<span>{{ option.label }}</span>
|
|
16
|
-
</div>
|
|
7
|
+
v-model:radio="model"
|
|
8
|
+
:label="option.label"
|
|
9
|
+
:value="option.value"
|
|
10
|
+
mode="radio"
|
|
11
|
+
class="mn-b-micro"
|
|
12
|
+
@update:radio="emit('apply')"
|
|
13
|
+
/>
|
|
17
14
|
</div>
|
|
18
15
|
</template>
|
|
19
16
|
|
|
20
17
|
<script setup>
|
|
21
|
-
import
|
|
22
|
-
import Field from '@martyrs/src/components/Field/Field.vue';
|
|
23
|
-
|
|
18
|
+
import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'
|
|
24
19
|
|
|
25
20
|
const props = defineProps({
|
|
26
21
|
options: {
|
|
@@ -31,35 +26,9 @@ const props = defineProps({
|
|
|
31
26
|
})
|
|
32
27
|
|
|
33
28
|
const model = defineModel({
|
|
34
|
-
type:
|
|
35
|
-
default:
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
// Создаем объект для хранения состояний чекбоксов
|
|
39
|
-
const checkboxStates = ref({})
|
|
40
|
-
|
|
41
|
-
// Инициализация состояний
|
|
42
|
-
props.options.forEach(option => {
|
|
43
|
-
checkboxStates.value[option.value] = model.value.includes(option.value)
|
|
29
|
+
type: String,
|
|
30
|
+
default: null
|
|
44
31
|
})
|
|
45
32
|
|
|
46
|
-
|
|
47
|
-
watch(model, (newVal) => {
|
|
48
|
-
props.options.forEach(option => {
|
|
49
|
-
checkboxStates.value[option.value] = newVal.includes(option.value)
|
|
50
|
-
})
|
|
51
|
-
}, { deep: true })
|
|
52
|
-
|
|
53
|
-
// Обновляем модель при изменении чекбоксов
|
|
54
|
-
watch(checkboxStates, (states) => {
|
|
55
|
-
const selected = []
|
|
56
|
-
Object.entries(states).forEach(([value, checked]) => {
|
|
57
|
-
if (checked) selected.push(value)
|
|
58
|
-
})
|
|
59
|
-
model.value = selected
|
|
60
|
-
}, { deep: true })
|
|
61
|
-
|
|
62
|
-
const toggleOption = (value) => {
|
|
63
|
-
checkboxStates.value[value] = !checkboxStates.value[value]
|
|
64
|
-
}
|
|
33
|
+
const emit = defineEmits(['apply'])
|
|
65
34
|
</script>
|