@ozdao/martyrs 0.2.508 → 0.2.510
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-Dq-UfO4G.js → main-DrpgUZcn.js} +2808 -2615
- package/dist/main-XJQJFmgj.cjs +11 -0
- package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
- 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/Feed/Carousel.vue.cjs +4 -3
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +5 -4
- package/dist/martyrs/src/components/Feed/Carousel.vue.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.cjs +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +3 -3
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +3 -3
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue2.cjs → Tab.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Tab/{Tab.vue2.js.map → Tab.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue2.js → Tab.vue.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +17 -11
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +18 -12
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +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.cjs +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.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +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.cjs +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.cjs +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.cjs +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.cjs +1 -0
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -0
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +15 -15
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +8 -3
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +8 -3
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.cjs +121 -107
- package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.js +131 -117
- package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +112 -49
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +121 -58
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/icons/logos/Logotype.vue.cjs +3 -3
- package/dist/martyrs/src/modules/icons/logos/Logotype.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +136 -134
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +136 -134
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +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.cjs +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.cjs +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.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +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.cjs +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.cjs +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.cjs +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.cjs +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.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/router/music.cjs +2 -1
- package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/router/music.js +2 -1
- package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +61 -9
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +61 -9
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs +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.cjs +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.cjs +2 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.cjs +36 -44
- package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.js +36 -44
- package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/models/customer.cjs +7 -0
- package/dist/martyrs/src/modules/orders/store/models/customer.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/models/customer.js +7 -0
- package/dist/martyrs/src/modules/orders/store/models/customer.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +17 -28
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +17 -28
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +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.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.cjs +9 -1
- package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.js +9 -1
- package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +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.cjs +3 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -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.cjs +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +118 -135
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +123 -140
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +3 -5
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js +4 -6
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs +10 -5
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js +10 -5
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +6 -3
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +6 -3
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
- package/dist/martyrs/src/modules/products/store/products.cjs +5 -5
- package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/products.js +5 -5
- package/dist/martyrs/src/modules/products/store/products.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/orders.server.cjs +58 -0
- package/dist/orders.server.js +58 -0
- package/dist/products.server.cjs +79 -45
- package/dist/products.server.js +79 -45
- package/dist/style.css +44 -52
- package/dist/{web-BXajFCU2.js → web-C5cmb1FH.js} +1 -1
- package/dist/{web-DaBwwCQ5.cjs → web-d40xcY_Y.cjs} +1 -1
- package/package.json +1 -1
- package/src/components/Checkbox/Checkbox.vue +1 -1
- package/src/components/Feed/Carousel.vue +3 -1
- package/src/components/Feed/Feed.vue +1 -1
- package/src/components/Field/Field.vue +5 -0
- package/src/components/FieldBig/FieldBig.vue +2 -2
- package/src/modules/auth/views/components/pages/ProfileEdit.vue +17 -10
- package/src/modules/globals/views/components/layouts/Client.vue +12 -1
- package/src/modules/globals/views/components/partials/Footer.centered.vue +338 -0
- package/src/modules/globals/views/components/partials/Footer.vue +104 -99
- package/src/modules/globals/views/components/partials/Header.vue +1 -1
- package/src/modules/globals/views/components/sections/Filters.vue +73 -15
- package/src/modules/icons/logos/Logotype.vue +1 -1
- package/src/modules/inventory/components/pages/Inventory.vue +126 -119
- package/src/modules/orders/components/forms/FormCustomerDetails.vue +51 -0
- package/src/modules/orders/middlewares/customers.verifier.js +60 -0
- package/src/modules/orders/models/customer.model.js +18 -0
- package/src/modules/orders/orders.client.js +36 -44
- package/src/modules/orders/store/models/customer.js +7 -0
- package/src/modules/organizations/configs/navigation.organization.config.js +17 -26
- package/src/modules/products/TASKS.MD +1 -157
- package/src/modules/products/components/elements/QuantitySelector.vue +17 -9
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/src/modules/products/components/pages/Products.vue +148 -175
- package/src/modules/products/components/sections/EditRecommended.vue +1 -3
- package/src/modules/products/components/sections/ProductsPopular.vue +9 -5
- package/src/modules/products/components/sections/ProductsRecommended.vue +4 -1
- package/src/modules/products/controllers/configs/products.lookup.config.js +31 -4
- package/src/modules/products/controllers/products.controller.js +14 -2
- package/src/modules/products/controllers/queries/products.queries.js +46 -43
- package/src/modules/products/models/product.model.js +4 -0
- package/src/modules/products/store/products.js +5 -5
- package/src/styles/base/all.scss +9 -4
- package/src/styles/config.scss +10 -0
- package/src/styles/responsive.scss +2 -1
- package/src/styles/typography.scss +0 -5
- package/dist/main-AWSb_d2P.cjs +0 -11
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +0 -1
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, L as h, p as b, M as k, q as x, H as B, r as T, s as U, t as f, u as w, S as D, v as E, w as I, x as L, y as P, z as q, A as y, B as A, D as j, U as v, E as z, G, m as H } 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, L as h, p as b, M as k, q as x, H as B, r as T, s as U, t as f, u as w, S as D, v as E, w as I, x as L, y as P, z as q, A as y, B as A, D as j, U as v, E as z, G, m as H } from "./main-DrpgUZcn.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Address,
|
|
4
4
|
o as Breadcrumbs,
|
package/dist/orders.server.cjs
CHANGED
|
@@ -577,6 +577,24 @@ const ModelCustomer = (db) => {
|
|
|
577
577
|
type: String,
|
|
578
578
|
enum: ["active", "inactive", "blocked"],
|
|
579
579
|
default: "active"
|
|
580
|
+
},
|
|
581
|
+
address: {
|
|
582
|
+
country: {
|
|
583
|
+
type: String
|
|
584
|
+
},
|
|
585
|
+
addressLine1: {
|
|
586
|
+
type: String,
|
|
587
|
+
required: true
|
|
588
|
+
},
|
|
589
|
+
addressLine2: {
|
|
590
|
+
type: String
|
|
591
|
+
},
|
|
592
|
+
city: {
|
|
593
|
+
type: String
|
|
594
|
+
},
|
|
595
|
+
postalCode: {
|
|
596
|
+
type: String
|
|
597
|
+
}
|
|
580
598
|
}
|
|
581
599
|
},
|
|
582
600
|
{
|
|
@@ -1059,6 +1077,26 @@ const verifierFactory = function(db) {
|
|
|
1059
1077
|
type: globals_verifier.Validator.schema().string().oneOf(["user", "organization", "User", "Organization"]),
|
|
1060
1078
|
target: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
|
|
1061
1079
|
})
|
|
1080
|
+
},
|
|
1081
|
+
"address.country": {
|
|
1082
|
+
rule: "optional",
|
|
1083
|
+
validator: globals_verifier.Validator.schema().string().max(100, "Country must not exceed 100 characters")
|
|
1084
|
+
},
|
|
1085
|
+
"address.addressLine1": {
|
|
1086
|
+
rule: "optional",
|
|
1087
|
+
validator: globals_verifier.Validator.schema().string().max(255, "Address line 1 must not exceed 255 characters")
|
|
1088
|
+
},
|
|
1089
|
+
"address.addressLine2": {
|
|
1090
|
+
rule: "optional",
|
|
1091
|
+
validator: globals_verifier.Validator.schema().string().max(255, "Address line 2 must not exceed 255 characters")
|
|
1092
|
+
},
|
|
1093
|
+
"address.city": {
|
|
1094
|
+
rule: "optional",
|
|
1095
|
+
validator: globals_verifier.Validator.schema().string().max(100, "City must not exceed 100 characters")
|
|
1096
|
+
},
|
|
1097
|
+
"address.postalCode": {
|
|
1098
|
+
rule: "optional",
|
|
1099
|
+
validator: globals_verifier.Validator.schema().string().max(20, "Postal code must not exceed 20 characters")
|
|
1062
1100
|
}
|
|
1063
1101
|
});
|
|
1064
1102
|
const updateVerifier = new globals_verifier.Verifier({
|
|
@@ -1109,6 +1147,26 @@ const verifierFactory = function(db) {
|
|
|
1109
1147
|
status: {
|
|
1110
1148
|
rule: "optional",
|
|
1111
1149
|
validator: globals_verifier.Validator.schema().string().oneOf(["active", "inactive", "blocked"])
|
|
1150
|
+
},
|
|
1151
|
+
"address.country": {
|
|
1152
|
+
rule: "optional",
|
|
1153
|
+
validator: globals_verifier.Validator.schema().string().max(100, "Country must not exceed 100 characters")
|
|
1154
|
+
},
|
|
1155
|
+
"address.addressLine1": {
|
|
1156
|
+
rule: "optional",
|
|
1157
|
+
validator: globals_verifier.Validator.schema().string().max(255, "Address line 1 must not exceed 255 characters")
|
|
1158
|
+
},
|
|
1159
|
+
"address.addressLine2": {
|
|
1160
|
+
rule: "optional",
|
|
1161
|
+
validator: globals_verifier.Validator.schema().string().max(255, "Address line 2 must not exceed 255 characters")
|
|
1162
|
+
},
|
|
1163
|
+
"address.city": {
|
|
1164
|
+
rule: "optional",
|
|
1165
|
+
validator: globals_verifier.Validator.schema().string().max(100, "City must not exceed 100 characters")
|
|
1166
|
+
},
|
|
1167
|
+
"address.postalCode": {
|
|
1168
|
+
rule: "optional",
|
|
1169
|
+
validator: globals_verifier.Validator.schema().string().max(20, "Postal code must not exceed 20 characters")
|
|
1112
1170
|
}
|
|
1113
1171
|
});
|
|
1114
1172
|
const readVerifier = new globals_verifier.Verifier({
|
package/dist/orders.server.js
CHANGED
|
@@ -575,6 +575,24 @@ const ModelCustomer = (db) => {
|
|
|
575
575
|
type: String,
|
|
576
576
|
enum: ["active", "inactive", "blocked"],
|
|
577
577
|
default: "active"
|
|
578
|
+
},
|
|
579
|
+
address: {
|
|
580
|
+
country: {
|
|
581
|
+
type: String
|
|
582
|
+
},
|
|
583
|
+
addressLine1: {
|
|
584
|
+
type: String,
|
|
585
|
+
required: true
|
|
586
|
+
},
|
|
587
|
+
addressLine2: {
|
|
588
|
+
type: String
|
|
589
|
+
},
|
|
590
|
+
city: {
|
|
591
|
+
type: String
|
|
592
|
+
},
|
|
593
|
+
postalCode: {
|
|
594
|
+
type: String
|
|
595
|
+
}
|
|
578
596
|
}
|
|
579
597
|
},
|
|
580
598
|
{
|
|
@@ -1057,6 +1075,26 @@ const verifierFactory = function(db) {
|
|
|
1057
1075
|
type: Validator.schema().string().oneOf(["user", "organization", "User", "Organization"]),
|
|
1058
1076
|
target: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
|
|
1059
1077
|
})
|
|
1078
|
+
},
|
|
1079
|
+
"address.country": {
|
|
1080
|
+
rule: "optional",
|
|
1081
|
+
validator: Validator.schema().string().max(100, "Country must not exceed 100 characters")
|
|
1082
|
+
},
|
|
1083
|
+
"address.addressLine1": {
|
|
1084
|
+
rule: "optional",
|
|
1085
|
+
validator: Validator.schema().string().max(255, "Address line 1 must not exceed 255 characters")
|
|
1086
|
+
},
|
|
1087
|
+
"address.addressLine2": {
|
|
1088
|
+
rule: "optional",
|
|
1089
|
+
validator: Validator.schema().string().max(255, "Address line 2 must not exceed 255 characters")
|
|
1090
|
+
},
|
|
1091
|
+
"address.city": {
|
|
1092
|
+
rule: "optional",
|
|
1093
|
+
validator: Validator.schema().string().max(100, "City must not exceed 100 characters")
|
|
1094
|
+
},
|
|
1095
|
+
"address.postalCode": {
|
|
1096
|
+
rule: "optional",
|
|
1097
|
+
validator: Validator.schema().string().max(20, "Postal code must not exceed 20 characters")
|
|
1060
1098
|
}
|
|
1061
1099
|
});
|
|
1062
1100
|
const updateVerifier = new Verifier({
|
|
@@ -1107,6 +1145,26 @@ const verifierFactory = function(db) {
|
|
|
1107
1145
|
status: {
|
|
1108
1146
|
rule: "optional",
|
|
1109
1147
|
validator: Validator.schema().string().oneOf(["active", "inactive", "blocked"])
|
|
1148
|
+
},
|
|
1149
|
+
"address.country": {
|
|
1150
|
+
rule: "optional",
|
|
1151
|
+
validator: Validator.schema().string().max(100, "Country must not exceed 100 characters")
|
|
1152
|
+
},
|
|
1153
|
+
"address.addressLine1": {
|
|
1154
|
+
rule: "optional",
|
|
1155
|
+
validator: Validator.schema().string().max(255, "Address line 1 must not exceed 255 characters")
|
|
1156
|
+
},
|
|
1157
|
+
"address.addressLine2": {
|
|
1158
|
+
rule: "optional",
|
|
1159
|
+
validator: Validator.schema().string().max(255, "Address line 2 must not exceed 255 characters")
|
|
1160
|
+
},
|
|
1161
|
+
"address.city": {
|
|
1162
|
+
rule: "optional",
|
|
1163
|
+
validator: Validator.schema().string().max(100, "City must not exceed 100 characters")
|
|
1164
|
+
},
|
|
1165
|
+
"address.postalCode": {
|
|
1166
|
+
rule: "optional",
|
|
1167
|
+
validator: Validator.schema().string().max(20, "Postal code must not exceed 20 characters")
|
|
1110
1168
|
}
|
|
1111
1169
|
});
|
|
1112
1170
|
const readVerifier = new Verifier({
|
package/dist/products.server.cjs
CHANGED
|
@@ -467,42 +467,31 @@ function getAttributeFiltersStage(filtersString) {
|
|
|
467
467
|
return [];
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
function getVariantPriceFilterStage(
|
|
471
|
-
|
|
470
|
+
function getVariantPriceFilterStage(priceMin, priceMax) {
|
|
471
|
+
const hasValidMin = priceMin && priceMin.trim() !== "";
|
|
472
|
+
const hasValidMax = priceMax && priceMax.trim() !== "";
|
|
473
|
+
if (!hasValidMin && !hasValidMax) return [];
|
|
472
474
|
try {
|
|
473
|
-
const
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
priceConditions.push({
|
|
478
|
-
variants: {
|
|
479
|
-
$elemMatch: {
|
|
480
|
-
price: { $lt: parseFloat(priceRange.slice(1)) }
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
} else if (priceRange.startsWith(">")) {
|
|
485
|
-
priceConditions.push({
|
|
486
|
-
variants: {
|
|
487
|
-
$elemMatch: {
|
|
488
|
-
price: { $gt: parseFloat(priceRange.slice(1)) }
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
} else {
|
|
493
|
-
const [min, max] = priceRange.split("-").map(Number);
|
|
494
|
-
if (!isNaN(min) && !isNaN(max)) {
|
|
495
|
-
priceConditions.push({
|
|
496
|
-
variants: {
|
|
497
|
-
$elemMatch: {
|
|
498
|
-
price: { $gte: min, $lte: max }
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
});
|
|
475
|
+
const priceCondition = {
|
|
476
|
+
variants: {
|
|
477
|
+
$elemMatch: {
|
|
478
|
+
price: {}
|
|
502
479
|
}
|
|
503
480
|
}
|
|
504
|
-
}
|
|
505
|
-
|
|
481
|
+
};
|
|
482
|
+
if (hasValidMin) {
|
|
483
|
+
const minPrice = parseFloat(priceMin);
|
|
484
|
+
if (!isNaN(minPrice)) {
|
|
485
|
+
priceCondition.variants.$elemMatch.price.$gte = minPrice;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
if (hasValidMax) {
|
|
489
|
+
const maxPrice = parseFloat(priceMax);
|
|
490
|
+
if (!isNaN(maxPrice)) {
|
|
491
|
+
priceCondition.variants.$elemMatch.price.$lte = maxPrice;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return [{ $match: priceCondition }];
|
|
506
495
|
} catch (error) {
|
|
507
496
|
console.error("Error parsing price filters:", error);
|
|
508
497
|
return [];
|
|
@@ -512,11 +501,19 @@ function getAvailabilityFilterStage(dateStart, dateEnd) {
|
|
|
512
501
|
if (!dateStart || !dateEnd) return [];
|
|
513
502
|
const startDate = new Date(dateStart);
|
|
514
503
|
const endDate = new Date(dateEnd);
|
|
504
|
+
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
|
505
|
+
console.warn("Invalid dates provided for availability filter:", { dateStart, dateEnd });
|
|
506
|
+
return [];
|
|
507
|
+
}
|
|
515
508
|
return [
|
|
516
509
|
{
|
|
517
510
|
$lookup: {
|
|
518
511
|
from: "rents",
|
|
519
|
-
let: {
|
|
512
|
+
let: {
|
|
513
|
+
productId: "$_id",
|
|
514
|
+
dateStart: startDate,
|
|
515
|
+
dateEnd: endDate
|
|
516
|
+
},
|
|
520
517
|
pipeline: [
|
|
521
518
|
{
|
|
522
519
|
$match: {
|
|
@@ -528,20 +525,20 @@ function getAvailabilityFilterStage(dateStart, dateEnd) {
|
|
|
528
525
|
$or: [
|
|
529
526
|
{
|
|
530
527
|
$and: [
|
|
531
|
-
{ $gte: ["$startDate",
|
|
532
|
-
{ $lte: ["$startDate",
|
|
528
|
+
{ $gte: ["$startDate", "$$dateStart"] },
|
|
529
|
+
{ $lte: ["$startDate", "$$dateEnd"] }
|
|
533
530
|
]
|
|
534
531
|
},
|
|
535
532
|
{
|
|
536
533
|
$and: [
|
|
537
|
-
{ $gte: ["$endDate",
|
|
538
|
-
{ $lte: ["$endDate",
|
|
534
|
+
{ $gte: ["$endDate", "$$dateStart"] },
|
|
535
|
+
{ $lte: ["$endDate", "$$dateEnd"] }
|
|
539
536
|
]
|
|
540
537
|
},
|
|
541
538
|
{
|
|
542
539
|
$and: [
|
|
543
|
-
{ $lte: ["$startDate",
|
|
544
|
-
{ $gte: ["$endDate",
|
|
540
|
+
{ $lte: ["$startDate", "$$dateStart"] },
|
|
541
|
+
{ $gte: ["$endDate", "$$dateEnd"] }
|
|
545
542
|
]
|
|
546
543
|
}
|
|
547
544
|
]
|
|
@@ -678,7 +675,17 @@ const productLookupConfigs = {
|
|
|
678
675
|
from: "products",
|
|
679
676
|
localField: "recommended",
|
|
680
677
|
foreignField: "_id",
|
|
681
|
-
as: "recommended"
|
|
678
|
+
as: "recommended",
|
|
679
|
+
pipeline: [
|
|
680
|
+
{
|
|
681
|
+
$lookup: {
|
|
682
|
+
from: "variants",
|
|
683
|
+
localField: "_id",
|
|
684
|
+
foreignField: "product",
|
|
685
|
+
as: "variants"
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
]
|
|
682
689
|
}
|
|
683
690
|
},
|
|
684
691
|
// Лукап для категорий продукта
|
|
@@ -706,13 +713,30 @@ const productLookupConfigs = {
|
|
|
706
713
|
}
|
|
707
714
|
}]
|
|
708
715
|
},
|
|
709
|
-
// Лукап для аренд
|
|
716
|
+
// Лукап для аренд продуктов (статичный без дат)
|
|
710
717
|
rents: {
|
|
711
718
|
lookup: {
|
|
712
719
|
from: "rents",
|
|
713
720
|
localField: "_id",
|
|
714
721
|
foreignField: "product",
|
|
715
|
-
as: "rents"
|
|
722
|
+
as: "rents",
|
|
723
|
+
pipeline: [
|
|
724
|
+
{
|
|
725
|
+
$match: {
|
|
726
|
+
status: { $in: ["confirmed", "active"] }
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
$project: {
|
|
731
|
+
_id: 1,
|
|
732
|
+
product: 1,
|
|
733
|
+
startDate: 1,
|
|
734
|
+
endDate: 1,
|
|
735
|
+
quantity: 1,
|
|
736
|
+
status: 1
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
]
|
|
716
740
|
}
|
|
717
741
|
}
|
|
718
742
|
};
|
|
@@ -734,6 +758,15 @@ const controllerFactory = (db) => {
|
|
|
734
758
|
const Read = async (req, res) => {
|
|
735
759
|
try {
|
|
736
760
|
const requestedLookups = queryProcessor.queryProcessorGlobals.getRequestedLookups(req.query);
|
|
761
|
+
if (req.query.dateStart || req.query.dateEnd) {
|
|
762
|
+
console.log("Availability filter params:", {
|
|
763
|
+
dateStart: req.query.dateStart,
|
|
764
|
+
dateEnd: req.query.dateEnd,
|
|
765
|
+
dateStartType: typeof req.query.dateStart,
|
|
766
|
+
dateEndType: typeof req.query.dateEnd
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
console.log("availability variant", JSON.stringify(...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd), null, 2));
|
|
737
770
|
const stages = [
|
|
738
771
|
...queryProcessor.queryProcessorGlobals.getBasicOptions(req.query),
|
|
739
772
|
...queryProcessor.queryProcessorGlobals.getSearchOptions(req.query.search, {
|
|
@@ -746,9 +779,9 @@ const controllerFactory = (db) => {
|
|
|
746
779
|
...queryProcessorProducts.getCategoriesFilterStage(req.query.categories),
|
|
747
780
|
...queryProcessorProducts.getDeliveryFilterStage(req.query.delivery),
|
|
748
781
|
...queryProcessorProducts.getAttributeFiltersStage(req.query.filters),
|
|
749
|
-
...queryProcessorProducts.getVariantPriceFilterStage(req.query.prices),
|
|
750
|
-
...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
|
|
751
782
|
...queryProcessor.queryProcessorGlobals.getLookupStages(requestedLookups, productLookupConfigs),
|
|
783
|
+
...queryProcessorProducts.getVariantPriceFilterStage(req.query.priceMin, req.query.priceMax),
|
|
784
|
+
...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
|
|
752
785
|
queryProcessor.queryProcessorGlobals.getCreatorUserLookupStage(),
|
|
753
786
|
queryProcessor.queryProcessorGlobals.getCreatorOrganizationLookupStage(),
|
|
754
787
|
queryProcessor.queryProcessorGlobals.getOwnerUserLookupStage(),
|
|
@@ -967,6 +1000,7 @@ const ProductModel = (db) => {
|
|
|
967
1000
|
});
|
|
968
1001
|
common_schema.applyCommonSchema(ProductSchema);
|
|
969
1002
|
ownership_schema.applyOwnershipSchema(ProductSchema, db);
|
|
1003
|
+
engagement_schema.applyEngagementSchema(ProductSchema);
|
|
970
1004
|
ProductSchema.index({ name: "text", description: "text" });
|
|
971
1005
|
ProductSchema.index({ "owner.type": 1, "owner.target": 1, status: 1, category: 1 });
|
|
972
1006
|
ProductSchema.index({ category: 1, status: 1, delivery: 1, price: 1 });
|
package/dist/products.server.js
CHANGED
|
@@ -465,42 +465,31 @@ function getAttributeFiltersStage(filtersString) {
|
|
|
465
465
|
return [];
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function getVariantPriceFilterStage(
|
|
469
|
-
|
|
468
|
+
function getVariantPriceFilterStage(priceMin, priceMax) {
|
|
469
|
+
const hasValidMin = priceMin && priceMin.trim() !== "";
|
|
470
|
+
const hasValidMax = priceMax && priceMax.trim() !== "";
|
|
471
|
+
if (!hasValidMin && !hasValidMax) return [];
|
|
470
472
|
try {
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
priceConditions.push({
|
|
476
|
-
variants: {
|
|
477
|
-
$elemMatch: {
|
|
478
|
-
price: { $lt: parseFloat(priceRange.slice(1)) }
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
} else if (priceRange.startsWith(">")) {
|
|
483
|
-
priceConditions.push({
|
|
484
|
-
variants: {
|
|
485
|
-
$elemMatch: {
|
|
486
|
-
price: { $gt: parseFloat(priceRange.slice(1)) }
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
});
|
|
490
|
-
} else {
|
|
491
|
-
const [min, max] = priceRange.split("-").map(Number);
|
|
492
|
-
if (!isNaN(min) && !isNaN(max)) {
|
|
493
|
-
priceConditions.push({
|
|
494
|
-
variants: {
|
|
495
|
-
$elemMatch: {
|
|
496
|
-
price: { $gte: min, $lte: max }
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
});
|
|
473
|
+
const priceCondition = {
|
|
474
|
+
variants: {
|
|
475
|
+
$elemMatch: {
|
|
476
|
+
price: {}
|
|
500
477
|
}
|
|
501
478
|
}
|
|
502
|
-
}
|
|
503
|
-
|
|
479
|
+
};
|
|
480
|
+
if (hasValidMin) {
|
|
481
|
+
const minPrice = parseFloat(priceMin);
|
|
482
|
+
if (!isNaN(minPrice)) {
|
|
483
|
+
priceCondition.variants.$elemMatch.price.$gte = minPrice;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (hasValidMax) {
|
|
487
|
+
const maxPrice = parseFloat(priceMax);
|
|
488
|
+
if (!isNaN(maxPrice)) {
|
|
489
|
+
priceCondition.variants.$elemMatch.price.$lte = maxPrice;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return [{ $match: priceCondition }];
|
|
504
493
|
} catch (error) {
|
|
505
494
|
console.error("Error parsing price filters:", error);
|
|
506
495
|
return [];
|
|
@@ -510,11 +499,19 @@ function getAvailabilityFilterStage(dateStart, dateEnd) {
|
|
|
510
499
|
if (!dateStart || !dateEnd) return [];
|
|
511
500
|
const startDate = new Date(dateStart);
|
|
512
501
|
const endDate = new Date(dateEnd);
|
|
502
|
+
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
|
503
|
+
console.warn("Invalid dates provided for availability filter:", { dateStart, dateEnd });
|
|
504
|
+
return [];
|
|
505
|
+
}
|
|
513
506
|
return [
|
|
514
507
|
{
|
|
515
508
|
$lookup: {
|
|
516
509
|
from: "rents",
|
|
517
|
-
let: {
|
|
510
|
+
let: {
|
|
511
|
+
productId: "$_id",
|
|
512
|
+
dateStart: startDate,
|
|
513
|
+
dateEnd: endDate
|
|
514
|
+
},
|
|
518
515
|
pipeline: [
|
|
519
516
|
{
|
|
520
517
|
$match: {
|
|
@@ -526,20 +523,20 @@ function getAvailabilityFilterStage(dateStart, dateEnd) {
|
|
|
526
523
|
$or: [
|
|
527
524
|
{
|
|
528
525
|
$and: [
|
|
529
|
-
{ $gte: ["$startDate",
|
|
530
|
-
{ $lte: ["$startDate",
|
|
526
|
+
{ $gte: ["$startDate", "$$dateStart"] },
|
|
527
|
+
{ $lte: ["$startDate", "$$dateEnd"] }
|
|
531
528
|
]
|
|
532
529
|
},
|
|
533
530
|
{
|
|
534
531
|
$and: [
|
|
535
|
-
{ $gte: ["$endDate",
|
|
536
|
-
{ $lte: ["$endDate",
|
|
532
|
+
{ $gte: ["$endDate", "$$dateStart"] },
|
|
533
|
+
{ $lte: ["$endDate", "$$dateEnd"] }
|
|
537
534
|
]
|
|
538
535
|
},
|
|
539
536
|
{
|
|
540
537
|
$and: [
|
|
541
|
-
{ $lte: ["$startDate",
|
|
542
|
-
{ $gte: ["$endDate",
|
|
538
|
+
{ $lte: ["$startDate", "$$dateStart"] },
|
|
539
|
+
{ $gte: ["$endDate", "$$dateEnd"] }
|
|
543
540
|
]
|
|
544
541
|
}
|
|
545
542
|
]
|
|
@@ -676,7 +673,17 @@ const productLookupConfigs = {
|
|
|
676
673
|
from: "products",
|
|
677
674
|
localField: "recommended",
|
|
678
675
|
foreignField: "_id",
|
|
679
|
-
as: "recommended"
|
|
676
|
+
as: "recommended",
|
|
677
|
+
pipeline: [
|
|
678
|
+
{
|
|
679
|
+
$lookup: {
|
|
680
|
+
from: "variants",
|
|
681
|
+
localField: "_id",
|
|
682
|
+
foreignField: "product",
|
|
683
|
+
as: "variants"
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
]
|
|
680
687
|
}
|
|
681
688
|
},
|
|
682
689
|
// Лукап для категорий продукта
|
|
@@ -704,13 +711,30 @@ const productLookupConfigs = {
|
|
|
704
711
|
}
|
|
705
712
|
}]
|
|
706
713
|
},
|
|
707
|
-
// Лукап для аренд
|
|
714
|
+
// Лукап для аренд продуктов (статичный без дат)
|
|
708
715
|
rents: {
|
|
709
716
|
lookup: {
|
|
710
717
|
from: "rents",
|
|
711
718
|
localField: "_id",
|
|
712
719
|
foreignField: "product",
|
|
713
|
-
as: "rents"
|
|
720
|
+
as: "rents",
|
|
721
|
+
pipeline: [
|
|
722
|
+
{
|
|
723
|
+
$match: {
|
|
724
|
+
status: { $in: ["confirmed", "active"] }
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
$project: {
|
|
729
|
+
_id: 1,
|
|
730
|
+
product: 1,
|
|
731
|
+
startDate: 1,
|
|
732
|
+
endDate: 1,
|
|
733
|
+
quantity: 1,
|
|
734
|
+
status: 1
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
]
|
|
714
738
|
}
|
|
715
739
|
}
|
|
716
740
|
};
|
|
@@ -732,6 +756,15 @@ const controllerFactory = (db) => {
|
|
|
732
756
|
const Read = async (req, res) => {
|
|
733
757
|
try {
|
|
734
758
|
const requestedLookups = queryProcessorGlobals.getRequestedLookups(req.query);
|
|
759
|
+
if (req.query.dateStart || req.query.dateEnd) {
|
|
760
|
+
console.log("Availability filter params:", {
|
|
761
|
+
dateStart: req.query.dateStart,
|
|
762
|
+
dateEnd: req.query.dateEnd,
|
|
763
|
+
dateStartType: typeof req.query.dateStart,
|
|
764
|
+
dateEndType: typeof req.query.dateEnd
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
console.log("availability variant", JSON.stringify(...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd), null, 2));
|
|
735
768
|
const stages = [
|
|
736
769
|
...queryProcessorGlobals.getBasicOptions(req.query),
|
|
737
770
|
...queryProcessorGlobals.getSearchOptions(req.query.search, {
|
|
@@ -744,9 +777,9 @@ const controllerFactory = (db) => {
|
|
|
744
777
|
...queryProcessorProducts.getCategoriesFilterStage(req.query.categories),
|
|
745
778
|
...queryProcessorProducts.getDeliveryFilterStage(req.query.delivery),
|
|
746
779
|
...queryProcessorProducts.getAttributeFiltersStage(req.query.filters),
|
|
747
|
-
...queryProcessorProducts.getVariantPriceFilterStage(req.query.prices),
|
|
748
|
-
...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
|
|
749
780
|
...queryProcessorGlobals.getLookupStages(requestedLookups, productLookupConfigs),
|
|
781
|
+
...queryProcessorProducts.getVariantPriceFilterStage(req.query.priceMin, req.query.priceMax),
|
|
782
|
+
...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
|
|
750
783
|
queryProcessorGlobals.getCreatorUserLookupStage(),
|
|
751
784
|
queryProcessorGlobals.getCreatorOrganizationLookupStage(),
|
|
752
785
|
queryProcessorGlobals.getOwnerUserLookupStage(),
|
|
@@ -965,6 +998,7 @@ const ProductModel = (db) => {
|
|
|
965
998
|
});
|
|
966
999
|
applyCommonSchema(ProductSchema);
|
|
967
1000
|
applyOwnershipSchema(ProductSchema, db);
|
|
1001
|
+
applyEngagementSchema(ProductSchema);
|
|
968
1002
|
ProductSchema.index({ name: "text", description: "text" });
|
|
969
1003
|
ProductSchema.index({ "owner.type": 1, "owner.target": 1, status: 1, category: 1 });
|
|
970
1004
|
ProductSchema.index({ category: 1, status: 1, delivery: 1, price: 1 });
|