@ozdao/martyrs 0.2.604 → 0.2.605
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/README.md +2 -2
- package/dist/_virtual/dayjs.min.js +1 -1
- package/dist/_virtual/weekOfYear.js +1 -1
- package/dist/{abac-Blt8bUTL.js → abac-kz5xI99l.js} +1 -0
- package/dist/auth.server.js +52 -12
- package/dist/builder.js +67 -2
- package/dist/chats.server.js +2 -2
- package/dist/community.server.js +3 -3
- package/dist/core.server.js +2 -2
- package/dist/{core.websocket-Cl76z2wT.js → core.websocket-B2FA8gGl.js} +0 -2
- package/dist/{crud-BT5FIvQC.js → crud-Cwn0frBP.js} +8 -2
- package/dist/events.server.js +4 -4
- package/dist/files.server.js +1 -1
- package/dist/gallery.server.js +2 -2
- package/dist/governance.server.js +10 -10
- package/dist/{index-kvBwwb0w.js → index-CPACC651.js} +1 -1
- package/dist/inventory.server.js +4 -4
- package/dist/{mailing-DT7nbNjZ.js → mailing-BBCidXGr.js} +38 -2
- package/dist/marketplace.server.js +2 -2
- package/dist/martyrs/dist/martyrs.es3.js +1 -1
- package/dist/martyrs/dist/martyrs.es3.js.map +1 -1
- package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js +1 -1
- package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js.map +1 -1
- package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js +1 -1
- package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js.map +1 -1
- package/dist/{node_modules/.pnpm/vue-draggable-next@2.2.1_sortablejs@1.15.6_vue@3.5.13_typescript@5.8.3_ → martyrs/node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.7_vue@3.5.13}/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +305 -268
- package/dist/martyrs/node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.7_vue@3.5.13/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js.map +1 -0
- package/dist/martyrs/src/components/Address/Address.vue2.js +13 -13
- package/dist/martyrs/src/components/Address/Address.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
- package/dist/martyrs/src/components/Button/Button.vue2.js +1 -1
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.js +150 -143
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Chart/Chart.vue.js +296 -0
- package/dist/martyrs/src/components/Chart/Chart.vue.js.map +1 -0
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.js +5 -6
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -1
- package/dist/martyrs/src/components/Countdown/Countdown.vue.js +5 -5
- package/dist/martyrs/src/components/Countdown/Countdown.vue.js.map +1 -1
- package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js +2 -2
- package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +6 -6
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
- package/dist/martyrs/src/components/EmptyState/EmptyState.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js +4 -4
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js +3 -3
- package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js.map +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +27 -21
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Map/Map.vue.js +20 -16
- package/dist/martyrs/src/components/Map/Map.vue.js.map +1 -1
- package/dist/martyrs/src/components/Popup/Popup.vue.js +3 -4
- package/dist/martyrs/src/components/Popup/Popup.vue.js.map +1 -1
- package/dist/martyrs/src/components/Radio/Radio.vue.js +12 -10
- package/dist/martyrs/src/components/Radio/Radio.vue.js.map +1 -1
- package/dist/martyrs/src/components/Select/Select.vue.js +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
- package/dist/martyrs/src/components/Status/Snack.vue.js +1 -1
- package/dist/martyrs/src/components/Status/Snack.vue.js.map +1 -1
- package/dist/martyrs/src/components/Status/Status.vue.js +1 -1
- package/dist/martyrs/src/components/Status/Status.vue.js.map +1 -1
- package/dist/martyrs/src/components/Table/Table.vue.js +21 -4
- package/dist/martyrs/src/components/Table/Table.vue.js.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/Tree/Tree.vue.js +1 -1
- package/dist/martyrs/src/components/Upload/Upload.vue2.js +2 -2
- package/dist/martyrs/src/components/Upload/Upload.vue2.js.map +1 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +2 -2
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js.map +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/auth.client.js +14 -2
- package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js +4 -4
- package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/PopupAuth.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/SidebarUserCard.vue.js +96 -0
- package/dist/martyrs/src/modules/auth/views/components/blocks/SidebarUserCard.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/BackofficeUsers.vue.js +337 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/BackofficeUsers.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +32 -18
- 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.js +76 -40
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +6 -5
- 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.js +4 -4
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +3 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js +28 -16
- package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/FeaturedUsers.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/FeaturedUsers.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/middlewares/auth.validation.js +6 -2
- package/dist/martyrs/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.backoffice.router.js +53 -0
- package/dist/martyrs/src/modules/auth/views/router/users.backoffice.router.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.js +2 -2
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js +179 -253
- package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js +105 -44
- package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js +11 -5
- package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js +1 -1
- package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/community.client.js +4 -4
- package/dist/martyrs/src/modules/community/community.client.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +4 -4
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/ImageUpload.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/ImageUpload.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/core.client.js +18 -16
- package/dist/martyrs/src/modules/core/core.client.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/classes/core.app.js +25 -6
- package/dist/martyrs/src/modules/core/views/classes/core.app.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/classes/module.manager.js +4 -2
- package/dist/martyrs/src/modules/core/views/classes/module.manager.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/AlertDialog.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/AlertDialog.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSlider.vue.js +132 -0
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSlider.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +3 -3
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardStat.vue.js +6 -28
- package/dist/martyrs/src/modules/core/views/components/blocks/CardStat.vue.js.map +1 -1
- package/dist/martyrs/src/modules/{auth → core}/views/components/blocks/CardUser.vue.js +29 -11
- package/dist/martyrs/src/modules/{auth → core}/views/components/blocks/CardUser.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/HelpCard.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/blocks/HelpCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +41 -26
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +2 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue.js +5 -5
- package/dist/martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/CitySelection.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/CitySelection.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Footer.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/Footer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +4 -4
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/LocationSelection.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/LocationSelection.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js +3 -3
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js +6 -6
- package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/mixins/mixins.js +14 -1
- package/dist/martyrs/src/modules/core/views/mixins/mixins.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/plugins/date-picker.plugin.js +8 -5
- package/dist/martyrs/src/modules/core/views/plugins/date-picker.plugin.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/store/core.store.js +4 -0
- package/dist/martyrs/src/modules/core/views/store/core.store.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +3 -0
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +9 -9
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/events.client.js +4 -4
- package/dist/martyrs/src/modules/events/events.client.js.map +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/gallery/router/gallery.router.js +3 -3
- package/dist/martyrs/src/modules/gallery/router/gallery.router.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardInitiativeItem.vue.js +3 -3
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardInitiativeItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardSprintItem.vue.js +4 -4
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardSprintItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardTaskItem.vue.js +2 -2
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardTaskItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardVotingItem.vue.js +3 -3
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardVotingItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/pages/Initiatives.vue.js +3 -3
- package/dist/martyrs/src/modules/governance/views/components/pages/Initiatives.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/partials/TaskStatusBadge.vue.js +1 -1
- package/dist/martyrs/src/modules/governance/views/components/partials/TaskStatusBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/sections/FormSprintDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/governance/views/components/sections/FormSprintDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/sections/FormTaskDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/governance/views/components/sections/FormTaskDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/router/governance.router.js +3 -3
- package/dist/martyrs/src/modules/governance/views/router/governance.router.js.map +1 -1
- package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js +2 -2
- package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/entities/IconApplications.vue.js +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconApplications.vue.js.map +1 -0
- package/dist/martyrs/src/modules/icons/entities/IconCustomers.vue.js +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconCustomers.vue.js.map +1 -0
- package/dist/martyrs/src/modules/icons/entities/IconUsers.vue.js +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconUsers.vue.js.map +1 -0
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +290 -173
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/inventory.client.js +4 -4
- package/dist/martyrs/src/modules/inventory/inventory.client.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/router/inventory.router.js +15 -0
- package/dist/martyrs/src/modules/inventory/router/inventory.router.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js +4 -4
- package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js +3 -3
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +2 -2
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionHeroToken.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionHeroToken.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js +2 -2
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionRoadmap.vue.js +2 -2
- package/dist/martyrs/src/modules/landing/components/sections/SectionRoadmap.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +3 -3
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +6 -6
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +5 -5
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +8 -8
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +5 -5
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +11 -11
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +11 -11
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +4 -4
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +162 -68
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.js +181 -17
- package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/router/notifications.backoffice.router.js +21 -0
- package/dist/martyrs/src/modules/notifications/router/notifications.backoffice.router.js.map +1 -0
- package/dist/martyrs/src/modules/notifications/router/notifications.router.js +13 -42
- package/dist/martyrs/src/modules/notifications/router/notifications.router.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/store/notifications.store.js +66 -1
- package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js +9 -7
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js +11 -9
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrder.vue.js +9 -9
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrder.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +66 -19
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js +29 -27
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +7 -12
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js +4 -4
- package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +46 -25
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js +54 -38
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +454 -139
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +2 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +141 -68
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +38 -32
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +4 -4
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/AskToLogin.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/AskToLogin.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +167 -95
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.js +22 -20
- package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/orders.js +3 -5
- package/dist/martyrs/src/modules/orders/store/orders.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.js +5 -5
- package/dist/martyrs/src/modules/orders/store/shopcart.js.map +1 -1
- package/dist/martyrs/src/modules/orders/utils/rent-price.js +60 -0
- package/dist/martyrs/src/modules/orders/utils/rent-price.js.map +1 -0
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +45 -55
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/EmptyState.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/Rating.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +8 -8
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +216 -83
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +35 -25
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +3 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +20 -18
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/organizations.client.js +39 -33
- package/dist/martyrs/src/modules/organizations/organizations.client.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.backoffice.router.js +81 -0
- package/dist/martyrs/src/modules/organizations/router/organizations.backoffice.router.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/Pages.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/Pages.vue.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/router/pages.router.js +2 -2
- package/dist/martyrs/src/modules/pages/views/router/pages.router.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js.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/blocks/ProductVariants.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Price.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/elements/Price.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +9 -25
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +34 -17
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +96 -96
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +22 -9
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/router/categories.router.js +2 -2
- package/dist/martyrs/src/modules/products/router/categories.router.js.map +1 -1
- package/dist/martyrs/src/modules/products/router/products.router.js +17 -3
- package/dist/martyrs/src/modules/products/router/products.router.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js +11 -10
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js +197 -81
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +685 -80
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +68 -18
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/router/rents.router.js +3 -3
- package/dist/martyrs/src/modules/rents/views/router/rents.router.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/store/rents.store.js +1 -1
- package/dist/martyrs/src/modules/rents/views/store/rents.store.js.map +1 -1
- package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js +3 -3
- package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js.map +1 -1
- package/dist/martyrs/src/modules/reports/router/reports.router.js +1 -1
- package/dist/martyrs/src/modules/reports/router/reports.router.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +5 -5
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +3 -3
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +9 -7
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +29 -37
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +8 -8
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/router/spots.router.js +3 -3
- package/dist/martyrs/src/modules/spots/router/spots.router.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/router/wallet.router.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/router/wallet.router.js.map +1 -1
- package/dist/martyrs.es10.js +59 -57
- package/dist/martyrs.es106.js +2 -2
- package/dist/martyrs.es11.js +31 -30
- package/dist/martyrs.es113.js +22 -166
- package/dist/martyrs.es114.js +4 -457
- package/dist/martyrs.es115.js +8 -40
- package/dist/martyrs.es116.js +166 -9
- package/dist/martyrs.es117.js +451 -43
- package/dist/martyrs.es118.js +38 -10
- package/dist/martyrs.es119.js +9 -44
- package/dist/martyrs.es12.js +8 -9
- package/dist/martyrs.es120.js +49 -4
- package/dist/martyrs.es121.js +10 -127
- package/dist/martyrs.es122.js +42 -98
- package/dist/martyrs.es123.js +4 -86
- package/dist/martyrs.es124.js +120 -29
- package/dist/martyrs.es125.js +99 -10
- package/dist/martyrs.es126.js +71 -24
- package/dist/martyrs.es127.js +37 -8
- package/dist/martyrs.es128.js +11 -22
- package/dist/martyrs.es129.js +39 -4
- package/dist/martyrs.es13.js +22 -19
- package/dist/martyrs.es130.js +9 -8
- package/dist/martyrs.es131.js +7 -7
- package/dist/martyrs.es132.js +2 -2
- package/dist/martyrs.es133.js +1 -1
- package/dist/martyrs.es135.js +1 -1
- package/dist/martyrs.es137.js +1 -1
- package/dist/martyrs.es138.js +7 -8
- package/dist/martyrs.es139.js +8 -7
- package/dist/martyrs.es14.js +2 -2
- package/dist/martyrs.es140.js +2 -2
- package/dist/martyrs.es144.js +10 -29
- package/dist/martyrs.es145.js +29 -10
- package/dist/martyrs.es146.js +2 -2
- package/dist/martyrs.es147.js +2 -2
- package/dist/martyrs.es149.js +1 -1
- package/dist/martyrs.es2.js +31 -30
- package/dist/martyrs.es22.js +16 -16
- package/dist/martyrs.es23.js +8 -8
- package/dist/martyrs.es24.js +9 -9
- package/dist/martyrs.es26.js +9 -11
- package/dist/martyrs.es27.js +9 -9
- package/dist/martyrs.es28.js +1 -1
- package/dist/martyrs.es29.js +5 -5
- package/dist/martyrs.es3.js +1 -1
- package/dist/martyrs.es38.js +1 -1
- package/dist/martyrs.es4.js +12 -12
- package/dist/martyrs.es41.js +34 -224
- package/dist/martyrs.es5.js +251 -238
- package/dist/martyrs.es61.js +33 -26
- package/dist/martyrs.es74.js +7 -7
- package/dist/martyrs.es76.js +12 -12
- package/dist/martyrs.es8.js +31 -31
- package/dist/music.server.js +3 -3
- package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@2.0.2/node_modules/@googlemaps/js-api-loader/dist/index.js +90 -0
- package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@2.0.2/node_modules/@googlemaps/js-api-loader/dist/index.js.map +1 -0
- package/dist/notifications.server.js +255 -23
- package/dist/orders.server.js +674 -136
- package/dist/organizations.server.js +11 -6
- package/dist/products.server.js +68 -7
- package/dist/{queryProcessor-C_5Iipam.js → queryProcessor-B2FCngFP.js} +3 -2
- package/dist/rents.server.js +183 -7
- package/dist/{socials.schema-DxnnaBgO.js → socials.schema-C3RjkqJv.js} +4 -0
- package/dist/spots.server.js +1 -1
- package/dist/style.css +292 -204
- package/dist/{tickets.controller-DdF85W-i.js → tickets.controller-Dpzf4kQx.js} +1 -1
- package/dist/wallet.server.js +2 -2
- package/package.json +5 -3
- package/src/builder/modes/ssr.rspack.dev.js +2 -0
- package/src/builder/rspack/rspack.config.ssr.client.js +58 -1
- package/src/builder/ssr/asset-resolver.js +1 -1
- package/src/builder/templates/page.js +2 -0
- package/src/components/Address/Address.vue +16 -16
- package/src/components/Button/Button.vue +0 -1
- package/src/components/ButtonSegmented/ButtonSegmented.vue +1 -1
- package/src/components/Calendar/Calendar.vue +141 -118
- package/src/components/Chart/Chart.vue +216 -0
- package/src/components/Checkbox/Checkbox.vue +1 -1
- package/src/components/Chips/Chips.vue +4 -5
- package/src/components/Countdown/Countdown.vue +5 -5
- package/src/components/DatePicker/DatePicker.vue +2 -2
- package/src/components/EditImages/EditImages.vue +3 -3
- package/src/components/EmptyState/EmptyState.vue +1 -1
- package/src/components/Feed/Feed.vue +5 -0
- package/src/components/Field/Field.vue +3 -3
- package/src/components/FieldDate/FieldDate.vue +2 -2
- package/src/components/LocationMarker/LocationMarker.vue +28 -21
- package/src/components/Map/Map.vue +20 -15
- package/src/components/Popup/Popup.vue +3 -3
- package/src/components/Radio/Radio.vue +2 -2
- package/src/components/Select/Select.vue +1 -1
- package/src/components/Status/Snack.vue +1 -1
- package/src/components/Status/Status.vue +1 -1
- package/src/components/Table/Table.vue +16 -1
- package/src/components/Upload/Upload.vue +1 -1
- package/src/components/UploadImage/UploadImage.vue +1 -1
- package/src/components/UploadImageMultiple/UploadImageMultiple.vue +1 -1
- package/src/jit/rules.js +4 -0
- package/src/modules/TASKS.MD +16 -3
- package/src/modules/auth/auth.client.js +18 -3
- package/src/modules/auth/controllers/routes/users.routes.js +18 -0
- package/src/modules/auth/controllers/services/auth.service.js +3 -3
- package/src/modules/auth/controllers/services/users.service.js +34 -5
- package/src/modules/auth/views/components/blocks/OtpDialog.vue +4 -4
- package/src/modules/auth/views/components/blocks/PopupAuth.vue +1 -1
- package/src/modules/auth/views/components/blocks/SidebarUserCard.vue +95 -0
- package/src/modules/auth/views/components/pages/BackofficeUsers.vue +337 -0
- package/src/modules/auth/views/components/pages/Invite.vue +1 -1
- package/src/modules/auth/views/components/pages/Profile.vue +1 -1
- package/src/modules/auth/views/components/pages/ProfileEdit.vue +23 -14
- package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +45 -26
- package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +8 -7
- package/src/modules/auth/views/components/pages/ResetPassword.vue +4 -4
- package/src/modules/auth/views/components/pages/SignUp.vue +3 -3
- package/src/modules/auth/views/components/pages/UserDashboard.vue +8 -5
- package/src/modules/auth/views/components/sections/FeaturedUsers.vue +1 -1
- package/src/modules/auth/views/components/sections/SliderFeatures.vue +1 -1
- package/src/modules/auth/views/middlewares/auth.validation.js +7 -2
- package/src/modules/auth/views/router/users.backoffice.router.js +39 -0
- package/src/modules/auth/views/store/auth.js +2 -2
- package/src/modules/backoffice/components/admin/Backcalls.vue +2 -2
- package/src/modules/backoffice/components/admin/Dashboard.sublime-workspace +1 -1
- package/src/modules/backoffice/components/admin/FastOrders.vue +3 -3
- package/src/modules/backoffice/components/admin/UserEdit.vue +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +102 -139
- package/src/modules/backoffice/configs/navigation.backoffice.config.js +91 -29
- package/src/modules/backoffice/router/backoffice.router.js +7 -1
- package/src/modules/chats/components/blocks/ChatMessage.vue +1 -1
- package/src/modules/chats/components/sections/ChatWindow.vue +1 -1
- package/src/modules/community/community.client.js +4 -4
- package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
- package/src/modules/community/components/layouts/Community.vue +4 -4
- package/src/modules/community/components/sections/Comment.vue +1 -1
- package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
- package/src/modules/core/TASK.MD +2 -2
- package/src/modules/core/controllers/classes/abac/abac.core.js +1 -0
- package/src/modules/core/controllers/classes/core.websocket.js +0 -2
- package/src/modules/core/controllers/classes/crud/crud.core.js +6 -0
- package/src/modules/core/controllers/classes/crud/crud.service.js +6 -0
- package/src/modules/core/controllers/utils/mailing.js +35 -26
- package/src/modules/core/controllers/utils/queryProcessor.js +4 -2
- package/src/modules/core/core.client.js +1 -0
- package/src/modules/core/models/schemas/embedding.schema.js +8 -0
- package/src/modules/core/models/schemas/socials.schema.js +4 -0
- package/src/modules/core/sw.js +448 -0
- package/src/modules/core/views/classes/core.app.js +37 -13
- package/src/modules/core/views/classes/module.manager.js +3 -1
- package/src/modules/core/views/components/blocks/AlertDialog.vue +1 -1
- package/src/modules/core/views/components/blocks/BlockSearch.vue +1 -1
- package/src/modules/core/views/components/blocks/BlockSlider.vue +96 -0
- package/src/modules/core/views/components/blocks/CardHeader.vue +2 -2
- package/src/modules/core/views/components/blocks/CardStat.vue +4 -18
- package/src/modules/{auth → core}/views/components/blocks/CardUser.vue +45 -20
- package/src/modules/core/views/components/blocks/HelpCard.vue +1 -1
- package/src/modules/core/views/components/blocks/PopupAuth.vue +1 -1
- package/src/modules/core/views/components/blocks/PopupDateSelector.vue +41 -24
- package/src/modules/core/views/components/layouts/Client.vue +1 -1
- package/src/modules/core/views/components/pages/404.vue +5 -5
- package/src/modules/core/views/components/partials/BottomNavigationBar.vue +5 -5
- package/src/modules/core/views/components/partials/CitySelection.vue +2 -2
- package/src/modules/core/views/components/partials/Footer.centered.vue +2 -2
- package/src/modules/core/views/components/partials/Footer.vue +2 -2
- package/src/modules/core/views/components/partials/Header.vue +3 -3
- package/src/modules/core/views/components/partials/LocationSelection.vue +1 -1
- package/src/modules/core/views/components/partials/Navigation.vue +1 -1
- package/src/modules/core/views/components/sections/Filters.vue +2 -2
- package/src/modules/core/views/components/sections/SectionPageTitle.vue +2 -2
- package/src/modules/core/views/components/sections/Walkthrough.vue +6 -6
- package/src/modules/core/views/mixins/mixins.js +17 -0
- package/src/modules/core/views/plugins/date-picker.plugin.js +8 -5
- package/src/modules/core/views/store/core.store.js +5 -0
- package/src/modules/core/views/utils/vue-app-renderer.js +5 -0
- package/src/modules/events/components/pages/EditEventTickets.vue +9 -9
- package/src/modules/events/components/pages/Event.vue +2 -2
- package/src/modules/events/components/sections/EditTickets.vue +1 -1
- package/src/modules/events/components/sections/SelectDate.vue +1 -1
- package/src/modules/events/events.client.js +4 -4
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
- package/src/modules/gallery/router/gallery.router.js +3 -3
- package/src/modules/governance/middlewares/sprints.verifier.js +3 -3
- package/src/modules/governance/middlewares/tasks.verifier.js +3 -3
- package/src/modules/governance/models/sprint.model.js +1 -1
- package/src/modules/governance/models/task.model.js +1 -1
- package/src/modules/governance/reactcode/src/components/TaskStatusBadge.tsx +1 -1
- package/src/modules/governance/views/components/blocks/CardInitiativeItem.vue +3 -3
- package/src/modules/governance/views/components/blocks/CardSprintItem.vue +4 -4
- package/src/modules/governance/views/components/blocks/CardTaskItem.vue +2 -2
- package/src/modules/governance/views/components/blocks/CardVotingItem.vue +3 -3
- package/src/modules/governance/views/components/pages/Initiatives.vue +3 -3
- package/src/modules/governance/views/components/partials/TaskStatusBadge.vue +1 -1
- package/src/modules/governance/views/components/sections/FormSprintDetails.vue +1 -1
- package/src/modules/governance/views/components/sections/FormTaskDetails.vue +1 -1
- package/src/modules/governance/views/router/governance.router.js +3 -3
- package/src/modules/icons/components/IconSearchPopup.vue +1 -1
- package/src/modules/icons/entities/IconApplications.vue +14 -0
- package/src/modules/icons/entities/IconCustomers.vue +14 -0
- package/src/modules/icons/entities/IconUsers.vue +14 -0
- package/src/modules/inventory/components/forms/AdjustmentForm.vue +2 -2
- package/src/modules/inventory/components/forms/ColumnSettingsMenu.vue +2 -2
- package/src/modules/inventory/components/forms/HistoryView.vue +1 -1
- package/src/modules/inventory/components/forms/StockAlertsForm.vue +3 -3
- package/src/modules/inventory/components/pages/Inventory.vue +278 -159
- package/src/modules/inventory/components/pages/InventoryEdit.vue +2 -2
- package/src/modules/inventory/inventory.client.js +4 -4
- package/src/modules/inventory/models/stock.audit.model.js +1 -1
- package/src/modules/inventory/router/inventory.router.js +12 -0
- package/src/modules/landing/components/sections/SectionEarn.vue +3 -3
- package/src/modules/landing/components/sections/SectionFeature.vue +1 -1
- package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +2 -2
- package/src/modules/landing/components/sections/SectionGuide.vue +2 -2
- package/src/modules/landing/components/sections/SectionHeroToken.vue +1 -1
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +1 -1
- package/src/modules/landing/components/sections/SectionMobileApp.vue +2 -2
- package/src/modules/landing/components/sections/SectionOverview.vue +1 -1
- package/src/modules/landing/components/sections/SectionRoadmap.vue +1 -1
- package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
- package/src/modules/marketplace/views/components/sections/SectionMenu.vue +2 -2
- package/src/modules/music/components/SidebarMusic.vue +1 -1
- package/src/modules/music/components/cards/AlbumCard.vue +1 -1
- package/src/modules/music/components/cards/ArtistCard.vue +1 -1
- package/src/modules/music/components/cards/ArtistCardSmall.vue +1 -1
- package/src/modules/music/components/cards/PlaylistCard.vue +1 -1
- package/src/modules/music/components/cards/TrackListCard.vue +6 -6
- package/src/modules/music/components/forms/AlbumForm.vue +2 -2
- package/src/modules/music/components/forms/ArtistForm.vue +1 -1
- package/src/modules/music/components/forms/PlaylistForm.vue +5 -5
- package/src/modules/music/components/forms/TrackForm.vue +3 -3
- package/src/modules/music/components/pages/Album.vue +8 -8
- package/src/modules/music/components/pages/Artist.vue +5 -5
- package/src/modules/music/components/pages/Playlist.vue +11 -11
- package/src/modules/music/components/pages/SearchResults.vue +2 -2
- package/src/modules/music/components/pages/Track.vue +11 -11
- package/src/modules/music/components/player/FullscreenPlayer.vue +3 -3
- package/src/modules/music/components/player/TrackProgress.vue +1 -1
- package/src/modules/notifications/components/sections/NotificationPreferences.vue +182 -52
- package/src/modules/notifications/controllers/notifications.controller.js +242 -17
- package/src/modules/notifications/models/notification-preference.model.js +4 -0
- package/src/modules/notifications/notifications.client.js +213 -20
- package/src/modules/notifications/router/notifications.backoffice.router.js +16 -0
- package/src/modules/notifications/router/notifications.router.js +13 -45
- package/src/modules/notifications/routes/notifications.routes.js +9 -0
- package/src/modules/notifications/services/notification.service.js +33 -9
- package/src/modules/notifications/services/telegram.service.js +2 -2
- package/src/modules/notifications/services/web-push.service.js +6 -2
- package/src/modules/notifications/store/notifications.store.js +69 -0
- package/src/modules/orders/components/blocks/CardApplication.vue +9 -6
- package/src/modules/orders/components/blocks/CardCustomer.vue +10 -7
- package/src/modules/orders/components/blocks/CardOrder.vue +8 -8
- package/src/modules/orders/components/blocks/CardOrderBackoffice.vue +58 -12
- package/src/modules/orders/components/blocks/CardOrderItem.vue +31 -28
- package/src/modules/orders/components/blocks/CardOrderUser.vue +7 -12
- package/src/modules/orders/components/blocks/CardOrderVar1.vue +3 -3
- package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +1 -1
- package/src/modules/orders/components/elements/PriceTotal.vue +4 -4
- package/src/modules/orders/components/forms/FormApplicationDetails.vue +1 -1
- package/src/modules/orders/components/forms/FormSelectCustomer.vue +48 -25
- package/src/modules/orders/components/pages/Applications.vue +2 -2
- package/src/modules/orders/components/pages/Customers.vue +35 -23
- package/src/modules/orders/components/pages/OrderBackoffice.vue +780 -393
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +112 -42
- package/src/modules/orders/components/pages/Orders.vue +20 -19
- package/src/modules/orders/components/pages/Orders_refact.vue +3 -3
- package/src/modules/orders/components/partials/ShopCart.vue +1 -1
- package/src/modules/orders/components/sections/ApplicationDetails.vue +2 -2
- package/src/modules/orders/components/sections/AskToLogin.vue +1 -1
- package/src/modules/orders/components/sections/CustomerDetails.vue +130 -64
- package/src/modules/orders/controllers/orders.controller.js +463 -134
- package/src/modules/orders/middlewares/applications.verifier.js +3 -3
- package/src/modules/orders/middlewares/customers.verifier.js +4 -0
- package/src/modules/orders/middlewares/orders.verifier.js +187 -0
- package/src/modules/orders/models/customer.model.js +2 -0
- package/src/modules/orders/models/order.model.js +20 -2
- package/src/modules/orders/orders.client.js +21 -19
- package/src/modules/orders/routes/applications.routes.js +13 -3
- package/src/modules/orders/routes/customers.routes.js +2 -0
- package/src/modules/orders/routes/orders.routes.js +46 -4
- package/src/modules/orders/store/orders.js +4 -7
- package/src/modules/orders/store/shopcart.js +6 -7
- package/src/modules/orders/utils/rent-price.js +90 -0
- package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +30 -33
- package/src/modules/organizations/components/blocks/EmptyState.vue +1 -1
- package/src/modules/organizations/components/blocks/Rating.vue +1 -1
- package/src/modules/organizations/components/blocks/Socials.vue +2 -2
- package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +1 -1
- package/src/modules/organizations/components/forms/AddExistingMembersForm.vue +3 -3
- package/src/modules/organizations/components/forms/DepartmentForm.vue +1 -1
- package/src/modules/organizations/components/forms/InviteForm.vue +1 -1
- package/src/modules/organizations/components/pages/Department.vue +2 -2
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
- package/src/modules/organizations/components/pages/Members.vue +8 -8
- package/src/modules/organizations/components/pages/Organization.vue +232 -124
- package/src/modules/organizations/components/pages/OrganizationCreate.vue +3 -3
- package/src/modules/organizations/components/pages/OrganizationDocuments.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +15 -6
- package/src/modules/organizations/components/pages/Organizations.vue +3 -2
- package/src/modules/organizations/components/sections/Documents.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
- package/src/modules/organizations/configs/navigation.organization.config.js +34 -26
- package/src/modules/organizations/controllers/organizations.controller.js +8 -3
- package/src/modules/organizations/models/organization.model.js +1 -0
- package/src/modules/organizations/organizations.client.js +39 -33
- package/src/modules/organizations/router/organizations.backoffice.router.js +67 -0
- package/src/modules/pages/views/components/pages/Pages.vue +1 -1
- package/src/modules/pages/views/router/pages.router.js +2 -2
- package/src/modules/products/components/blocks/CardPosition.vue +2 -2
- package/src/modules/products/components/blocks/CardProduct.vue +2 -2
- package/src/modules/products/components/blocks/ProductDiscounts.vue +1 -1
- package/src/modules/products/components/blocks/ProductImages.vue +1 -1
- package/src/modules/products/components/blocks/ProductVariants.vue +3 -3
- package/src/modules/products/components/elements/Price.vue +2 -2
- package/src/modules/products/components/forms/ColumnSettingsMenu.vue +2 -2
- package/src/modules/products/components/forms/ReorderSettingsForm.vue +3 -3
- package/src/modules/products/components/forms/StockAuditForm.vue +2 -2
- package/src/modules/products/components/forms/StockHistoryView.vue +1 -1
- package/src/modules/products/components/pages/Categories.vue +9 -20
- package/src/modules/products/components/pages/ProductEdit.vue +19 -3
- package/src/modules/products/components/pages/Products.vue +20 -19
- package/src/modules/products/components/sections/EditAttributes.vue +1 -1
- package/src/modules/products/components/sections/EditCategories.vue +1 -1
- package/src/modules/products/components/sections/EditDiscounts.vue +2 -2
- package/src/modules/products/components/sections/EditVariants.vue +14 -2
- package/src/modules/products/components/sections/FilterProducts.vue +1 -1
- package/src/modules/products/components/sections/ProductConfigurator.vue +1 -1
- package/src/modules/products/components/sections/SectionProduct.vue +3 -3
- package/src/modules/products/controllers/products.controller.js +50 -5
- package/src/modules/products/experiments/product-recommendation/components/HeroRecommendation.vue +2 -2
- package/src/modules/products/models/product.model.js +7 -0
- package/src/modules/products/models/variant.model.js +4 -0
- package/src/modules/products/router/categories.router.js +2 -2
- package/src/modules/products/router/products.router.js +14 -3
- package/src/modules/rents/controllers/routes/rents.routes.js +11 -0
- package/src/modules/rents/controllers/services/rents.services.js +193 -2
- package/src/modules/rents/models/rent.model.js +9 -0
- package/src/modules/rents/views/components/pages/Gant/GanttBar.vue +28 -11
- package/src/modules/rents/views/components/pages/Gant/GanttChart.vue +200 -40
- package/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue +2 -2
- package/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue +2 -2
- package/src/modules/rents/views/components/pages/Rents.vue +641 -142
- package/src/modules/rents/views/components/pages/RentsEdit.vue +44 -4
- package/src/modules/rents/views/router/rents.router.js +3 -3
- package/src/modules/rents/views/store/rents.store.js +1 -1
- package/src/modules/reports/components/pages/BackofficeReports.vue +3 -3
- package/src/modules/reports/router/reports.router.js +1 -1
- package/src/modules/spots/components/blocks/CardSpot.vue +6 -6
- package/src/modules/spots/components/pages/Spot.vue +2 -2
- package/src/modules/spots/components/pages/SpotEdit.vue +8 -6
- package/src/modules/spots/components/pages/Spots.vue +18 -24
- package/src/modules/spots/components/sections/WorktimeEdit.vue +7 -7
- package/src/modules/spots/router/spots.router.js +3 -3
- package/src/modules/wallet/views/components/blocks/CashDeposit.vue +1 -1
- package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +3 -3
- package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
- package/src/modules/wallet/views/components/pages/Wallet.vue +4 -4
- package/src/modules/wallet/views/router/wallet.router.js +1 -1
- package/src/styles/layout.scss +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +0 -1
- package/dist/martyrs/src/modules/icons/entities/IconCash.vue.js +0 -70
- package/dist/martyrs/src/modules/icons/entities/IconCash.vue.js.map +0 -1
- package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js +0 -336
- package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/vue-draggable-next@2.2.1_sortablejs@1.15.6_vue@3.5.13_typescript@5.8.3_/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- components/player/TrackProgress.vue -->
|
|
2
2
|
<template>
|
|
3
3
|
<div class="progress-section">
|
|
4
|
-
<span class="time-current
|
|
4
|
+
<span class="time-current opacity-50">{{ formatTime(currentTime) }}</span>
|
|
5
5
|
<div
|
|
6
6
|
ref="progressBarContainer"
|
|
7
7
|
class="progress-bar"
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<!-- Push Permission
|
|
3
|
+
<!-- Push Permission Banner -->
|
|
4
4
|
<div class="bg-light radius-small pd-small mn-b-small">
|
|
5
5
|
<div class="flex flex-v-center flex-between">
|
|
6
|
-
<div class="flex flex-v-center gap-small">
|
|
6
|
+
<div class="w-100 flex flex-v-center gap-small">
|
|
7
7
|
<div class="h4">🔔</div>
|
|
8
8
|
<div class="flex-column flex gap-micro">
|
|
9
|
-
<p class="fw-medium">Push
|
|
9
|
+
<p class="fw-medium">Push on This Device</p>
|
|
10
10
|
<p class="p-small" :class="pushStatusClass">{{ pushStatusText }}</p>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
13
|
<Checkbox
|
|
14
14
|
mode="switch"
|
|
15
15
|
:radio="pushEnabled"
|
|
16
|
-
:disabled="
|
|
16
|
+
:disabled="!pushSupported"
|
|
17
17
|
@update:radio="togglePush"
|
|
18
18
|
class="flex-shrink-0"
|
|
19
19
|
/>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
<!-- Channel preferences — always visible -->
|
|
24
|
+
<p class="opacity-50 mn-b-small">Choose how you want to receive notifications</p>
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
<div v-if="loading" class="pd-large t-center opacity-50">
|
|
27
|
+
<Loader />
|
|
28
|
+
</div>
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
<div v-else class="flex-column flex gap-small">
|
|
31
|
+
<!-- Standard channels -->
|
|
32
|
+
<div class="gap-thin flex-column flex">
|
|
31
33
|
<div
|
|
32
|
-
v-for="
|
|
34
|
+
v-for="channelType in standardChannels"
|
|
33
35
|
:key="channelType"
|
|
34
36
|
class="flex flex-v-center flex-between bg-light radius-small pd-small"
|
|
35
37
|
>
|
|
@@ -37,42 +39,86 @@
|
|
|
37
39
|
<div class="h4">{{ getChannelIcon(channelType) }}</div>
|
|
38
40
|
<div class="flex-column flex gap-micro">
|
|
39
41
|
<p class="fw-medium">{{ getChannelName(channelType) }}</p>
|
|
40
|
-
<p class="p-small
|
|
42
|
+
<p class="p-small opacity-50">{{ getChannelDescription(channelType) }}</p>
|
|
41
43
|
</div>
|
|
42
44
|
</div>
|
|
43
45
|
<Checkbox
|
|
44
46
|
mode="switch"
|
|
45
|
-
:radio="
|
|
47
|
+
:radio="preferences[channelType]"
|
|
46
48
|
@update:radio="updatePreference(channelType, $event)"
|
|
47
49
|
class="flex-shrink-0"
|
|
48
50
|
/>
|
|
49
51
|
</div>
|
|
52
|
+
</div>
|
|
50
53
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class="
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
class="
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
<!-- Messengers -->
|
|
55
|
+
<div>
|
|
56
|
+
<p class="fw-medium opacity-50 mn-b-thin">Messengers</p>
|
|
57
|
+
<div class="gap-thin flex-column flex">
|
|
58
|
+
<!-- Telegram -->
|
|
59
|
+
<div class="flex flex-v-center flex-between bg-light radius-small pd-small">
|
|
60
|
+
<div class="flex w-100 flex-v-center gap-small mn-r-small">
|
|
61
|
+
<div class="h4">📬</div>
|
|
62
|
+
<div class="flex-column flex gap-micro">
|
|
63
|
+
<p class="fw-medium">Telegram</p>
|
|
64
|
+
<p class="p-small opacity-50">Receive notifications via Telegram bot</p>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="flex flex-v-center gap-small flex-shrink-0">
|
|
68
|
+
<template v-if="telegramConnected">
|
|
69
|
+
<Button
|
|
70
|
+
:submit="handleDisconnectTelegram"
|
|
71
|
+
class="bg-white t-dark pd-thin pd-h-small p-small"
|
|
72
|
+
>Disconnect</Button>
|
|
73
|
+
</template>
|
|
74
|
+
<template v-else>
|
|
75
|
+
<Button
|
|
76
|
+
:submit="handleConnectTelegram"
|
|
77
|
+
:loading="telegramLinking"
|
|
78
|
+
class="bg-main t-white pd-thin pd-h-small p-small"
|
|
79
|
+
>Connect</Button>
|
|
80
|
+
</template>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<!-- WhatsApp -->
|
|
85
|
+
<div class="flex flex-v-center flex-between bg-light radius-small pd-small opacity-50">
|
|
86
|
+
<div class="flex w-100 flex-v-center gap-small mn-r-small">
|
|
87
|
+
<div class="h4">💬</div>
|
|
88
|
+
<div class="flex-column flex gap-micro">
|
|
89
|
+
<p class="fw-medium">WhatsApp</p>
|
|
90
|
+
<p class="p-small opacity-50">Coming soon</p>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
68
94
|
</div>
|
|
69
95
|
</div>
|
|
70
|
-
|
|
96
|
+
|
|
97
|
+
<!-- Save / Cancel -->
|
|
98
|
+
<div class="flex flex-end gap-small mn-t-thin">
|
|
99
|
+
<Button
|
|
100
|
+
v-if="hasChanges"
|
|
101
|
+
:submit="resetChanges"
|
|
102
|
+
:showLoader="false"
|
|
103
|
+
:showSucces="false"
|
|
104
|
+
class="bg-white t-dark"
|
|
105
|
+
>
|
|
106
|
+
Cancel
|
|
107
|
+
</Button>
|
|
108
|
+
<Button
|
|
109
|
+
:submit="savePreferences"
|
|
110
|
+
:validation="!hasChanges || saving"
|
|
111
|
+
class="bg-main t-white w-100"
|
|
112
|
+
>
|
|
113
|
+
{{ saving ? 'Saving...' : 'Save Changes' }}
|
|
114
|
+
</Button>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
71
117
|
</div>
|
|
72
118
|
</template>
|
|
73
119
|
|
|
74
120
|
<script setup>
|
|
75
|
-
import { ref, reactive, computed, onMounted, inject } from 'vue';
|
|
121
|
+
import { ref, reactive, computed, onMounted, inject, watch } from 'vue';
|
|
76
122
|
import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue';
|
|
77
123
|
import Button from '@martyrs/src/components/Button/Button.vue';
|
|
78
124
|
import Loader from '@martyrs/src/components/Loader/Loader.vue';
|
|
@@ -84,6 +130,12 @@ const {
|
|
|
84
130
|
getPreferences,
|
|
85
131
|
updatePreferences,
|
|
86
132
|
registerWebPush,
|
|
133
|
+
unregisterWebPush,
|
|
134
|
+
getSubscriptionState,
|
|
135
|
+
telegramConnected: storeTelegramConnected,
|
|
136
|
+
generateTelegramLink,
|
|
137
|
+
getTelegramStatus,
|
|
138
|
+
disconnectTelegram,
|
|
87
139
|
} = inject('useNotifications')();
|
|
88
140
|
|
|
89
141
|
// Local reactive state for form
|
|
@@ -92,45 +144,70 @@ const originalPreferences = ref({});
|
|
|
92
144
|
const saving = ref(false);
|
|
93
145
|
|
|
94
146
|
// Push permission state
|
|
95
|
-
const
|
|
96
|
-
const
|
|
147
|
+
const pushSupported = ref(typeof window !== 'undefined' && 'serviceWorker' in navigator && 'PushManager' in window);
|
|
148
|
+
const pushPermission = ref('default');
|
|
149
|
+
const pushEnabled = ref(false);
|
|
150
|
+
|
|
151
|
+
// Telegram state
|
|
152
|
+
const telegramConnected = ref(false);
|
|
153
|
+
const telegramLinking = ref(false);
|
|
154
|
+
|
|
155
|
+
// Watch for WS-driven telegram connection updates
|
|
156
|
+
watch(storeTelegramConnected, (val) => {
|
|
157
|
+
if (val) telegramConnected.value = true;
|
|
158
|
+
});
|
|
97
159
|
|
|
98
160
|
const pushStatusText = computed(() => {
|
|
99
|
-
if (
|
|
100
|
-
if (pushEnabled.value
|
|
101
|
-
|
|
161
|
+
if (!pushSupported.value) return 'Not supported in this browser';
|
|
162
|
+
if (pushEnabled.value) return 'Notifications enabled on this device';
|
|
163
|
+
// НЕ показываем "Blocked" только по permission === 'denied' — на iOS это ненадёжно
|
|
164
|
+
// Показываем "Blocked" только если permission denied И подписки нет
|
|
165
|
+
if (pushPermission.value === 'denied' && !pushEnabled.value) return 'Blocked by browser. Allow in site settings';
|
|
166
|
+
return 'Allow notifications on this device';
|
|
102
167
|
});
|
|
103
168
|
|
|
104
169
|
const pushStatusClass = computed(() => {
|
|
170
|
+
if (!pushSupported.value) return 'opacity-50';
|
|
171
|
+
if (pushEnabled.value) return 't-green';
|
|
105
172
|
if (pushPermission.value === 'denied') return 't-red';
|
|
106
|
-
|
|
107
|
-
return 't-transp';
|
|
173
|
+
return 'opacity-50';
|
|
108
174
|
});
|
|
109
175
|
|
|
110
176
|
const togglePush = async (value) => {
|
|
177
|
+
// Переключаем свитч сразу — optimistic UI
|
|
178
|
+
pushEnabled.value = value;
|
|
179
|
+
|
|
111
180
|
if (value) {
|
|
112
|
-
// Turning ON → request browser permission DIRECTLY in click handler
|
|
113
181
|
try {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
// Now register subscription in background
|
|
119
|
-
registerWebPush().catch(err => console.error('Web push registration error:', err));
|
|
120
|
-
} else {
|
|
121
|
-
pushEnabled.value = false;
|
|
182
|
+
// 1. Запрашиваем permission в контексте user gesture (ОБЯЗАТЕЛЬНО для Safari)
|
|
183
|
+
// НО результат НЕ проверяем — на iOS он может врать "denied"
|
|
184
|
+
if ('Notification' in window) {
|
|
185
|
+
await Notification.requestPermission();
|
|
122
186
|
}
|
|
187
|
+
// 2. Пробуем subscribe — если реально нет разрешения, выкинет NotAllowedError
|
|
188
|
+
// Если iOS вернул "denied" но реально granted — subscribe сработает
|
|
189
|
+
await registerWebPush();
|
|
190
|
+
// 3. Перечитываем реальный state через надёжные API
|
|
191
|
+
const { permission } = await getSubscriptionState();
|
|
192
|
+
pushPermission.value = permission;
|
|
123
193
|
} catch (error) {
|
|
124
|
-
console.error('Push
|
|
125
|
-
|
|
194
|
+
console.error('Push subscribe error:', error);
|
|
195
|
+
// Revert — подписка не удалась
|
|
126
196
|
pushEnabled.value = false;
|
|
197
|
+
const { permission } = await getSubscriptionState();
|
|
198
|
+
pushPermission.value = permission;
|
|
127
199
|
}
|
|
128
200
|
} else {
|
|
129
|
-
|
|
130
|
-
pushEnabled.value = false;
|
|
201
|
+
unregisterWebPush().catch(err => console.error('Push unsubscribe error:', err));
|
|
131
202
|
}
|
|
132
203
|
};
|
|
133
204
|
|
|
205
|
+
// Standard channels (exclude messengers — they have their own section)
|
|
206
|
+
const messengerChannels = ['telegram', 'whatsapp'];
|
|
207
|
+
const standardChannels = computed(() =>
|
|
208
|
+
Object.keys(preferences).filter(ch => !messengerChannels.includes(ch))
|
|
209
|
+
);
|
|
210
|
+
|
|
134
211
|
// Computed properties
|
|
135
212
|
const hasChanges = computed(() => {
|
|
136
213
|
return Object.keys(preferences).some(key =>
|
|
@@ -161,6 +238,38 @@ const resetChanges = () => {
|
|
|
161
238
|
});
|
|
162
239
|
};
|
|
163
240
|
|
|
241
|
+
const handleConnectTelegram = async () => {
|
|
242
|
+
try {
|
|
243
|
+
telegramLinking.value = true;
|
|
244
|
+
|
|
245
|
+
// Открываем окно синхронно, пока ещё в контексте user gesture
|
|
246
|
+
const win = window.open('', '_blank');
|
|
247
|
+
|
|
248
|
+
const result = await generateTelegramLink();
|
|
249
|
+
|
|
250
|
+
if (result?.deepLink) {
|
|
251
|
+
if (win) {
|
|
252
|
+
win.location.href = result.deepLink;
|
|
253
|
+
} else {
|
|
254
|
+
// Fallback если всё равно заблокировали
|
|
255
|
+
window.location.href = result.deepLink;
|
|
256
|
+
}
|
|
257
|
+
} else {
|
|
258
|
+
win?.close();
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
telegramLinking.value = false;
|
|
262
|
+
} catch (error) {
|
|
263
|
+
console.error('Error generating Telegram link:', error);
|
|
264
|
+
telegramLinking.value = false;
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
const handleDisconnectTelegram = async () => {
|
|
269
|
+
await disconnectTelegram();
|
|
270
|
+
telegramConnected.value = false;
|
|
271
|
+
};
|
|
272
|
+
|
|
164
273
|
const getChannelIcon = (channelType) => {
|
|
165
274
|
switch (channelType) {
|
|
166
275
|
case 'web': return '🖥️';
|
|
@@ -206,8 +315,29 @@ const getChannelDescription = (channelType) => {
|
|
|
206
315
|
|
|
207
316
|
// Lifecycle
|
|
208
317
|
onMounted(async () => {
|
|
318
|
+
// Определяем реальное состояние подписки через getSubscriptionState (robust для iOS)
|
|
319
|
+
if (pushSupported.value) {
|
|
320
|
+
try {
|
|
321
|
+
const { permission, subscribed } = await getSubscriptionState();
|
|
322
|
+
pushPermission.value = permission;
|
|
323
|
+
pushEnabled.value = subscribed;
|
|
324
|
+
} catch (e) {
|
|
325
|
+
console.error('Failed to get subscription state:', e);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
209
329
|
await getPreferences();
|
|
210
330
|
|
|
331
|
+
// Check Telegram connection status
|
|
332
|
+
try {
|
|
333
|
+
const tgStatus = await getTelegramStatus();
|
|
334
|
+
if (tgStatus) {
|
|
335
|
+
telegramConnected.value = tgStatus.connected;
|
|
336
|
+
}
|
|
337
|
+
} catch (e) {
|
|
338
|
+
console.error('Failed to get Telegram status:', e);
|
|
339
|
+
}
|
|
340
|
+
|
|
211
341
|
// Copy store preferences to local state
|
|
212
342
|
Object.keys(storePreferences.value).forEach(key => {
|
|
213
343
|
preferences[key] = storePreferences.value[key];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import crypto from 'crypto';
|
|
1
2
|
// controllers/notifications.controller.js
|
|
2
3
|
const NotificationsController = (db, wss, notificationService) => {
|
|
3
4
|
// Create a new notification
|
|
@@ -85,7 +86,22 @@ const NotificationsController = (db, wss, notificationService) => {
|
|
|
85
86
|
return res.status(500).json({ message: err.message });
|
|
86
87
|
}
|
|
87
88
|
};
|
|
88
|
-
//
|
|
89
|
+
// Deactivate device (set isActive: false)
|
|
90
|
+
const deactivateDevice = async (req, res) => {
|
|
91
|
+
try {
|
|
92
|
+
const { deviceId, userId, anonymousId } = req.body;
|
|
93
|
+
if (!deviceId) return res.status(400).json({ message: 'deviceId is required' });
|
|
94
|
+
|
|
95
|
+
const filter = userId ? { userId, deviceId } : anonymousId ? { anonymousId, deviceId } : { deviceId };
|
|
96
|
+
const result = await db.userDevice.findOneAndUpdate(filter, { $set: { isActive: false, lastActive: Date.now() } }, { new: true });
|
|
97
|
+
|
|
98
|
+
if (!result) return res.status(404).json({ message: 'Device not found' });
|
|
99
|
+
return res.json({ message: 'Device deactivated', device: result });
|
|
100
|
+
} catch (err) {
|
|
101
|
+
return res.status(500).json({ message: err.message });
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
89
105
|
// Mark all notifications as read for a user
|
|
90
106
|
const markAllAsRead = async (req, res) => {
|
|
91
107
|
try {
|
|
@@ -122,27 +138,18 @@ const NotificationsController = (db, wss, notificationService) => {
|
|
|
122
138
|
try {
|
|
123
139
|
const { userId, anonymousId, deviceId, deviceType, deviceToken } = req.body;
|
|
124
140
|
|
|
125
|
-
console.log('[RegisterDevice] Request:', { userId, anonymousId, deviceId, isAnonymous: !userId });
|
|
126
|
-
|
|
127
141
|
// Validate that either userId or anonymousId is provided
|
|
128
142
|
if (!userId && !anonymousId) {
|
|
129
143
|
return res.status(400).json({ message: 'Either userId or anonymousId is required' });
|
|
130
144
|
}
|
|
131
145
|
|
|
132
|
-
// FIRST:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
$or: [
|
|
136
|
-
|
|
137
|
-
{ deviceId: { $ne: deviceId } }
|
|
138
|
-
]
|
|
139
|
-
});
|
|
146
|
+
// FIRST: Remove any existing device with the same token but different identity
|
|
147
|
+
// This handles anonymous→authenticated transition and device re-registration
|
|
148
|
+
const existingFilter = userId
|
|
149
|
+
? { deviceToken, $or: [{ userId: { $exists: false } }, { userId: null }, { userId: { $ne: userId } }, { deviceId: { $ne: deviceId } }] }
|
|
150
|
+
: { deviceToken, $or: [{ anonymousId: { $exists: false } }, { anonymousId: null }, { anonymousId: { $ne: anonymousId } }, { deviceId: { $ne: deviceId } }] };
|
|
140
151
|
|
|
141
|
-
|
|
142
|
-
// This token is already registered to another device, remove it
|
|
143
|
-
console.log('[RegisterDevice] Token exists for different device, removing:', tokenDevice._id);
|
|
144
|
-
await tokenDevice.deleteOne();
|
|
145
|
-
}
|
|
152
|
+
await db.userDevice.deleteMany(existingFilter);
|
|
146
153
|
|
|
147
154
|
// Use atomic findOneAndUpdate with upsert to avoid race condition
|
|
148
155
|
const filter = userId
|
|
@@ -172,7 +179,6 @@ const NotificationsController = (db, wss, notificationService) => {
|
|
|
172
179
|
}
|
|
173
180
|
);
|
|
174
181
|
|
|
175
|
-
console.log('[RegisterDevice] Device upserted:', device._id);
|
|
176
182
|
return res.status(200).json(device);
|
|
177
183
|
} catch (err) {
|
|
178
184
|
console.error('[RegisterDevice] Error:', err.message);
|
|
@@ -320,17 +326,236 @@ const NotificationsController = (db, wss, notificationService) => {
|
|
|
320
326
|
}
|
|
321
327
|
};
|
|
322
328
|
|
|
329
|
+
// Update subscription when endpoint rotates (pushsubscriptionchange from SW)
|
|
330
|
+
const updateSubscription = async (req, res) => {
|
|
331
|
+
try {
|
|
332
|
+
const { oldEndpoint, newSubscription } = req.body;
|
|
333
|
+
|
|
334
|
+
if (!oldEndpoint || !newSubscription) {
|
|
335
|
+
return res.status(400).json({ message: 'oldEndpoint and newSubscription are required' });
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const newToken = JSON.stringify(newSubscription);
|
|
339
|
+
|
|
340
|
+
// Find device by old endpoint (stored as JSON in deviceToken)
|
|
341
|
+
const devices = await db.userDevice.find({ deviceType: 'web', isActive: true });
|
|
342
|
+
let updated = false;
|
|
343
|
+
|
|
344
|
+
for (const device of devices) {
|
|
345
|
+
try {
|
|
346
|
+
const parsed = JSON.parse(device.deviceToken);
|
|
347
|
+
if (parsed.endpoint === oldEndpoint) {
|
|
348
|
+
device.deviceToken = newToken;
|
|
349
|
+
device.lastActive = Date.now();
|
|
350
|
+
await device.save();
|
|
351
|
+
updated = true;
|
|
352
|
+
console.log('[UpdateSubscription] Updated device:', device._id);
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
} catch (e) {}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (!updated) {
|
|
359
|
+
return res.status(404).json({ message: 'Device with old endpoint not found' });
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return res.json({ message: 'Subscription updated' });
|
|
363
|
+
} catch (err) {
|
|
364
|
+
console.error('[UpdateSubscription] Error:', err.message);
|
|
365
|
+
return res.status(500).json({ message: err.message });
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// Generate a Telegram deep link for user to connect their account
|
|
370
|
+
const generateTelegramLink = async (req, res) => {
|
|
371
|
+
try {
|
|
372
|
+
const { userId } = req.body;
|
|
373
|
+
if (!userId) return res.status(400).json({ message: 'userId is required' });
|
|
374
|
+
|
|
375
|
+
const botUsername = process.env.TELEGRAM_BOT_USERNAME;
|
|
376
|
+
if (!botUsername) return res.status(500).json({ message: 'TELEGRAM_BOT_USERNAME not configured' });
|
|
377
|
+
|
|
378
|
+
const token = crypto.randomBytes(32).toString('hex');
|
|
379
|
+
const expiry = new Date(Date.now() + 10 * 60 * 1000); // 10 minutes
|
|
380
|
+
|
|
381
|
+
// Upsert telegram preference with link token
|
|
382
|
+
await db.notificationPreference.findOneAndUpdate(
|
|
383
|
+
{ userId, channelType: 'telegram', notificationType: 'all' },
|
|
384
|
+
{ $set: { telegramLinkToken: token, telegramLinkExpiry: expiry } },
|
|
385
|
+
{ upsert: true, new: true }
|
|
386
|
+
);
|
|
387
|
+
|
|
388
|
+
const deepLink = `https://t.me/${botUsername}?start=${token}`;
|
|
389
|
+
return res.json({ deepLink, expiresAt: expiry });
|
|
390
|
+
} catch (err) {
|
|
391
|
+
return res.status(500).json({ message: err.message });
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
// Get Telegram connection status for a user
|
|
396
|
+
const getTelegramStatus = async (req, res) => {
|
|
397
|
+
try {
|
|
398
|
+
const { userId } = req.params;
|
|
399
|
+
const pref = await db.notificationPreference.findOne({
|
|
400
|
+
userId, channelType: 'telegram', notificationType: 'all'
|
|
401
|
+
});
|
|
402
|
+
return res.json({
|
|
403
|
+
connected: !!pref?.telegramChatId,
|
|
404
|
+
chatId: pref?.telegramChatId || null,
|
|
405
|
+
});
|
|
406
|
+
} catch (err) {
|
|
407
|
+
return res.status(500).json({ message: err.message });
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
// Disconnect Telegram
|
|
412
|
+
const disconnectTelegram = async (req, res) => {
|
|
413
|
+
try {
|
|
414
|
+
const { userId } = req.body;
|
|
415
|
+
if (!userId) return res.status(400).json({ message: 'userId is required' });
|
|
416
|
+
|
|
417
|
+
await db.notificationPreference.findOneAndUpdate(
|
|
418
|
+
{ userId, channelType: 'telegram', notificationType: 'all' },
|
|
419
|
+
{ $set: { telegramChatId: null, isEnabled: false } }
|
|
420
|
+
);
|
|
421
|
+
return res.json({ message: 'Telegram disconnected' });
|
|
422
|
+
} catch (err) {
|
|
423
|
+
return res.status(500).json({ message: err.message });
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
// Telegram bot webhook — receives updates from Telegram
|
|
428
|
+
const telegramWebhook = async (req, res) => {
|
|
429
|
+
try {
|
|
430
|
+
const update = req.body;
|
|
431
|
+
|
|
432
|
+
// Handle inline keyboard callback queries (Confirm/Cancel order buttons)
|
|
433
|
+
if (update?.callback_query) {
|
|
434
|
+
const callbackQuery = update.callback_query;
|
|
435
|
+
const data = callbackQuery.data; // e.g. "order_confirm:orderId" or "order_cancel:orderId"
|
|
436
|
+
const chatId = callbackQuery.message?.chat?.id?.toString();
|
|
437
|
+
const messageId = callbackQuery.message?.message_id;
|
|
438
|
+
|
|
439
|
+
const { sendChatMessageTelegram } = await import('@martyrs/src/modules/core/controllers/utils/mailing.js');
|
|
440
|
+
|
|
441
|
+
// Answer callback query to remove loading state
|
|
442
|
+
const telegramToken = process.env.TELEGRAM_BOT_TOKEN;
|
|
443
|
+
await fetch(`https://api.telegram.org/bot${telegramToken}/answerCallbackQuery`, {
|
|
444
|
+
method: 'POST',
|
|
445
|
+
headers: { 'Content-Type': 'application/json' },
|
|
446
|
+
body: JSON.stringify({ callback_query_id: callbackQuery.id }),
|
|
447
|
+
}).catch(() => {});
|
|
448
|
+
|
|
449
|
+
if (data?.startsWith('order_confirm:') || data?.startsWith('order_cancel:')) {
|
|
450
|
+
const [actionPart, orderId] = data.split(':');
|
|
451
|
+
const action = actionPart === 'order_confirm' ? 'confirm' : 'cancel';
|
|
452
|
+
|
|
453
|
+
try {
|
|
454
|
+
const response = await fetch(`${process.env.API_URL || ''}/api/orders/telegram-action`, {
|
|
455
|
+
method: 'POST',
|
|
456
|
+
headers: {
|
|
457
|
+
'Content-Type': 'application/json',
|
|
458
|
+
'X-Service-Key': process.env.SERVICE_KEY,
|
|
459
|
+
},
|
|
460
|
+
body: JSON.stringify({ action, orderId }),
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
const result = await response.json();
|
|
464
|
+
|
|
465
|
+
// Remove inline keyboard buttons from the message
|
|
466
|
+
const statusEmoji = action === 'confirm' ? '✅' : '❌';
|
|
467
|
+
const statusText = action === 'confirm' ? 'CONFIRMED' : 'CANCELLED';
|
|
468
|
+
|
|
469
|
+
await fetch(`https://api.telegram.org/bot${telegramToken}/editMessageReplyMarkup`, {
|
|
470
|
+
method: 'POST',
|
|
471
|
+
headers: { 'Content-Type': 'application/json' },
|
|
472
|
+
body: JSON.stringify({
|
|
473
|
+
chat_id: chatId,
|
|
474
|
+
message_id: messageId,
|
|
475
|
+
reply_markup: { inline_keyboard: [[
|
|
476
|
+
{ text: `${statusEmoji} ${statusText}`, callback_data: 'noop' }
|
|
477
|
+
]] },
|
|
478
|
+
}),
|
|
479
|
+
}).catch(e => console.error('[Telegram] Failed to edit message:', e.message));
|
|
480
|
+
|
|
481
|
+
if (!response.ok) {
|
|
482
|
+
await sendChatMessageTelegram([chatId], `⚠️ ${result.message || 'Failed to process action'}`);
|
|
483
|
+
}
|
|
484
|
+
} catch (err) {
|
|
485
|
+
console.error('[Telegram Callback] Action error:', err);
|
|
486
|
+
await sendChatMessageTelegram([chatId], '⚠️ Error processing order action');
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
return res.json({ ok: true });
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// Only handle /start messages
|
|
494
|
+
const message = update?.message;
|
|
495
|
+
if (!message?.text?.startsWith('/start ')) {
|
|
496
|
+
return res.json({ ok: true });
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const token = message.text.replace('/start ', '').trim();
|
|
500
|
+
const chatId = message.chat.id.toString();
|
|
501
|
+
|
|
502
|
+
// Find preference with matching token
|
|
503
|
+
const pref = await db.notificationPreference.findOne({
|
|
504
|
+
channelType: 'telegram',
|
|
505
|
+
telegramLinkToken: token,
|
|
506
|
+
telegramLinkExpiry: { $gt: new Date() },
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
if (!pref) {
|
|
510
|
+
// Token invalid or expired — send message via bot
|
|
511
|
+
const { sendChatMessageTelegram } = await import('@martyrs/src/modules/core/controllers/utils/mailing.js');
|
|
512
|
+
await sendChatMessageTelegram([chatId], 'Link expired or invalid. Please generate a new link in notification settings.');
|
|
513
|
+
return res.json({ ok: true });
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// Link successful — save chatId, clear token, enable
|
|
517
|
+
pref.telegramChatId = chatId;
|
|
518
|
+
pref.telegramLinkToken = null;
|
|
519
|
+
pref.telegramLinkExpiry = null;
|
|
520
|
+
pref.isEnabled = true;
|
|
521
|
+
await pref.save();
|
|
522
|
+
|
|
523
|
+
// Send confirmation to user
|
|
524
|
+
const { sendChatMessageTelegram } = await import('@martyrs/src/modules/core/controllers/utils/mailing.js');
|
|
525
|
+
await sendChatMessageTelegram([chatId], '✅ Telegram connected! You will now receive notifications here.');
|
|
526
|
+
|
|
527
|
+
// Notify frontend via WebSocket
|
|
528
|
+
if (wss) {
|
|
529
|
+
wss.sendToUserInModule('notification', pref.userId, {
|
|
530
|
+
type: 'telegram_connected',
|
|
531
|
+
data: { chatId },
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
return res.json({ ok: true });
|
|
536
|
+
} catch (err) {
|
|
537
|
+
console.error('[Telegram Webhook] Error:', err);
|
|
538
|
+
return res.json({ ok: true }); // Always return 200 to Telegram
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
|
|
323
542
|
return {
|
|
324
543
|
create,
|
|
325
544
|
createBatch,
|
|
326
545
|
getUserNotifications,
|
|
327
546
|
markAsRead,
|
|
328
547
|
registerDevice,
|
|
548
|
+
deactivateDevice,
|
|
549
|
+
updateSubscription,
|
|
329
550
|
updatePreferences,
|
|
330
551
|
getUserPreferences,
|
|
331
552
|
markAllAsRead,
|
|
332
553
|
sendToTokens,
|
|
333
554
|
sendToAnonymous,
|
|
555
|
+
generateTelegramLink,
|
|
556
|
+
getTelegramStatus,
|
|
557
|
+
disconnectTelegram,
|
|
558
|
+
telegramWebhook,
|
|
334
559
|
};
|
|
335
560
|
};
|
|
336
561
|
export default NotificationsController;
|
|
@@ -8,6 +8,10 @@ export default (db, additionalFields = {}) => {
|
|
|
8
8
|
},
|
|
9
9
|
notificationType: { type: String, required: true }, // Type of notification (alerts, promotions, etc.)
|
|
10
10
|
isEnabled: { type: Boolean, default: true },
|
|
11
|
+
// Telegram-specific fields
|
|
12
|
+
telegramChatId: { type: String, default: null },
|
|
13
|
+
telegramLinkToken: { type: String, default: null },
|
|
14
|
+
telegramLinkExpiry: { type: Date, default: null },
|
|
11
15
|
});
|
|
12
16
|
schema.index({ userId: 1, channelType: 1, notificationType: 1 }, { unique: true });
|
|
13
17
|
return db.mongoose.model('NotificationPreference', schema);
|