@ozdao/martyrs 0.2.489 → 0.2.491
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/_virtual/index.cjs +4 -4
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.cjs +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/auth.server.cjs +2 -51
- package/dist/auth.server.js +1 -50
- package/dist/builder.cjs +90 -4
- package/dist/builder.js +90 -4
- package/dist/main-BhCqlPMQ.cjs +11 -0
- package/dist/{main-IVRL6IjM.js → main-YBlKbx0g.js} +1308 -1285
- package/dist/martyrs/src/components/Block/Block.vue.cjs +1 -1
- package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
- package/dist/martyrs/src/components/Button/Button.vue2.cjs +48 -21
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/Button/Button.vue2.js +49 -22
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue2.cjs → Loader.vue.cjs} +3 -3
- package/dist/martyrs/src/components/Loader/Loader.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +3 -3
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.cjs → Tooltip.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js.map → Tooltip.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- 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.js +2 -2
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- 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/blocks/CardEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.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/Event.vue.cjs +3 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.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.cjs +1 -2
- package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +1 -2
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
- 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 +10 -1
- 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 +10 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +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/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.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/layouts/MusicLayout.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- 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/Playlist.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- 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.js +2 -2
- 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/notifications/components/layouts/NotificationsLayout.vue.cjs +22 -8
- package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.js +23 -9
- package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.cjs +13 -15
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js +14 -16
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.cjs +2 -2
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +2 -2
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.cjs +2 -2
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.js +2 -2
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.cjs +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.js +7 -7
- package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/router/notifications.router.js +4 -4
- package/dist/martyrs/src/modules/notifications/router/notifications.router.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs +7 -10
- package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/store/notifications.store.js +7 -10
- package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.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/partials/ShopCart.vue.cjs +0 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +0 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- 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/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- 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/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +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/products/components/blocks/ProductDiscounts.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +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 +2 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.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/wallet/views/components/pages/Wallet.vue.cjs +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- 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 +142 -44
- package/dist/notifications.server.js +142 -44
- package/dist/orders.server.cjs +155 -102
- package/dist/orders.server.js +155 -102
- package/dist/products.server.cjs +4 -0
- package/dist/products.server.js +4 -0
- package/dist/profile.schema-BGAe5VN5.js +92 -0
- package/dist/profile.schema-pidHrksV.cjs +91 -0
- package/dist/style.css +65 -247
- package/dist/{web-BXhlxo6M.cjs → web-BBmMBRv-.cjs} +1 -1
- package/dist/{web-Czi05iGG.js → web-Dqu-aCL5.js} +1 -1
- package/package.json +1 -1
- package/src/builder/rspack/rspack.config.spa.client.js +46 -1
- package/src/builder/rspack/rspack.config.ssr.client.js +43 -0
- package/src/builder/templates/page.js +1 -1
- package/src/components/Button/Button.vue +230 -196
- package/src/components/Loader/Loader.vue +1 -1
- package/src/modules/auth/controllers/middlewares/visitor.logger.js +22 -0
- package/src/modules/globals/globals.client.js +1 -1
- package/src/modules/globals/views/components/layouts/Client.vue +10 -9
- package/src/modules/notifications/FIXES.md +4 -0
- package/src/modules/notifications/components/layouts/NotificationsLayout.vue +33 -32
- package/src/modules/notifications/components/pages/Notifications.vue +10 -51
- package/src/modules/notifications/components/sections/NotificationPreferences.vue +1 -11
- package/src/modules/notifications/components/sections/NotificationsList.vue +1 -1
- package/src/modules/notifications/controllers/notifications.controller.js +50 -4
- package/src/modules/notifications/notifications.client.js +1 -1
- package/src/modules/notifications/notifications.server.js +18 -7
- package/src/modules/notifications/routes/notifications.routes.js +4 -2
- package/src/modules/notifications/services/notification.service.js +109 -38
- package/src/modules/notifications/services/telegram.service.js +1 -0
- package/src/modules/notifications/services/whatsapp.service.js +1 -0
- package/src/modules/notifications/store/notifications.store.js +25 -16
- package/src/modules/orders/components/partials/ShopCart.vue +0 -1
- package/src/modules/orders/controllers/orders.controller.js +195 -85
- package/src/modules/products/controllers/products.controller.js +4 -0
- package/dist/main-CmuUC0tl.cjs +0 -11
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +0 -1
- package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/StoreDebugger.vue.cjs +0 -200
- package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/StoreDebugger.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/StoreDebugger.vue.js +0 -200
- package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/StoreDebugger.vue.js.map +0 -1
- package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/store-debugger.plugin.cjs +0 -21
- package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/store-debugger.plugin.cjs.map +0 -1
- package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/store-debugger.plugin.js +0 -21
- package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/store-debugger.plugin.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.cjs +0 -9
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.cjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -9
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/defaultOptions.cjs +0 -8
- package/dist/node_modules/date-fns/_lib/defaultOptions.cjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -8
- package/dist/node_modules/date-fns/_lib/defaultOptions.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/formatters.cjs +0 -653
- package/dist/node_modules/date-fns/_lib/format/formatters.cjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -653
- package/dist/node_modules/date-fns/_lib/format/formatters.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.cjs +0 -63
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.cjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -63
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/longFormatters.cjs +0 -59
- package/dist/node_modules/date-fns/_lib/format/longFormatters.cjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -59
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +0 -21
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -21
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeDates.cjs +0 -12
- package/dist/node_modules/date-fns/_lib/normalizeDates.cjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -12
- package/dist/node_modules/date-fns/_lib/normalizeDates.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/protectedTokens.cjs +0 -24
- package/dist/node_modules/date-fns/_lib/protectedTokens.cjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -24
- package/dist/node_modules/date-fns/_lib/protectedTokens.js.map +0 -1
- package/dist/node_modules/date-fns/constants.cjs +0 -9
- package/dist/node_modules/date-fns/constants.cjs.map +0 -1
- package/dist/node_modules/date-fns/constants.js +0 -9
- package/dist/node_modules/date-fns/constants.js.map +0 -1
- package/dist/node_modules/date-fns/constructFrom.cjs +0 -13
- package/dist/node_modules/date-fns/constructFrom.cjs.map +0 -1
- package/dist/node_modules/date-fns/constructFrom.js +0 -13
- package/dist/node_modules/date-fns/constructFrom.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.cjs +0 -21
- package/dist/node_modules/date-fns/differenceInCalendarDays.cjs.map +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -21
- package/dist/node_modules/date-fns/differenceInCalendarDays.js.map +0 -1
- package/dist/node_modules/date-fns/format.cjs +0 -80
- package/dist/node_modules/date-fns/format.cjs.map +0 -1
- package/dist/node_modules/date-fns/format.js +0 -80
- package/dist/node_modules/date-fns/format.js.map +0 -1
- package/dist/node_modules/date-fns/getDayOfYear.cjs +0 -14
- package/dist/node_modules/date-fns/getDayOfYear.cjs.map +0 -1
- package/dist/node_modules/date-fns/getDayOfYear.js +0 -14
- package/dist/node_modules/date-fns/getDayOfYear.js.map +0 -1
- package/dist/node_modules/date-fns/getISOWeek.cjs +0 -14
- package/dist/node_modules/date-fns/getISOWeek.cjs.map +0 -1
- package/dist/node_modules/date-fns/getISOWeek.js +0 -14
- package/dist/node_modules/date-fns/getISOWeek.js.map +0 -1
- package/dist/node_modules/date-fns/getISOWeekYear.cjs +0 -27
- package/dist/node_modules/date-fns/getISOWeekYear.cjs.map +0 -1
- package/dist/node_modules/date-fns/getISOWeekYear.js +0 -27
- package/dist/node_modules/date-fns/getISOWeekYear.js.map +0 -1
- package/dist/node_modules/date-fns/getWeek.cjs +0 -14
- package/dist/node_modules/date-fns/getWeek.cjs.map +0 -1
- package/dist/node_modules/date-fns/getWeek.js +0 -14
- package/dist/node_modules/date-fns/getWeek.js.map +0 -1
- package/dist/node_modules/date-fns/getWeekYear.cjs +0 -31
- package/dist/node_modules/date-fns/getWeekYear.cjs.map +0 -1
- package/dist/node_modules/date-fns/getWeekYear.js +0 -31
- package/dist/node_modules/date-fns/getWeekYear.js.map +0 -1
- package/dist/node_modules/date-fns/isDate.cjs +0 -8
- package/dist/node_modules/date-fns/isDate.cjs.map +0 -1
- package/dist/node_modules/date-fns/isDate.js +0 -8
- package/dist/node_modules/date-fns/isDate.js.map +0 -1
- package/dist/node_modules/date-fns/isValid.cjs +0 -10
- package/dist/node_modules/date-fns/isValid.cjs.map +0 -1
- package/dist/node_modules/date-fns/isValid.js +0 -10
- package/dist/node_modules/date-fns/isValid.js.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +0 -11
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -11
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +0 -21
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -21
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +0 -44
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -44
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +0 -17
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -17
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +0 -86
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -86
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +0 -37
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -37
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +0 -13
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -13
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.cjs +0 -165
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -165
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.cjs +0 -123
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -123
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US.cjs +0 -22
- package/dist/node_modules/date-fns/locale/en-US.cjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US.js +0 -22
- package/dist/node_modules/date-fns/locale/en-US.js.map +0 -1
- package/dist/node_modules/date-fns/startOfDay.cjs +0 -11
- package/dist/node_modules/date-fns/startOfDay.cjs.map +0 -1
- package/dist/node_modules/date-fns/startOfDay.js +0 -11
- package/dist/node_modules/date-fns/startOfDay.js.map +0 -1
- package/dist/node_modules/date-fns/startOfISOWeek.cjs +0 -9
- package/dist/node_modules/date-fns/startOfISOWeek.cjs.map +0 -1
- package/dist/node_modules/date-fns/startOfISOWeek.js +0 -9
- package/dist/node_modules/date-fns/startOfISOWeek.js.map +0 -1
- package/dist/node_modules/date-fns/startOfISOWeekYear.cjs +0 -15
- package/dist/node_modules/date-fns/startOfISOWeekYear.cjs.map +0 -1
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -15
- package/dist/node_modules/date-fns/startOfISOWeekYear.js.map +0 -1
- package/dist/node_modules/date-fns/startOfWeek.cjs +0 -18
- package/dist/node_modules/date-fns/startOfWeek.cjs.map +0 -1
- package/dist/node_modules/date-fns/startOfWeek.js +0 -18
- package/dist/node_modules/date-fns/startOfWeek.js.map +0 -1
- package/dist/node_modules/date-fns/startOfWeekYear.cjs +0 -20
- package/dist/node_modules/date-fns/startOfWeekYear.cjs.map +0 -1
- package/dist/node_modules/date-fns/startOfWeekYear.js +0 -20
- package/dist/node_modules/date-fns/startOfWeekYear.js.map +0 -1
- package/dist/node_modules/date-fns/startOfYear.cjs +0 -12
- package/dist/node_modules/date-fns/startOfYear.cjs.map +0 -1
- package/dist/node_modules/date-fns/startOfYear.js +0 -12
- package/dist/node_modules/date-fns/startOfYear.js.map +0 -1
- package/dist/node_modules/date-fns/toDate.cjs +0 -9
- package/dist/node_modules/date-fns/toDate.cjs.map +0 -1
- package/dist/node_modules/date-fns/toDate.js +0 -9
- package/dist/node_modules/date-fns/toDate.js.map +0 -1
- package/dist/profile.schema-DchVS-Jr.js +0 -21
- package/dist/profile.schema-yQuIzngl.cjs +0 -20
|
@@ -19,57 +19,6 @@ function formatOrderMessage(order) {
|
|
|
19
19
|
🧑 Agent: ${order.referralCode}
|
|
20
20
|
`;
|
|
21
21
|
}
|
|
22
|
-
async function findOrCreateCustomer(Customer, customerInfo, orderOwner, orderCreator) {
|
|
23
|
-
let searchCriteria = {};
|
|
24
|
-
if (customerInfo.phone) {
|
|
25
|
-
searchCriteria.phone = customerInfo.phone;
|
|
26
|
-
}
|
|
27
|
-
if (customerInfo.email) {
|
|
28
|
-
searchCriteria.email = customerInfo.email;
|
|
29
|
-
}
|
|
30
|
-
let customer = null;
|
|
31
|
-
// Проверяем, есть ли критерии для поиска
|
|
32
|
-
if (Object.keys(searchCriteria).length > 0) {
|
|
33
|
-
customer = await Customer.findOne({ $or: [searchCriteria] });
|
|
34
|
-
}
|
|
35
|
-
if (!customer) {
|
|
36
|
-
// Handle the case when creator.target is null
|
|
37
|
-
let creatorType = customerInfo.creator?.type || orderCreator.type;
|
|
38
|
-
let creatorTarget = customerInfo.creator?.target || orderCreator.target;
|
|
39
|
-
// If creator target is still null, use the organization as creator
|
|
40
|
-
if (!creatorTarget) {
|
|
41
|
-
creatorType = orderOwner.type;
|
|
42
|
-
creatorTarget = orderOwner.target;
|
|
43
|
-
}
|
|
44
|
-
// Create new customer with proper creator fields
|
|
45
|
-
const newCustomerData = {
|
|
46
|
-
...customerInfo,
|
|
47
|
-
// Ensure we're not passing any null _id that might override MongoDB's auto-generation
|
|
48
|
-
_id: undefined, // Let MongoDB generate this
|
|
49
|
-
owner: orderOwner,
|
|
50
|
-
creator: {
|
|
51
|
-
type: creatorType,
|
|
52
|
-
target: creatorTarget,
|
|
53
|
-
},
|
|
54
|
-
identity: {
|
|
55
|
-
type: customerInfo.identity?.type || creatorType,
|
|
56
|
-
target: customerInfo.identity?.target || creatorTarget,
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
try {
|
|
60
|
-
customer = await Customer.create(newCustomerData);
|
|
61
|
-
// Verify the customer was created with an _id
|
|
62
|
-
if (!customer || !customer._id) {
|
|
63
|
-
console.error('Customer creation failed to generate _id:', customer);
|
|
64
|
-
throw new Error('Customer creation did not generate a valid _id');
|
|
65
|
-
}
|
|
66
|
-
} catch (err) {
|
|
67
|
-
console.error('Error creating customer:', err);
|
|
68
|
-
throw err;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return customer;
|
|
72
|
-
}
|
|
73
22
|
async function sendOrderMessage(orderData) {
|
|
74
23
|
try {
|
|
75
24
|
const formattedMessage = formatOrderMessage(orderData);
|
|
@@ -78,9 +27,183 @@ async function sendOrderMessage(orderData) {
|
|
|
78
27
|
console.error(err);
|
|
79
28
|
}
|
|
80
29
|
}
|
|
30
|
+
import visitorLoggerFactory from '@martyrs/src/modules/auth/controllers/middlewares/visitor.logger.js';
|
|
31
|
+
|
|
81
32
|
const controllerFactory = db => {
|
|
82
33
|
const Order = db.order;
|
|
83
34
|
const Customer = db.customer;
|
|
35
|
+
const Department = db.department;
|
|
36
|
+
const { findOrCreateVisitor } = visitorLoggerFactory(db);
|
|
37
|
+
|
|
38
|
+
// Оптимизированная функция получения пользователей с доступом orders.confirm
|
|
39
|
+
const getUsersWithOrdersConfirmAccess = async (organizationId) => {
|
|
40
|
+
console.log('=== Getting users with orders.confirm access ===');
|
|
41
|
+
console.log('Organization ID:', organizationId);
|
|
42
|
+
|
|
43
|
+
const pipeline = [
|
|
44
|
+
{ $match: {
|
|
45
|
+
organization: new db.mongoose.Types.ObjectId(organizationId),
|
|
46
|
+
'accesses.orders.confirm': true
|
|
47
|
+
}},
|
|
48
|
+
{ $unwind: '$members' },
|
|
49
|
+
{ $group: {
|
|
50
|
+
_id: '$members.user'
|
|
51
|
+
}},
|
|
52
|
+
{ $project: { userId: '$_id' }}
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
console.log('Pipeline:', JSON.stringify(pipeline, null, 2));
|
|
56
|
+
|
|
57
|
+
const result = await Department.aggregate(pipeline);
|
|
58
|
+
const userIds = result.map(item => item.userId);
|
|
59
|
+
|
|
60
|
+
console.log('Found departments with access:', result.length);
|
|
61
|
+
console.log('User IDs with access:', userIds);
|
|
62
|
+
console.log('=== End getting users ===');
|
|
63
|
+
|
|
64
|
+
return userIds;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// Отправка уведомлений о заказах - только данные
|
|
68
|
+
const sendOrderNotifications = async (order, type, userIds, extraData = {}) => {
|
|
69
|
+
console.log('=== Sending order notifications ===');
|
|
70
|
+
console.log('Order ID:', order._id);
|
|
71
|
+
console.log('Type:', type);
|
|
72
|
+
console.log('User IDs:', userIds);
|
|
73
|
+
console.log('Extra data:', extraData);
|
|
74
|
+
|
|
75
|
+
if (!userIds || userIds.length === 0) {
|
|
76
|
+
console.log('No users to notify, skipping...');
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const notifications = userIds.map(userId => ({
|
|
81
|
+
title: getNotificationTitle(type, order, extraData),
|
|
82
|
+
body: getNotificationBody(type, order, extraData),
|
|
83
|
+
type: type,
|
|
84
|
+
metadata: {
|
|
85
|
+
type: type,
|
|
86
|
+
orderId: order._id,
|
|
87
|
+
context: 'organization',
|
|
88
|
+
...extraData
|
|
89
|
+
},
|
|
90
|
+
userId: userId
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
// Функции для генерации заголовков и текста
|
|
94
|
+
function getNotificationTitle(type, order, extraData = {}) {
|
|
95
|
+
switch(type) {
|
|
96
|
+
case 'order_created':
|
|
97
|
+
return 'New Order';
|
|
98
|
+
case 'order_status':
|
|
99
|
+
return 'Order Status Updated';
|
|
100
|
+
default:
|
|
101
|
+
return 'Order Notification';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function getNotificationBody(type, order, extraData = {}) {
|
|
106
|
+
switch(type) {
|
|
107
|
+
case 'order_created':
|
|
108
|
+
return `New order #${order._id} created`;
|
|
109
|
+
case 'order_status':
|
|
110
|
+
return `Order #${order._id} changed from ${extraData.oldStatus} to ${extraData.newStatus}`;
|
|
111
|
+
default:
|
|
112
|
+
return `Order #${order._id} updated`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
console.log('Prepared notifications:', JSON.stringify(notifications, null, 2));
|
|
117
|
+
console.log('API URL:', `${process.env.API_URL || ''}/api/notifications/batch`);
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
// ОДИН POST запрос со всеми уведомлениями
|
|
121
|
+
const response = await fetch(`${process.env.API_URL || ''}/api/notifications/batch`, {
|
|
122
|
+
method: 'POST',
|
|
123
|
+
headers: {
|
|
124
|
+
'Content-Type': 'application/json',
|
|
125
|
+
'X-Service-Key': process.env.SERVICE_KEY,
|
|
126
|
+
},
|
|
127
|
+
body: JSON.stringify({ notifications }),
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
console.log('Notification response status:', response.status);
|
|
131
|
+
|
|
132
|
+
if (!response.ok) {
|
|
133
|
+
const errorData = await response.text();
|
|
134
|
+
console.error('Notification API error:', errorData);
|
|
135
|
+
throw new Error(`Notification API failed: ${response.status} - ${errorData}`);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const result = await response.json();
|
|
139
|
+
console.log('Notification API success:', result);
|
|
140
|
+
console.log('=== End sending notifications ===');
|
|
141
|
+
|
|
142
|
+
return result;
|
|
143
|
+
} catch (error) {
|
|
144
|
+
console.error('=== Notification sending failed ===');
|
|
145
|
+
console.error('Error:', error.message);
|
|
146
|
+
console.error('Stack:', error.stack);
|
|
147
|
+
throw error;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const findOrCreateCustomer = async (customerInfo, orderOwner, orderCreator, req) => {
|
|
152
|
+
let searchCriteria = {};
|
|
153
|
+
if (customerInfo.phone) {
|
|
154
|
+
searchCriteria.phone = customerInfo.phone;
|
|
155
|
+
}
|
|
156
|
+
if (customerInfo.email) {
|
|
157
|
+
searchCriteria.email = customerInfo.email;
|
|
158
|
+
}
|
|
159
|
+
let customer = null;
|
|
160
|
+
// Проверяем, есть ли критерии для поиска
|
|
161
|
+
if (Object.keys(searchCriteria).length > 0) {
|
|
162
|
+
customer = await Customer.findOne({ $or: [searchCriteria] });
|
|
163
|
+
}
|
|
164
|
+
if (!customer) {
|
|
165
|
+
// Create visitor for anonymous customer
|
|
166
|
+
const visitor = await findOrCreateVisitor(req);
|
|
167
|
+
|
|
168
|
+
// Handle the case when creator.target is null
|
|
169
|
+
let creatorType = customerInfo.creator?.type || orderCreator.type;
|
|
170
|
+
let creatorTarget = customerInfo.creator?.target || orderCreator.target;
|
|
171
|
+
// If creator target is still null, use the organization as creator
|
|
172
|
+
if (!creatorTarget) {
|
|
173
|
+
creatorType = orderOwner.type;
|
|
174
|
+
creatorTarget = orderOwner.target;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Create new customer with proper creator fields
|
|
178
|
+
const newCustomerData = {
|
|
179
|
+
...customerInfo,
|
|
180
|
+
// Ensure we're not passing any null _id that might override MongoDB's auto-generation
|
|
181
|
+
_id: undefined, // Let MongoDB generate this
|
|
182
|
+
owner: orderOwner,
|
|
183
|
+
creator: {
|
|
184
|
+
type: creatorType,
|
|
185
|
+
target: creatorTarget,
|
|
186
|
+
},
|
|
187
|
+
identity: {
|
|
188
|
+
type: 'Visitor',
|
|
189
|
+
target: visitor._id,
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
try {
|
|
193
|
+
customer = await Customer.create(newCustomerData);
|
|
194
|
+
// Verify the customer was created with an _id
|
|
195
|
+
if (!customer || !customer._id) {
|
|
196
|
+
console.error('Customer creation failed to generate _id:', customer);
|
|
197
|
+
throw new Error('Customer creation did not generate a valid _id');
|
|
198
|
+
}
|
|
199
|
+
} catch (err) {
|
|
200
|
+
console.error('Error creating customer:', err);
|
|
201
|
+
throw err;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return customer;
|
|
205
|
+
};
|
|
206
|
+
|
|
84
207
|
// Создание заказа
|
|
85
208
|
const create = async (req, res) => {
|
|
86
209
|
const orderData = req.body;
|
|
@@ -100,7 +223,7 @@ const controllerFactory = db => {
|
|
|
100
223
|
try {
|
|
101
224
|
// In your create controller function
|
|
102
225
|
if (!orderData.customer.target) {
|
|
103
|
-
const customer = await findOrCreateCustomer(
|
|
226
|
+
const customer = await findOrCreateCustomer(orderData.customer, orderData.owner, orderData.creator, req);
|
|
104
227
|
console.log('customer is', customer);
|
|
105
228
|
// Make sure we have a valid customer ID
|
|
106
229
|
if (!customer || !customer._id) {
|
|
@@ -126,8 +249,17 @@ const controllerFactory = db => {
|
|
|
126
249
|
// Don't process positions during order creation - moved to update when status changes to confirmed
|
|
127
250
|
// Commit the transaction
|
|
128
251
|
await session.commitTransaction();
|
|
252
|
+
|
|
253
|
+
// ПОСЛЕ транзакции - отправка уведомлений
|
|
254
|
+
try {
|
|
255
|
+
const usersWithAccess = await getUsersWithOrdersConfirmAccess(orderData.owner.target);
|
|
256
|
+
await sendOrderNotifications(createdOrder, 'order_created', usersWithAccess);
|
|
257
|
+
} catch (notificationError) {
|
|
258
|
+
console.error('Error sending notification:', notificationError);
|
|
259
|
+
}
|
|
260
|
+
|
|
129
261
|
// Send notification
|
|
130
|
-
sendOrderMessage(orderData).catch(console.error);
|
|
262
|
+
// sendOrderMessage(orderData).catch(console.error);
|
|
131
263
|
// Return the created order
|
|
132
264
|
res.status(201).send(createdOrder);
|
|
133
265
|
} catch (err) {
|
|
@@ -364,44 +496,22 @@ const controllerFactory = db => {
|
|
|
364
496
|
await session.commitTransaction();
|
|
365
497
|
console.log('Transaction committed successfully');
|
|
366
498
|
|
|
367
|
-
//
|
|
499
|
+
// ПОСЛЕ транзакции - отправка уведомлений
|
|
368
500
|
if (statusChanged) {
|
|
369
501
|
console.log('Sending notification for status change...');
|
|
370
502
|
try {
|
|
371
|
-
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
newStatus: order.status,
|
|
380
|
-
positions: order.positions,
|
|
381
|
-
},
|
|
382
|
-
userId: order.creator.target, // Assuming creator.target holds the user ID
|
|
383
|
-
};
|
|
384
|
-
console.log('Notification data:', JSON.stringify(notificationData));
|
|
385
|
-
// Send notification using the notification service
|
|
386
|
-
const notificationResponse = await fetch(`${process.env.API_URL || ''}/api/notifications`, {
|
|
387
|
-
method: 'POST',
|
|
388
|
-
headers: {
|
|
389
|
-
'Content-Type': 'application/json',
|
|
390
|
-
'X-Service-Key': process.env.SERVICE_KEY,
|
|
391
|
-
},
|
|
392
|
-
body: JSON.stringify(notificationData),
|
|
503
|
+
const usersWithAccess = await getUsersWithOrdersConfirmAccess(order.owner.target);
|
|
504
|
+
const filteredUsers = usersWithAccess.filter(userId =>
|
|
505
|
+
userId.toString() !== order.creator.target.toString()
|
|
506
|
+
);
|
|
507
|
+
|
|
508
|
+
await sendOrderNotifications(order, 'order_status', filteredUsers, {
|
|
509
|
+
oldStatus: oldStatus,
|
|
510
|
+
newStatus: order.status,
|
|
393
511
|
});
|
|
394
|
-
console.log('Notification
|
|
395
|
-
if (!notificationResponse.ok) {
|
|
396
|
-
const errorData = await notificationResponse.json();
|
|
397
|
-
console.error(`Failed to create notification: ${JSON.stringify(errorData)}`);
|
|
398
|
-
// Continue execution, don't fail the request if notification fails
|
|
399
|
-
} else {
|
|
400
|
-
console.log('Notification sent successfully');
|
|
401
|
-
}
|
|
512
|
+
console.log('Notification sent successfully');
|
|
402
513
|
} catch (notificationError) {
|
|
403
514
|
console.error('Error sending notification:', notificationError);
|
|
404
|
-
// Continue execution, don't fail the request if notification fails
|
|
405
515
|
}
|
|
406
516
|
}
|
|
407
517
|
|
|
@@ -33,6 +33,10 @@ const controllerFactory = db => {
|
|
|
33
33
|
...queryProcessorGlobals.getSearchOptions(req.query.search, {
|
|
34
34
|
fields: ['name', 'description']
|
|
35
35
|
}),
|
|
36
|
+
...queryProcessorGlobals.getFilterDate(req.query.dateStart, req.query.dateEnd, {
|
|
37
|
+
start: 'startDate',
|
|
38
|
+
end: 'endDate',
|
|
39
|
+
}),
|
|
36
40
|
...queryProcessorGlobals.getPriceConditions(req.query.prices),
|
|
37
41
|
...queryProcessorProducts.getCategoriesFilterStage(req.query.categories),
|
|
38
42
|
...queryProcessorProducts.getDeliveryFilterStage(req.query.delivery),
|