@ozdao/martyrs 0.2.506 → 0.2.507
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/auth.server.cjs +1 -1
- package/dist/auth.server.js +1 -1
- package/dist/builder.cjs +52 -60
- package/dist/builder.js +52 -60
- package/dist/chats.server.cjs +1 -1
- package/dist/chats.server.js +1 -1
- package/dist/events.server.cjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/{mailing-q7sR8gCV.cjs → mailing-Bs9ThyVZ.cjs} +1 -24
- package/dist/{mailing-C11EYWm-.js → mailing-DzlhsxCC.js} +1 -24
- package/dist/main-AWSb_d2P.cjs +11 -0
- package/dist/{main-DC__VS5b.js → main-Dq-UfO4G.js} +2562 -2477
- 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 +3 -3
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +3 -3
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +14 -45
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +21 -52
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.cjs +14 -6
- package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js +14 -6
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +58 -11
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +60 -13
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs +2 -2
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +2 -2
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js.map +1 -1
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.cjs → Spoiler.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.js → Spoiler.vue2.js} +2 -2
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.cjs.map → Spoiler.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue.cjs → Tab.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tab/{Tab.vue.cjs.map → Tab.vue2.js.map} +1 -1
- 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 +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +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/Profile.vue.js.map +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 +42 -10
- 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 +44 -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 +12 -16
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +22 -26
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +13 -17
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +34 -38
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs +13 -9
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +13 -9
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +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/auth/views/router/users.cjs +0 -4
- package/dist/martyrs/src/modules/auth/views/router/users.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.js +0 -4
- package/dist/martyrs/src/modules/auth/views/router/users.js.map +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/community/components/pages/Posts.vue.cjs +431 -0
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js +431 -0
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js.map +1 -0
- package/dist/martyrs/src/modules/community/router/blogposts.cjs +17 -0
- package/dist/martyrs/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/router/blogposts.js +17 -0
- package/dist/martyrs/src/modules/community/router/blogposts.js.map +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 +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- 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 -3
- 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 -3
- 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 +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +4 -6
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +4 -6
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.cjs +5 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.js +6 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.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 +2 -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 +2 -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/Header.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +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 +324 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +324 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -0
- 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/entities/IconLock.vue.cjs +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconLock.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/icons/entities/IconLock.vue.js +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconLock.vue.js.map +1 -0
- package/dist/martyrs/src/modules/icons/icons.client.cjs +2 -0
- package/dist/martyrs/src/modules/icons/icons.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/icons.client.js +116 -114
- package/dist/martyrs/src/modules/icons/icons.client.js.map +1 -1
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +5 -3
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +117 -115
- package/dist/martyrs/src/modules/icons/pages/IconsPage.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/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +11 -36
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +11 -36
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/landing.client.cjs +3 -0
- package/dist/martyrs/src/modules/landing/landing.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/landing.client.js +3 -0
- package/dist/martyrs/src/modules/landing/landing.client.js.map +1 -1
- package/dist/martyrs/src/modules/landing/locales/en.cjs +12 -0
- package/dist/martyrs/src/modules/landing/locales/en.cjs.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/en.js +12 -0
- package/dist/martyrs/src/modules/landing/locales/en.js.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/index.cjs +10 -0
- package/dist/martyrs/src/modules/landing/locales/index.cjs.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/index.js +10 -0
- package/dist/martyrs/src/modules/landing/locales/index.js.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/ru.cjs +12 -0
- package/dist/martyrs/src/modules/landing/locales/ru.cjs.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/ru.js +12 -0
- package/dist/martyrs/src/modules/landing/locales/ru.js.map +1 -0
- 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 +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +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 +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +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 +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +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 -4
- package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/router/music.js +2 -4
- 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/blocks/CardApplication.vue.cjs +86 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js +86 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.cjs +103 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js +103 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.cjs +194 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +194 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +138 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +138 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +189 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +189 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +173 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +173 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.cjs +233 -0
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +233 -0
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs +234 -0
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js +234 -0
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js.map +1 -0
- 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 +10 -9
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +10 -9
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +9 -83
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +10 -84
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
- 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 +119 -0
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +119 -0
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs +139 -0
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +139 -0
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -3
- 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 +1 -3
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/locales/en.cjs +38 -0
- package/dist/martyrs/src/modules/orders/locales/en.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/en.js +38 -0
- package/dist/martyrs/src/modules/orders/locales/en.js.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/index.cjs +10 -0
- package/dist/martyrs/src/modules/orders/locales/index.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/index.js +10 -0
- package/dist/martyrs/src/modules/orders/locales/index.js.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/ru.cjs +38 -0
- package/dist/martyrs/src/modules/orders/locales/ru.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/ru.js +38 -0
- package/dist/martyrs/src/modules/orders/locales/ru.js.map +1 -0
- package/dist/martyrs/src/modules/orders/orders.client.cjs +78 -3
- package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.js +80 -5
- package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/router/applications.router.cjs +17 -0
- package/dist/martyrs/src/modules/orders/router/applications.router.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/router/applications.router.js +17 -0
- package/dist/martyrs/src/modules/orders/router/applications.router.js.map +1 -0
- package/dist/martyrs/src/modules/orders/router/customers.router.cjs +18 -0
- package/dist/martyrs/src/modules/orders/router/customers.router.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/router/customers.router.js +18 -0
- package/dist/martyrs/src/modules/orders/router/customers.router.js.map +1 -0
- package/dist/martyrs/src/modules/orders/store/applications.cjs +4 -42
- package/dist/martyrs/src/modules/orders/store/applications.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/applications.js +3 -41
- package/dist/martyrs/src/modules/orders/store/applications.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/models/application.cjs +20 -0
- package/dist/martyrs/src/modules/orders/store/models/application.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/store/models/application.js +20 -0
- package/dist/martyrs/src/modules/orders/store/models/application.js.map +1 -0
- package/dist/martyrs/src/modules/orders/store/models/customer.cjs +13 -1
- package/dist/martyrs/src/modules/orders/store/models/customer.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/models/customer.js +13 -1
- package/dist/martyrs/src/modules/orders/store/models/customer.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +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/Department.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.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/Organization.vue.cjs +16 -192
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +17 -193
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +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/DetailsTabSection.vue.cjs +2 -11
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +6 -15
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js.map +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 +85 -89
- 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 +92 -96
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +4 -0
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.js +4 -0
- package/dist/martyrs/src/modules/organizations/router/organizations.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/Page.vue.cjs +3 -6
- package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.js +3 -6
- package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.js.map +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/blocks/CardCategory.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +22 -19
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +22 -19
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +28 -19
- 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 +28 -19
- 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 +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +360 -105
- 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 +378 -123
- 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/EditVariants.vue.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.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/ProductsRecommended.vue.cjs +33 -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 +34 -4
- 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/router/products.router.cjs +15 -0
- package/dist/martyrs/src/modules/products/router/products.router.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/router/products.router.js +15 -0
- package/dist/martyrs/src/modules/products/router/products.router.js.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.cjs +25 -7
- package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.js +25 -7
- package/dist/martyrs/src/modules/products/store/categories.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/layouts/Spots.vue.cjs +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.cjs +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.cjs +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.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +345 -0
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +345 -0
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -0
- 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/spots/router/spots.cjs +17 -0
- package/dist/martyrs/src/modules/spots/router/spots.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/router/spots.js +17 -0
- package/dist/martyrs/src/modules/spots/router/spots.js.map +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/notifications.server.cjs +1 -1
- package/dist/notifications.server.js +1 -1
- package/dist/orders.server.cjs +459 -201
- package/dist/orders.server.js +459 -201
- package/dist/organizations.server.cjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/products.server.cjs +428 -255
- package/dist/products.server.js +428 -255
- package/dist/style.css +115 -139
- package/dist/{tickets.controller-DQQcjyui.js → tickets.controller-C56OvH6v.js} +1 -1
- package/dist/{tickets.controller-D0V0gJCA.cjs → tickets.controller-DdnndM6c.cjs} +1 -1
- package/dist/wallet.server.cjs +1 -1
- package/dist/wallet.server.js +1 -1
- package/dist/{web-B1bEJ1W9.js → web-BXajFCU2.js} +1 -1
- package/dist/{web-D5i9k2Vv.cjs → web-DaBwwCQ5.cjs} +1 -1
- package/package.json +1 -1
- package/src/builder/modes/ssr.dev.js +10 -10
- package/src/builder/rspack/rspack.config.ssr.client.js +50 -50
- package/src/components/Checkbox/Checkbox.vue +3 -4
- package/src/components/Feed/Feed.old.vue +522 -0
- package/src/components/Feed/Feed.vue +4 -4
- package/src/components/Field/Field.vue +7 -1
- package/src/components/FieldBig/FieldBig.vue +62 -8
- package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
- package/src/modules/STYLES.MD +198 -0
- package/src/modules/auth/views/components/pages/Profile.vue +1 -1
- package/src/modules/auth/views/components/pages/ProfileEdit.vue +42 -8
- package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +9 -11
- package/src/modules/auth/views/components/pages/ProfileEditProfile.vue +9 -11
- package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +7 -4
- package/src/modules/auth/views/router/users.js +0 -4
- package/src/modules/community/components/pages/Posts.vue +444 -0
- package/src/modules/community/router/blogposts.js +15 -0
- package/src/modules/globals/views/classes/globals.websocket.js +7 -8
- package/src/modules/globals/views/components/blocks/Card.vue +2 -1
- package/src/modules/globals/views/components/layouts/Client.vue +1 -2
- package/src/modules/globals/views/components/partials/FooterAlt.vue +161 -188
- package/src/modules/globals/views/components/sections/Filters.vue +261 -121
- package/src/modules/globals/views/components/sections/filters/FilterCheckbox.vue +78 -0
- package/src/modules/globals/views/components/sections/filters/FilterDateRange.vue +177 -0
- package/src/modules/globals/views/components/sections/filters/FilterRange.vue +51 -50
- package/src/modules/icons/entities/IconLock.vue +14 -0
- package/src/modules/icons/icons.client.js +2 -1
- package/src/modules/icons/pages/IconsPage.vue +4 -2
- package/src/modules/landing/components/sections/SubscribeNewsletter.vue +11 -61
- package/src/modules/landing/landing.client.js +6 -0
- package/src/modules/landing/locales/en.js +9 -0
- package/src/modules/landing/locales/index.js +7 -0
- package/src/modules/landing/locales/ru.js +9 -0
- package/src/modules/music/components/pages/Album.vue +1 -1
- package/src/modules/music/components/pages/Playlist.vue +1 -1
- package/src/modules/music/components/pages/Track.vue +1 -1
- package/src/modules/orders/components/blocks/CardApplication.vue +74 -0
- package/src/modules/orders/components/blocks/CardCustomer.vue +90 -0
- package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +199 -0
- package/src/modules/orders/components/forms/FormApplicationDetails.vue +117 -0
- package/src/modules/orders/components/forms/FormCustomerDetails.vue +165 -0
- package/src/modules/orders/components/forms/FormSelectCustomer.vue +172 -0
- package/src/modules/orders/components/pages/Applications.vue +240 -0
- package/src/modules/orders/components/pages/Customers.vue +239 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +4 -75
- package/src/modules/orders/components/sections/ApplicationDetails.vue +91 -0
- package/src/modules/orders/components/sections/CustomerDetails.vue +107 -0
- package/src/modules/orders/locales/en.js +35 -0
- package/src/modules/orders/locales/index.js +7 -0
- package/src/modules/orders/locales/ru.js +35 -0
- package/src/modules/orders/middlewares/applications.verifier.js +189 -0
- package/src/modules/orders/middlewares/customers.verifier.js +251 -0
- package/src/modules/orders/models/application.model.js +21 -0
- package/src/modules/orders/models/customer.model.js +26 -0
- package/src/modules/orders/orders.client.js +86 -1
- package/src/modules/orders/orders.server.js +3 -1
- package/src/modules/orders/router/applications.router.js +15 -0
- package/src/modules/orders/router/customers.router.js +17 -0
- package/src/modules/orders/routes/applications.routes.js +124 -12
- package/src/modules/orders/routes/customers.routes.js +43 -0
- package/src/modules/orders/store/applications.js +3 -159
- package/src/modules/orders/store/models/application.js +18 -0
- package/src/modules/orders/store/models/customer.js +12 -0
- package/src/modules/organizations/components/pages/Organization.new.vue +593 -0
- package/src/modules/organizations/components/pages/Organization.vue +10 -201
- package/src/modules/organizations/components/sections/DetailsTabSection.vue +2 -2
- package/src/modules/organizations/configs/navigation.organization.config.js +69 -85
- package/src/modules/organizations/router/organizations.js +5 -0
- package/src/modules/pages/views/components/pages/Page.vue +1 -1
- package/src/modules/products/TASKS.MD +157 -0
- package/src/modules/products/components/blocks/CardCategory.vue +1 -1
- package/src/modules/products/components/blocks/ProductImages.vue +1 -1
- package/src/modules/products/components/pages/Categories.vue +27 -22
- package/src/modules/products/components/pages/CategoryEdit.vue +24 -13
- package/src/modules/products/components/pages/Products.vue +414 -173
- package/src/modules/products/components/sections/ProductsRecommended.vue +46 -2
- package/src/modules/products/controllers/categories.controller.js +321 -282
- package/src/modules/products/controllers/configs/products.lookup.config.js +9 -0
- package/src/modules/products/controllers/products.controller.js +2 -1
- package/src/modules/products/controllers/queries/products.queries.js +183 -11
- package/src/modules/products/middlewares/categories.verifier.js +58 -15
- package/src/modules/products/migrations/categories-to-materialized-path.js +433 -0
- package/src/modules/products/migrations/path-to-url.js +27 -0
- package/src/modules/products/models/category.model.js +8 -23
- package/src/modules/products/router/products.router.js +12 -0
- package/src/modules/products/store/categories.js +26 -7
- package/src/modules/rents/TASK.MD +161 -0
- package/src/modules/spots/components/pages/Spots.vue +342 -0
- package/src/modules/spots/router/spots.js +15 -0
- package/src/styles/base/all.scss +2 -3
- package/src/styles/layout.scss +16 -0
- package/dist/main-w3rPUBVh.cjs +0 -11
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.cjs +0 -96
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js +0 -96
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js.map +0 -1
- package/dist/martyrs/src/components/Button/Button.vue.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/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +0 -155
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +0 -155
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +0 -81
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +0 -81
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js.map +0 -1
- package/src/modules/orders/components/sections/FormAddCustomer.vue +0 -152
- package/src/modules/orders/components/sections/FormCustomerDetails.vue +0 -67
- package/src/modules/orders/controllers/applications.controller.js +0 -122
|
@@ -1,356 +1,395 @@
|
|
|
1
1
|
import Cache from '@martyrs/src/modules/globals/controllers/classes/globals.cache.js';
|
|
2
2
|
import Logger from '@martyrs/src/modules/globals/controllers/classes/globals.logger.js';
|
|
3
3
|
import globalsQuery from '@martyrs/src/modules/globals/controllers/utils/queryProcessor.js';
|
|
4
|
+
|
|
4
5
|
const controllerFactory = db => {
|
|
5
6
|
const Category = db.category;
|
|
6
7
|
const logger = new Logger(db);
|
|
7
8
|
const cache = new Cache();
|
|
9
|
+
|
|
10
|
+
// Генерация уникального slug
|
|
11
|
+
const generateSlug = async (name, parentId = null) => {
|
|
12
|
+
const baseSlug = name
|
|
13
|
+
.toLowerCase()
|
|
14
|
+
.replace(/[^a-z0-9\s-]/g, '')
|
|
15
|
+
.replace(/\s+/g, '-')
|
|
16
|
+
.replace(/-+/g, '-')
|
|
17
|
+
.trim('-');
|
|
18
|
+
|
|
19
|
+
let slug = baseSlug;
|
|
20
|
+
let counter = 1;
|
|
21
|
+
|
|
22
|
+
while (await Category.exists({ slug, parent: parentId })) {
|
|
23
|
+
slug = `${baseSlug}-${counter++}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return slug;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Построение дерева из плоского массива используя url
|
|
30
|
+
const buildTreeFromUrl = (categories, sortParam = 'order', sortOrder = 'asc') => {
|
|
31
|
+
console.log('cat buildtree', categories)
|
|
32
|
+
// Сортируем по url для правильного порядка обработки
|
|
33
|
+
categories.sort((a, b) => a.url.localeCompare(b.url));
|
|
34
|
+
|
|
35
|
+
const tree = [];
|
|
36
|
+
const nodeMap = new Map();
|
|
37
|
+
console.log('cat buildtree', categories)
|
|
38
|
+
categories.forEach(cat => {
|
|
39
|
+
const node = { ...cat, children: [] };
|
|
40
|
+
nodeMap.set(cat.url, node);
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// Находим родителя по url
|
|
44
|
+
const parentUrl = cat.url.substring(0, cat.url.lastIndexOf('/'));
|
|
45
|
+
console.log('cat parent buildtree', parentUrl)
|
|
46
|
+
|
|
47
|
+
if (parentUrl && nodeMap.has(parentUrl)) {
|
|
48
|
+
nodeMap.get(parentUrl).children.push(node);
|
|
49
|
+
console.log('cat nodeMap buildtree', nodeMap)
|
|
50
|
+
} else if (cat.level === 0) {
|
|
51
|
+
tree.push(node);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Рекурсивная сортировка
|
|
56
|
+
const sortNodes = nodes => {
|
|
57
|
+
nodes.sort((a, b) => {
|
|
58
|
+
const va = a[sortParam] ?? Number.MAX_SAFE_INTEGER;
|
|
59
|
+
const vb = b[sortParam] ?? Number.MAX_SAFE_INTEGER;
|
|
60
|
+
const diff = typeof va === 'number' ? va - vb : String(va).localeCompare(String(vb));
|
|
61
|
+
return sortOrder === 'asc' ? diff : -diff;
|
|
62
|
+
});
|
|
63
|
+
nodes.forEach(n => n.children?.length && sortNodes(n.children));
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
sortNodes(tree);
|
|
67
|
+
return tree;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// Обновление пути категории и всех потомков
|
|
71
|
+
const updateCategoryPaths = async (categoryId, newParentId = null) => {
|
|
72
|
+
const category = await Category.findById(categoryId);
|
|
73
|
+
if (!category) return;
|
|
74
|
+
|
|
75
|
+
let newPath = [];
|
|
76
|
+
let newLevel = 0;
|
|
77
|
+
let newUrl = `/${category.slug}`;
|
|
78
|
+
|
|
79
|
+
if (newParentId) {
|
|
80
|
+
const parent = await Category.findById(newParentId);
|
|
81
|
+
if (parent) {
|
|
82
|
+
newPath = [...parent.path, newParentId];
|
|
83
|
+
newLevel = parent.level + 1;
|
|
84
|
+
newUrl = `${parent.url}/${category.slug}`;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Обновляем категорию
|
|
89
|
+
await Category.updateOne(
|
|
90
|
+
{ _id: categoryId },
|
|
91
|
+
{ path: newPath, level: newLevel, url: newUrl }
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
// Обновляем всех потомков одним запросом
|
|
95
|
+
const oldUrlPattern = new RegExp(`^${category.url}/`);
|
|
96
|
+
|
|
97
|
+
await Category.updateMany(
|
|
98
|
+
{ url: oldUrlPattern },
|
|
99
|
+
[{
|
|
100
|
+
$set: {
|
|
101
|
+
url: { $concat: [newUrl, { $substr: ['$url', { $strLenCP: category.url }, -1] }] },
|
|
102
|
+
level: { $add: ['$level', newLevel - category.level] }
|
|
103
|
+
}
|
|
104
|
+
}]
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
8
108
|
return {
|
|
9
109
|
async read(req, res) {
|
|
10
110
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
111
|
+
const {
|
|
112
|
+
_id,
|
|
113
|
+
parent,
|
|
114
|
+
url,
|
|
115
|
+
status,
|
|
116
|
+
search,
|
|
117
|
+
sortParam = 'order',
|
|
118
|
+
sortOrder = 'asc',
|
|
119
|
+
skip,
|
|
120
|
+
limit,
|
|
121
|
+
root = false,
|
|
122
|
+
owner,
|
|
123
|
+
type,
|
|
124
|
+
tree,
|
|
125
|
+
depth = -1
|
|
126
|
+
} = req.query;
|
|
127
|
+
|
|
128
|
+
// Преобразуем depth в число
|
|
129
|
+
const depthNum = parseInt(depth, 10);
|
|
130
|
+
const isTree = tree === 'true' || tree === true;
|
|
131
|
+
const isRoot = root === 'true' || root === true;
|
|
132
|
+
|
|
133
|
+
console.log('🚀 Read categories params:', { url, depth: depthNum, tree: isTree, root });
|
|
134
|
+
|
|
135
|
+
const cacheKey = JSON.stringify(req.query);
|
|
136
|
+
const cached = await cache.get(cacheKey);
|
|
137
|
+
if (cached) return res.json(cached);
|
|
138
|
+
|
|
139
|
+
// Базовая фильтрация
|
|
140
|
+
const match = {
|
|
141
|
+
...(_id && { _id: new db.mongoose.Types.ObjectId(_id) }),
|
|
142
|
+
...(status && { status }),
|
|
25
143
|
...(search && { name: { $regex: search, $options: 'i' } }),
|
|
26
|
-
...(
|
|
27
|
-
...(
|
|
144
|
+
...(type && { 'owner.type': type }),
|
|
145
|
+
...(owner && { 'owner.target': new db.mongoose.Types.ObjectId(owner) }),
|
|
146
|
+
...(parent && { parent: new db.mongoose.Types.ObjectId(parent) }), // Исправлено: было owner вместо parent
|
|
28
147
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
148
|
+
|
|
149
|
+
// Обработка URL параметра (только если не ищем по _id)
|
|
150
|
+
if (url && !_id) {
|
|
151
|
+
if (depth === 0) {
|
|
152
|
+
// Только точное совпадение
|
|
153
|
+
match.url = url;
|
|
154
|
+
} else if (depth === 1) {
|
|
155
|
+
// Категория + прямые дети
|
|
156
|
+
match.$or = [
|
|
157
|
+
{ url: url },
|
|
158
|
+
{ url: { $regex: '^${url}/[^/]+$' } }
|
|
159
|
+
];
|
|
160
|
+
} else {
|
|
161
|
+
// Категория + все потомки (или ограничено depth)
|
|
162
|
+
match.$or = [
|
|
163
|
+
{ url: url },
|
|
164
|
+
{ url: { $regex: `^${url}/` } }
|
|
165
|
+
];
|
|
166
|
+
}
|
|
167
|
+
} else if (isRoot && !_id) {
|
|
168
|
+
// Только корневые категории
|
|
169
|
+
match.url = { $regex: '^/[^/]+$' };
|
|
38
170
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
globalsQuery.
|
|
46
|
-
globalsQuery.getOwnerOrganizationLookupStage(),
|
|
47
|
-
globalsQuery.getAddFieldsCreatorOwnerStage(),
|
|
48
|
-
{ $sort: { [sortParam]: sortOrder === 'asc' ? 1 : -1 } },
|
|
49
|
-
{ $skip: Number(skip) },
|
|
50
|
-
{ $limit: Number(limit) },
|
|
51
|
-
globalsQuery.removeTempPropeties(),
|
|
171
|
+
|
|
172
|
+
console.log('🔎 Match object:', JSON.stringify(match, null, 2));
|
|
173
|
+
|
|
174
|
+
const pipeline = [
|
|
175
|
+
{ $match: match },
|
|
176
|
+
...globalsQuery.getSortingOptions(sortParam, sortOrder),
|
|
177
|
+
// ...(skip || limit ? globalsQuery.getPaginationOptions(skip, limit) : []),
|
|
52
178
|
];
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
179
|
+
|
|
180
|
+
console.log('🔧 Pipeline:', JSON.stringify(pipeline, null, 2));
|
|
181
|
+
|
|
182
|
+
let results = await Category.aggregate(pipeline);
|
|
183
|
+
console.log('🔍 Aggregate results:', results.length, 'categories found');
|
|
184
|
+
console.log('🔍 Results URLs:', results.map(r => r.url));
|
|
185
|
+
|
|
186
|
+
// Фильтрация по глубине если указан depth > 1 и url
|
|
187
|
+
if (url && depthNum > 1) {
|
|
188
|
+
const maxLevel = url.split('/').filter(Boolean).length + depthNum - 1;
|
|
189
|
+
results = results.filter(cat => {
|
|
190
|
+
const catLevel = cat.url.split('/').filter(Boolean).length;
|
|
191
|
+
return cat.url === url || catLevel <= maxLevel;
|
|
64
192
|
});
|
|
193
|
+
console.log('🔍 After depth filter:', results.length, 'categories');
|
|
65
194
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
results.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
// Строим дерево категорий
|
|
88
|
-
let tree = buildAdjacencyTree(uniqueCategories, sortParam, sortOrder);
|
|
89
|
-
// Если rootOnly=true, возвращаем все корневые категории из дерева
|
|
90
|
-
if (rootOnly === 'true') {
|
|
91
|
-
response = tree;
|
|
195
|
+
|
|
196
|
+
// Построение дерева
|
|
197
|
+
if (isTree && results.length > 0) {
|
|
198
|
+
console.log('🌳 Building tree from results');
|
|
199
|
+
results = buildTreeFromUrl(results, sortParam, sortOrder);
|
|
200
|
+
} else if (!isTree && depthNum === 1 && url && results.length > 0) {
|
|
201
|
+
console.log('📋 Processing tree=false, depth=1');
|
|
202
|
+
console.log('📋 Looking for main category with url:', url);
|
|
203
|
+
|
|
204
|
+
const mainCategory = results.find(c => c.url === url);
|
|
205
|
+
console.log('📋 Main category found:', !!mainCategory, mainCategory?.url);
|
|
206
|
+
|
|
207
|
+
if (mainCategory) {
|
|
208
|
+
const children = results.filter(c =>
|
|
209
|
+
c.url !== url && c.url.startsWith(url + '/')
|
|
210
|
+
);
|
|
211
|
+
console.log('📋 Children found:', children.length, children.map(c => c.url));
|
|
212
|
+
|
|
213
|
+
mainCategory.children = children;
|
|
214
|
+
results = [mainCategory];
|
|
215
|
+
console.log('📋 Final result with children:', results[0].url, 'children:', results[0].children.length);
|
|
92
216
|
} else {
|
|
93
|
-
|
|
94
|
-
const requestedCategoryIds = results.map(r => r._id.toString());
|
|
95
|
-
response = tree.filter(category => requestedCategoryIds.includes(category._id.toString()));
|
|
217
|
+
console.log('❌ Main category not found in results!');
|
|
96
218
|
}
|
|
97
219
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (cat._id) {
|
|
107
|
-
tags.push(`category_${cat._id}`);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
await cache.setWithTags(cacheKey, response, tags);
|
|
111
|
-
res.status(200).json(response);
|
|
220
|
+
|
|
221
|
+
// Кеширование
|
|
222
|
+
const tags = ['categories'];
|
|
223
|
+
if (owner) tags.push(`organization_${owner}`);
|
|
224
|
+
await cache.setWithTags(cacheKey, results, tags);
|
|
225
|
+
|
|
226
|
+
console.log('✅ Final results count:', results.length);
|
|
227
|
+
res.json(results);
|
|
112
228
|
} catch (err) {
|
|
113
|
-
console.log(err)
|
|
114
229
|
logger.error(`Error reading categories: ${err.message}`);
|
|
115
230
|
res.status(500).json({ message: err.message });
|
|
116
231
|
}
|
|
117
232
|
},
|
|
233
|
+
|
|
118
234
|
async create(req, res) {
|
|
119
235
|
try {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
//
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
236
|
+
const data = req.verifiedBody;
|
|
237
|
+
|
|
238
|
+
// Установка creator и owner
|
|
239
|
+
data.creator ||= { type: 'user', target: req.userId };
|
|
240
|
+
data.owner ||= req.query.owner
|
|
241
|
+
? { type: 'organization', target: req.query.owner }
|
|
242
|
+
: { type: 'platform', target: null };
|
|
243
|
+
|
|
244
|
+
// Генерация slug
|
|
245
|
+
const slug = await generateSlug(data.name, data.parent);
|
|
246
|
+
|
|
247
|
+
// Определение path, level, url
|
|
248
|
+
let path = [];
|
|
249
|
+
let level = 0;
|
|
250
|
+
let url = `/${slug}`;
|
|
251
|
+
|
|
252
|
+
if (data.parent) {
|
|
253
|
+
const parent = await Category.findById(data.parent);
|
|
254
|
+
if (!parent) throw new Error('Parent category not found');
|
|
255
|
+
|
|
256
|
+
path = [...parent.path, data.parent];
|
|
257
|
+
level = parent.level + 1;
|
|
258
|
+
url = `${parent.url}/${slug}`;
|
|
144
259
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
260
|
+
|
|
261
|
+
// Определение order
|
|
262
|
+
const maxOrder = await Category.findOne({ parent: data.parent || null })
|
|
263
|
+
.sort('-order')
|
|
264
|
+
.select('order');
|
|
265
|
+
const order = (maxOrder?.order || 0) + 1;
|
|
266
|
+
|
|
267
|
+
const category = await Category.create({
|
|
268
|
+
...data,
|
|
269
|
+
slug,
|
|
270
|
+
url,
|
|
271
|
+
path,
|
|
272
|
+
level,
|
|
150
273
|
order,
|
|
151
274
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
const parent = await Category.findByIdAndUpdate(categoryData.parent, { $push: { children: category._id } }, { new: true });
|
|
155
|
-
if (!parent) throw new Error('Parent category not found');
|
|
156
|
-
category.parent = parent._id;
|
|
157
|
-
}
|
|
158
|
-
// Обрабатываем дочерние категории
|
|
159
|
-
if (categoryData.children && categoryData.children.length > 0) {
|
|
160
|
-
await Category.updateMany({ _id: { $in: categoryData.children } }, { $set: { parent: category._id } });
|
|
161
|
-
}
|
|
162
|
-
await category.save();
|
|
163
|
-
// Очищаем кэш для категорий
|
|
275
|
+
|
|
276
|
+
// Очистка кеша
|
|
164
277
|
await cache.delByTags(['categories']);
|
|
165
|
-
// Если категория принадлежит организации, очищаем ее кэш
|
|
166
278
|
if (category.owner.type === 'organization') {
|
|
167
279
|
await cache.delByTag(`organization_${category.owner.target}`);
|
|
168
280
|
}
|
|
281
|
+
|
|
169
282
|
logger.info(`Category created: ${category._id}`);
|
|
170
283
|
res.status(201).json(category);
|
|
171
284
|
} catch (err) {
|
|
172
285
|
logger.error(`Error creating category: ${err.message}`);
|
|
173
|
-
res.status(err.message
|
|
286
|
+
res.status(err.message.includes('not found') ? 404 : 500)
|
|
287
|
+
.json({ message: err.message });
|
|
174
288
|
}
|
|
175
289
|
},
|
|
290
|
+
|
|
176
291
|
async update(req, res) {
|
|
177
292
|
try {
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if (!updatedCategory) {
|
|
293
|
+
const data = req.verifiedBody;
|
|
294
|
+
const oldCategory = await Category.findById(data._id);
|
|
295
|
+
|
|
296
|
+
if (!oldCategory) {
|
|
183
297
|
return res.status(404).json({ message: 'Category not found' });
|
|
184
298
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
299
|
+
|
|
300
|
+
// Если меняется parent, обновляем пути
|
|
301
|
+
if (data.parent !== undefined && data.parent != oldCategory.parent) {
|
|
302
|
+
await updateCategoryPaths(data._id, data.parent);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const updated = await Category.findByIdAndUpdate(
|
|
306
|
+
data._id,
|
|
307
|
+
{ $set: data },
|
|
308
|
+
{ new: true }
|
|
309
|
+
).lean();
|
|
310
|
+
|
|
311
|
+
// Очистка кеша
|
|
188
312
|
await cache.delByTags(['categories']);
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
await cache.delByTag(`organization_${updatedCategory.owner.target}`);
|
|
313
|
+
if (updated.owner?.type === 'organization') {
|
|
314
|
+
await cache.delByTag(`organization_${updated.owner.target}`);
|
|
192
315
|
}
|
|
193
|
-
|
|
194
|
-
|
|
316
|
+
|
|
317
|
+
logger.info(`Category updated: ${data._id}`);
|
|
318
|
+
res.json(updated);
|
|
195
319
|
} catch (err) {
|
|
196
320
|
logger.error(`Category update error: ${err.message}`);
|
|
197
321
|
res.status(500).json({ message: 'Failed to update category' });
|
|
198
322
|
}
|
|
199
323
|
},
|
|
324
|
+
|
|
200
325
|
async updateOrder(req, res) {
|
|
201
326
|
try {
|
|
202
|
-
// Используем верифицированные данные из middleware
|
|
203
327
|
const { categories } = req.verifiedBody;
|
|
204
|
-
|
|
328
|
+
|
|
329
|
+
const bulkOps = categories.map(cat => ({
|
|
205
330
|
updateOne: {
|
|
206
|
-
filter: { _id:
|
|
207
|
-
update: {
|
|
208
|
-
|
|
209
|
-
order: category.order,
|
|
210
|
-
parent: category.parent ? new db.mongoose.Types.ObjectId(category.parent) : null,
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
},
|
|
331
|
+
filter: { _id: cat._id },
|
|
332
|
+
update: { $set: { order: cat.order } }
|
|
333
|
+
}
|
|
214
334
|
}));
|
|
335
|
+
|
|
336
|
+
// Обработка смены parent
|
|
337
|
+
const movedCategories = categories.filter(cat => cat.parent !== undefined);
|
|
338
|
+
|
|
339
|
+
for (const cat of movedCategories) {
|
|
340
|
+
await updateCategoryPaths(cat._id, cat.parent);
|
|
341
|
+
}
|
|
342
|
+
|
|
215
343
|
await Category.bulkWrite(bulkOps);
|
|
216
|
-
// Собираем ID категорий и организаций для очистки кэша
|
|
217
|
-
const categoryIds = categories.map(cat => cat._id);
|
|
218
|
-
const organizationIds = new Set();
|
|
219
|
-
// Получаем категории, чтобы выяснить, к каким организациям они принадлежат
|
|
220
|
-
const updatedCategories = await Category.find({ _id: { $in: categoryIds } }).lean();
|
|
221
|
-
// Собираем ID организаций
|
|
222
|
-
updatedCategories.forEach(cat => {
|
|
223
|
-
if (cat.owner && cat.owner.type === 'organization') {
|
|
224
|
-
organizationIds.add(cat.owner.target.toString());
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
// Очищаем кэш для категорий
|
|
228
344
|
await cache.delByTags(['categories']);
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
// Очищаем кэш для организаций
|
|
234
|
-
for (const orgId of organizationIds) {
|
|
235
|
-
await cache.delByTag(`organization_${orgId}`);
|
|
236
|
-
}
|
|
237
|
-
// Получаем обновленные категории с учетом типа владельца
|
|
238
|
-
let query = {};
|
|
239
|
-
if (req.query.type === 'platform') {
|
|
240
|
-
query = { 'owner.type': 'platform' };
|
|
241
|
-
} else if (req.query.type === 'organization' && req.query.organizationId) {
|
|
242
|
-
query = {
|
|
243
|
-
'owner.type': 'organization',
|
|
244
|
-
'owner.target': new db.mongoose.Types.ObjectId(req.query.organizationId),
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
const result = await Category.find(query).sort({ order: 'asc' }).lean();
|
|
248
|
-
logger.info(`Categories order updated: ${categoryIds.join(', ')}`);
|
|
249
|
-
res.status(200).json(result);
|
|
345
|
+
|
|
346
|
+
logger.info(`Categories order updated: ${categories.map(c => c._id).join(', ')}`);
|
|
347
|
+
res.json({ message: 'Order updated successfully' });
|
|
250
348
|
} catch (err) {
|
|
251
349
|
logger.error(`Category order update error: ${err.message}`);
|
|
252
350
|
res.status(500).json({ message: 'Failed to update categories order' });
|
|
253
351
|
}
|
|
254
352
|
},
|
|
353
|
+
|
|
255
354
|
async delete(req, res) {
|
|
256
355
|
try {
|
|
257
|
-
// Категория уже загружена middleware
|
|
258
356
|
const category = req.currentResource;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
357
|
+
|
|
358
|
+
// Переносим дочерние категории к родителю удаляемой
|
|
359
|
+
await Category.updateMany(
|
|
360
|
+
{ parent: category._id },
|
|
361
|
+
{
|
|
362
|
+
$set: { parent: category.parent },
|
|
363
|
+
$inc: { level: -1 }
|
|
364
|
+
}
|
|
365
|
+
);
|
|
366
|
+
|
|
367
|
+
// Обновляем url потомков если есть
|
|
368
|
+
if (category.parent) {
|
|
369
|
+
const parent = await Category.findById(category.parent);
|
|
370
|
+
const children = await Category.find({ parent: category.parent });
|
|
371
|
+
|
|
372
|
+
for (const child of children) {
|
|
373
|
+
await updateCategoryPaths(child._id, category.parent);
|
|
374
|
+
}
|
|
263
375
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
$graphLookup: {
|
|
269
|
-
from: 'categories',
|
|
270
|
-
startWith: '$_id',
|
|
271
|
-
connectFromField: '_id',
|
|
272
|
-
connectToField: 'parent',
|
|
273
|
-
as: 'descendants',
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
$project: { descendants: 1 },
|
|
278
|
-
},
|
|
279
|
-
]);
|
|
280
|
-
// Собираем id текущей категории и всех найденных потомков
|
|
281
|
-
const idsToDelete = [category._id, ...(result[0]?.descendants || []).map(({ _id }) => _id)];
|
|
282
|
-
// Собираем ID для очистки кэша
|
|
283
|
-
const categoryIdsTags = idsToDelete.map(id => `category_${id}`);
|
|
284
|
-
// Удаляем все категории одним запросом
|
|
285
|
-
await Category.deleteMany({ _id: { $in: idsToDelete } });
|
|
286
|
-
// Очищаем кэш для категорий
|
|
376
|
+
|
|
377
|
+
await Category.deleteOne({ _id: category._id });
|
|
378
|
+
|
|
379
|
+
// Очистка кеша
|
|
287
380
|
await cache.delByTags(['categories']);
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
// Очищаем кэш для организации, если категория ей принадлежала
|
|
291
|
-
if (ownerOrgId) {
|
|
292
|
-
await cache.delByTag(`organization_${ownerOrgId}`);
|
|
381
|
+
if (category.owner?.type === 'organization') {
|
|
382
|
+
await cache.delByTag(`organization_${category.owner.target}`);
|
|
293
383
|
}
|
|
294
|
-
|
|
295
|
-
|
|
384
|
+
|
|
385
|
+
logger.info(`Category deleted: ${category.slug}`);
|
|
386
|
+
res.json({ message: 'Category deleted successfully' });
|
|
296
387
|
} catch (err) {
|
|
297
388
|
logger.error(`Error deleting category: ${err.message}`);
|
|
298
|
-
res.status(500).json({ message: err.message
|
|
389
|
+
res.status(500).json({ message: err.message });
|
|
299
390
|
}
|
|
300
391
|
},
|
|
301
392
|
};
|
|
302
|
-
// Вспомогательная функция для построения дерева категорий
|
|
303
|
-
function buildAdjacencyTree(categories, sortParam, sortOrder) {
|
|
304
|
-
// Создаем карту категорий по ID для быстрого доступа
|
|
305
|
-
const categoryMap = new Map();
|
|
306
|
-
// Инициализируем каждую категорию с пустым массивом children
|
|
307
|
-
categories.forEach(category => {
|
|
308
|
-
categoryMap.set(category._id.toString(), {
|
|
309
|
-
...category,
|
|
310
|
-
children: [],
|
|
311
|
-
});
|
|
312
|
-
});
|
|
313
|
-
// Строим дерево, связывая родительские и дочерние категории
|
|
314
|
-
const rootCategories = [];
|
|
315
|
-
categories.forEach(category => {
|
|
316
|
-
const categoryWithChildren = categoryMap.get(category._id.toString());
|
|
317
|
-
// Если у категории есть родитель и этот родитель есть в нашей карте
|
|
318
|
-
if (category.parent && categoryMap.has(category.parent.toString())) {
|
|
319
|
-
const parentCategory = categoryMap.get(category.parent.toString());
|
|
320
|
-
parentCategory.children.push(categoryWithChildren);
|
|
321
|
-
}
|
|
322
|
-
// Иначе это корневая категория
|
|
323
|
-
else if (!category.parent) {
|
|
324
|
-
rootCategories.push(categoryWithChildren);
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
// Рекурсивная функция для сортировки категорий на всех уровнях
|
|
328
|
-
function sortCategories(nodes) {
|
|
329
|
-
if (!nodes || nodes.length === 0) {
|
|
330
|
-
return nodes;
|
|
331
|
-
}
|
|
332
|
-
// Сортируем текущий уровень
|
|
333
|
-
nodes.sort((a, b) => {
|
|
334
|
-
const valueA = a[sortParam] ?? (sortParam === 'order' ? Number.MAX_SAFE_INTEGER : '');
|
|
335
|
-
const valueB = b[sortParam] ?? (sortParam === 'order' ? Number.MAX_SAFE_INTEGER : '');
|
|
336
|
-
if (typeof valueA === 'number' && typeof valueB === 'number') {
|
|
337
|
-
return sortOrder === 'asc' ? valueA - valueB : valueB - valueA;
|
|
338
|
-
} else {
|
|
339
|
-
const stringA = String(valueA);
|
|
340
|
-
const stringB = String(valueB);
|
|
341
|
-
return sortOrder === 'asc' ? stringA.localeCompare(stringB) : stringB.localeCompare(stringA);
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
// Рекурсивно сортируем дочерние категории
|
|
345
|
-
nodes.forEach(node => {
|
|
346
|
-
if (node.children && node.children.length > 0) {
|
|
347
|
-
sortCategories(node.children);
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
return nodes;
|
|
351
|
-
}
|
|
352
|
-
// Сортируем категории на всех уровнях и возвращаем результат
|
|
353
|
-
return sortCategories(rootCategories);
|
|
354
|
-
}
|
|
355
393
|
};
|
|
356
|
-
|
|
394
|
+
|
|
395
|
+
export default controllerFactory;
|