@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
|
@@ -29,7 +29,11 @@ const state = reactive({
|
|
|
29
29
|
preferences: { ...preferencesInitState },
|
|
30
30
|
deviceRegistered: false,
|
|
31
31
|
loading: false,
|
|
32
|
-
lastSync: null
|
|
32
|
+
lastSync: null,
|
|
33
|
+
// Telegram
|
|
34
|
+
telegramConnected: false,
|
|
35
|
+
telegramChatId: null,
|
|
36
|
+
telegramDeepLink: null
|
|
33
37
|
});
|
|
34
38
|
const actions = {
|
|
35
39
|
/**
|
|
@@ -117,6 +121,20 @@ const actions = {
|
|
|
117
121
|
throw error;
|
|
118
122
|
}
|
|
119
123
|
},
|
|
124
|
+
/**
|
|
125
|
+
* Unregister (deactivate) device on server
|
|
126
|
+
*/
|
|
127
|
+
async unregisterDevice(deviceId) {
|
|
128
|
+
try {
|
|
129
|
+
const userId = state$1.user?._id;
|
|
130
|
+
const payload = { deviceId };
|
|
131
|
+
if (userId) payload.userId = userId;
|
|
132
|
+
await $axios.post("/api/notifications/devices/deactivate", payload);
|
|
133
|
+
state.deviceRegistered = false;
|
|
134
|
+
} catch (error) {
|
|
135
|
+
console.error("[Notifications Store] Unregister device error:", error);
|
|
136
|
+
}
|
|
137
|
+
},
|
|
120
138
|
/**
|
|
121
139
|
* Re-register device after user login
|
|
122
140
|
*/
|
|
@@ -198,6 +216,53 @@ const actions = {
|
|
|
198
216
|
throw error;
|
|
199
217
|
}
|
|
200
218
|
},
|
|
219
|
+
/**
|
|
220
|
+
* Generate Telegram deep link for connecting bot
|
|
221
|
+
*/
|
|
222
|
+
async generateTelegramLink() {
|
|
223
|
+
try {
|
|
224
|
+
const userId = state$1.user._id;
|
|
225
|
+
if (!userId) return null;
|
|
226
|
+
const response = await $axios.post("/api/notifications/telegram/generate-link", { userId });
|
|
227
|
+
state.telegramDeepLink = response.data.deepLink;
|
|
228
|
+
return response.data;
|
|
229
|
+
} catch (error) {
|
|
230
|
+
setError(error);
|
|
231
|
+
throw error;
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* Get Telegram connection status
|
|
236
|
+
*/
|
|
237
|
+
async getTelegramStatus() {
|
|
238
|
+
try {
|
|
239
|
+
const userId = state$1.user._id;
|
|
240
|
+
if (!userId) return;
|
|
241
|
+
const response = await $axios.get(`/api/notifications/telegram/status/${userId}`);
|
|
242
|
+
state.telegramConnected = response.data.connected;
|
|
243
|
+
state.telegramChatId = response.data.chatId;
|
|
244
|
+
return response.data;
|
|
245
|
+
} catch (error) {
|
|
246
|
+
console.error("Error getting Telegram status:", error);
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
/**
|
|
250
|
+
* Disconnect Telegram
|
|
251
|
+
*/
|
|
252
|
+
async disconnectTelegram() {
|
|
253
|
+
try {
|
|
254
|
+
const userId = state$1.user._id;
|
|
255
|
+
if (!userId) return;
|
|
256
|
+
await $axios.post("/api/notifications/telegram/disconnect", { userId });
|
|
257
|
+
state.telegramConnected = false;
|
|
258
|
+
state.telegramChatId = null;
|
|
259
|
+
state.telegramDeepLink = null;
|
|
260
|
+
state.preferences.telegram = false;
|
|
261
|
+
} catch (error) {
|
|
262
|
+
setError(error);
|
|
263
|
+
throw error;
|
|
264
|
+
}
|
|
265
|
+
},
|
|
201
266
|
/**
|
|
202
267
|
* Add a local notification (for handling push notifications or WebSocket notifications)
|
|
203
268
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.store.js","sources":["../../../../../../src/modules/notifications/store/notifications.store.js"],"sourcesContent":["// Dependencies\nimport { computed, reactive, watch } from 'vue';\n// Setup Axios\nimport $axios from '@martyrs/src/modules/core/views/utils/axios-instance.js';\n// Globals\nimport { setError } from '@martyrs/src/modules/core/views/store/core.store.js';\n// Auth\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n// Capacitor Preferences\nimport { Preferences } from '@capacitor/preferences';\n\n// Initial state for a notification\nconst notificationInitState = {\n _id: null,\n title: '',\n body: '',\n type: 'info',\n metadata: {},\n userId: null,\n status: 'pending',\n createdAt: null,\n updatedAt: null,\n};\n\n// Initial state for notification preferences\nconst preferencesInitState = {\n web: true,\n push: true,\n email: true,\n sms: true,\n telegram: false,\n whatsapp: false,\n};\n\n// State declaration\nconst state = reactive({\n notifications: [],\n unreadCount: 0,\n current: { ...notificationInitState },\n preferences: { ...preferencesInitState },\n deviceRegistered: false,\n loading: false,\n lastSync: null,\n});\n\nconst actions = {\n /**\n * Get user notifications from server\n */\n async getNotifications(userId = null) {\n try {\n // Use provided userId or get from auth store\n const userIdToUse = userId || auth.state.user._id;\n\n if (!userIdToUse) {\n console.warn('Cannot get notifications: No user ID found');\n return [];\n }\n\n state.loading = true;\n const response = await $axios.get(`/api/notifications/user/${userIdToUse}`);\n state.notifications = response.data;\n state.lastSync = new Date().toISOString();\n updateUnreadCount();\n state.loading = false;\n return response.data;\n } catch (error) {\n state.loading = false;\n setError(error);\n throw error;\n }\n },\n\n /**\n * Mark a notification as read\n */\n async markAsRead(notificationId) {\n try {\n const response = await $axios.put(`/api/notifications/${notificationId}/read`);\n\n // Update the notification in the local state\n const index = state.notifications.findIndex(n => n._id === notificationId);\n if (index !== -1) {\n state.notifications[index] = response.data;\n updateUnreadCount();\n }\n\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n\n /**\n * Synchronize notification status without API call\n * (For use with WebSocket updates)\n */\n syncNotificationStatus(notificationId, status) {\n const index = state.notifications.findIndex(n => n._id === notificationId);\n if (index !== -1) {\n state.notifications[index].status = status;\n state.notifications[index].updatedAt = new Date().toISOString();\n updateUnreadCount();\n }\n },\n\n /**\n * Register a device for push notifications\n */\n async registerDevice(deviceData) {\n try {\n const userId = auth.state.user?._id;\n \n if (userId) {\n // Registered user\n deviceData.userId = userId;\n } else {\n // Anonymous user - generate or use existing anonymousId\n if (!deviceData.anonymousId) {\n // Generate anonymous ID if not provided\n deviceData.anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n // Store in Capacitor Preferences for persistence\n if (typeof window !== 'undefined') {\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: deviceData.anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n }\n }\n\n console.log('[Notifications Store] Registering device:', deviceData);\n const response = await $axios.post('/api/notifications/devices/register', deviceData);\n console.log('[Notifications Store] Device registered successfully:', response.data);\n state.deviceRegistered = true;\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n\n /**\n * Re-register device after user login\n */\n async reregisterDeviceAfterLogin() {\n try {\n const deviceIdResult = await Preferences.get({ key: 'notifications_device_id' });\n const deviceTokenResult = await Preferences.get({ key: 'notifications_device_token' });\n const deviceTypeResult = await Preferences.get({ key: 'notifications_device_type' });\n \n const deviceId = deviceIdResult.value;\n const deviceToken = deviceTokenResult.value;\n const deviceType = deviceTypeResult.value || 'web';\n \n if (deviceId && deviceToken) {\n console.log('[Notifications Store] Re-registering device after login:', { deviceId, deviceType });\n await this.registerDevice({\n deviceId,\n deviceToken,\n deviceType\n });\n } else {\n console.log('[Notifications Store] No stored device info for re-registration');\n }\n } catch (error) {\n console.error('Error re-registering device after login:', error);\n }\n },\n\n /**\n * Update notification preferences\n */\n async updatePreferences(preferences) {\n try {\n const userId = auth.state.user._id;\n if (!userId) {\n console.warn('Cannot update preferences: No user ID found');\n return;\n }\n\n // Transform preferences object to array format expected by the API\n const preferencesArray = Object.entries(preferences).map(([channelType, isEnabled]) => {\n return {\n channelType,\n notificationType: 'all', // Default type, can be made more specific\n isEnabled,\n };\n });\n\n const response = await $axios.put('/api/notifications/preferences', {\n userId,\n preferences: preferencesArray,\n });\n\n // Update state with new preferences\n const newPreferences = {};\n response.data.forEach(pref => {\n newPreferences[pref.channelType] = pref.isEnabled;\n });\n\n state.preferences = { ...preferencesInitState, ...newPreferences };\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n\n /**\n * Get notification preferences\n */\n async getPreferences() {\n try {\n const userId = auth.state.user._id;\n if (!userId) {\n console.warn('Cannot get preferences: No user ID found');\n return;\n }\n\n // Assuming an endpoint exists to fetch preferences\n const response = await $axios.get(`/api/notifications/preferences/${userId}`);\n\n // Transform API response to our state format\n const newPreferences = {};\n response.data.forEach(pref => {\n newPreferences[pref.channelType] = pref.isEnabled;\n });\n\n state.preferences = { ...preferencesInitState, ...newPreferences };\n return response.data;\n } catch (error) {\n setError(error);\n // If API fails, use default preferences\n state.preferences = { ...preferencesInitState };\n throw error;\n }\n },\n\n /**\n * Add a local notification (for handling push notifications or WebSocket notifications)\n */\n addLocalNotification(notification) {\n // Check if notification already exists by ID to prevent duplicates\n if (notification._id) {\n const existingIndex = state.notifications.findIndex(n => n._id === notification._id);\n if (existingIndex !== -1) {\n // Update existing notification\n state.notifications[existingIndex] = {\n ...state.notifications[existingIndex],\n ...notification,\n updatedAt: new Date().toISOString(),\n };\n updateUnreadCount();\n return;\n }\n }\n\n // Create a notification object that matches our expected format\n const newNotification = {\n _id: notification._id || Date.now().toString(), // Use provided ID or generate temporary one\n title: notification.title,\n body: notification.body,\n type: notification.type || notification.data?.type || 'info',\n metadata: notification.data || notification.metadata || {},\n status: notification.status || 'unread',\n createdAt: notification.createdAt || new Date().toISOString(),\n updatedAt: notification.updatedAt || new Date().toISOString(),\n };\n\n // Add to local state\n state.notifications.unshift(newNotification);\n updateUnreadCount();\n },\n\n /**\n * Handle notification action (e.g., when user taps on push notification)\n */\n handleNotificationAction(data) {\n // Mark notification as read if ID is provided\n if (data.notificationId) {\n actions.markAsRead(data.notificationId);\n }\n\n return true\n\n // // Navigate based on notification type and metadata\n // if (data.route) {\n // // router.push(data.route);\n // alert('1');\n // } else if (data.type === 'order') {\n // // router.push(`/orders/${data.orderId}`);\n // alert('2');\n // } else if (data.type === 'message') {\n // // router.push('/messages');\n // alert('3');\n // } else {\n // // Default to notifications page\n // // router.push('/notifications');\n // alert('4');\n // }\n },\n\n /**\n * Mark all notifications as read\n */\n async markAllAsRead() {\n try {\n const userId = auth.state.user._id;\n if (!userId) {\n console.warn('Cannot mark all as read: No user ID found');\n return;\n }\n\n console.log('=== markAllAsRead API call ===');\n console.log('URL:', `/api/notifications/user/${userId}/read-all`);\n \n const response = await $axios.put(`/api/notifications/user/${userId}/read-all`);\n \n console.log('markAllAsRead response status:', response.status);\n console.log('markAllAsRead response data:', response.data);\n\n // Update all notifications in local state\n state.notifications.forEach(notification => {\n notification.status = 'read';\n notification.updatedAt = new Date().toISOString();\n });\n\n updateUnreadCount();\n console.log('Local state updated, unread count:', state.unreadCount);\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n};\n\nconst mutations = {\n resetNotifications() {\n state.notifications = [];\n state.unreadCount = 0;\n state.lastSync = null;\n },\n\n resetCurrent() {\n state.current = { ...notificationInitState };\n },\n\n resetPreferences() {\n state.preferences = { ...preferencesInitState };\n },\n};\n\n// Helper functions\nfunction updateUnreadCount() {\n state.unreadCount = state.notifications.filter(n => n.status !== 'read').length;\n}\n\n// Track state changes\nconst history = [];\nhistory.push(state);\n\nwatch(state, newState => {\n history.push(newState);\n});\n\n// Computed properties\nconst getters = {\n unreadNotifications: computed(() => {\n return state.notifications.filter(n => n.status !== 'read');\n }),\n\n readNotifications: computed(() => {\n return state.notifications.filter(n => n.status === 'read');\n }),\n\n notificationsByType: computed(() => {\n const result = {};\n state.notifications.forEach(notification => {\n if (!result[notification.type]) {\n result[notification.type] = [];\n }\n result[notification.type].push(notification);\n });\n return result;\n }),\n};\n\nexport { actions, getters, mutations, state };\n"],"names":["auth.state"],"mappings":";;;;;AAYA,MAAM,wBAAwB;AAAA,EAC5B,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU,CAAA;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AACb;AAGA,MAAM,uBAAuB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AAK,EAAE,WAAW,MAAM;AAAA,EAC5D,CAAC;AAAA,EAED,qBAAqB,SAAS,MAAM;AAClC,UAAM,SAAS,CAAA;AACf,UAAM,cAAc,QAAQ,kBAAgB;AAC1C,UAAI,CAAC,OAAO,aAAa,IAAI,GAAG;AAC9B,eAAO,aAAa,IAAI,IAAI,CAAA;AAAA,MAC9B;AACA,aAAO,aAAa,IAAI,EAAE,KAAK,YAAY;AAAA,IAC7C,CAAC;AACD,WAAO;AAAA,EACT,CAAC;AACH;"}
|
|
1
|
+
{"version":3,"file":"notifications.store.js","sources":["../../../../../../src/modules/notifications/store/notifications.store.js"],"sourcesContent":["// Dependencies\nimport { computed, reactive, watch } from 'vue';\n// Setup Axios\nimport $axios from '@martyrs/src/modules/core/views/utils/axios-instance.js';\n// Globals\nimport { setError } from '@martyrs/src/modules/core/views/store/core.store.js';\n// Auth\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n// Capacitor Preferences\nimport { Preferences } from '@capacitor/preferences';\n\n// Initial state for a notification\nconst notificationInitState = {\n _id: null,\n title: '',\n body: '',\n type: 'info',\n metadata: {},\n userId: null,\n status: 'pending',\n createdAt: null,\n updatedAt: null,\n};\n\n// Initial state for notification preferences\nconst preferencesInitState = {\n web: true,\n push: true,\n email: true,\n sms: true,\n telegram: false,\n whatsapp: false,\n};\n\n// State declaration\nconst state = reactive({\n notifications: [],\n unreadCount: 0,\n current: { ...notificationInitState },\n preferences: { ...preferencesInitState },\n deviceRegistered: false,\n loading: false,\n lastSync: null,\n // Telegram\n telegramConnected: false,\n telegramChatId: null,\n telegramDeepLink: null,\n});\n\nconst actions = {\n /**\n * Get user notifications from server\n */\n async getNotifications(userId = null) {\n try {\n // Use provided userId or get from auth store\n const userIdToUse = userId || auth.state.user._id;\n\n if (!userIdToUse) {\n console.warn('Cannot get notifications: No user ID found');\n return [];\n }\n\n state.loading = true;\n const response = await $axios.get(`/api/notifications/user/${userIdToUse}`);\n state.notifications = response.data;\n state.lastSync = new Date().toISOString();\n updateUnreadCount();\n state.loading = false;\n return response.data;\n } catch (error) {\n state.loading = false;\n setError(error);\n throw error;\n }\n },\n\n /**\n * Mark a notification as read\n */\n async markAsRead(notificationId) {\n try {\n const response = await $axios.put(`/api/notifications/${notificationId}/read`);\n\n // Update the notification in the local state\n const index = state.notifications.findIndex(n => n._id === notificationId);\n if (index !== -1) {\n state.notifications[index] = response.data;\n updateUnreadCount();\n }\n\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n\n /**\n * Synchronize notification status without API call\n * (For use with WebSocket updates)\n */\n syncNotificationStatus(notificationId, status) {\n const index = state.notifications.findIndex(n => n._id === notificationId);\n if (index !== -1) {\n state.notifications[index].status = status;\n state.notifications[index].updatedAt = new Date().toISOString();\n updateUnreadCount();\n }\n },\n\n /**\n * Register a device for push notifications\n */\n async registerDevice(deviceData) {\n try {\n const userId = auth.state.user?._id;\n \n if (userId) {\n // Registered user\n deviceData.userId = userId;\n } else {\n // Anonymous user - generate or use existing anonymousId\n if (!deviceData.anonymousId) {\n // Generate anonymous ID if not provided\n deviceData.anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n // Store in Capacitor Preferences for persistence\n if (typeof window !== 'undefined') {\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: deviceData.anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n }\n }\n\n console.log('[Notifications Store] Registering device:', deviceData);\n const response = await $axios.post('/api/notifications/devices/register', deviceData);\n console.log('[Notifications Store] Device registered successfully:', response.data);\n state.deviceRegistered = true;\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n\n /**\n * Unregister (deactivate) device on server\n */\n async unregisterDevice(deviceId) {\n try {\n const userId = auth.state.user?._id;\n const payload = { deviceId };\n if (userId) payload.userId = userId;\n await $axios.post('/api/notifications/devices/deactivate', payload);\n state.deviceRegistered = false;\n } catch (error) {\n console.error('[Notifications Store] Unregister device error:', error);\n }\n },\n\n /**\n * Re-register device after user login\n */\n async reregisterDeviceAfterLogin() {\n try {\n const deviceIdResult = await Preferences.get({ key: 'notifications_device_id' });\n const deviceTokenResult = await Preferences.get({ key: 'notifications_device_token' });\n const deviceTypeResult = await Preferences.get({ key: 'notifications_device_type' });\n \n const deviceId = deviceIdResult.value;\n const deviceToken = deviceTokenResult.value;\n const deviceType = deviceTypeResult.value || 'web';\n \n if (deviceId && deviceToken) {\n console.log('[Notifications Store] Re-registering device after login:', { deviceId, deviceType });\n await this.registerDevice({\n deviceId,\n deviceToken,\n deviceType\n });\n } else {\n console.log('[Notifications Store] No stored device info for re-registration');\n }\n } catch (error) {\n console.error('Error re-registering device after login:', error);\n }\n },\n\n /**\n * Update notification preferences\n */\n async updatePreferences(preferences) {\n try {\n const userId = auth.state.user._id;\n if (!userId) {\n console.warn('Cannot update preferences: No user ID found');\n return;\n }\n\n // Transform preferences object to array format expected by the API\n const preferencesArray = Object.entries(preferences).map(([channelType, isEnabled]) => {\n return {\n channelType,\n notificationType: 'all', // Default type, can be made more specific\n isEnabled,\n };\n });\n\n const response = await $axios.put('/api/notifications/preferences', {\n userId,\n preferences: preferencesArray,\n });\n\n // Update state with new preferences\n const newPreferences = {};\n response.data.forEach(pref => {\n newPreferences[pref.channelType] = pref.isEnabled;\n });\n\n state.preferences = { ...preferencesInitState, ...newPreferences };\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n\n /**\n * Get notification preferences\n */\n async getPreferences() {\n try {\n const userId = auth.state.user._id;\n if (!userId) {\n console.warn('Cannot get preferences: No user ID found');\n return;\n }\n\n // Assuming an endpoint exists to fetch preferences\n const response = await $axios.get(`/api/notifications/preferences/${userId}`);\n\n // Transform API response to our state format\n const newPreferences = {};\n response.data.forEach(pref => {\n newPreferences[pref.channelType] = pref.isEnabled;\n });\n\n state.preferences = { ...preferencesInitState, ...newPreferences };\n return response.data;\n } catch (error) {\n setError(error);\n // If API fails, use default preferences\n state.preferences = { ...preferencesInitState };\n throw error;\n }\n },\n\n /**\n * Generate Telegram deep link for connecting bot\n */\n async generateTelegramLink() {\n try {\n const userId = auth.state.user._id;\n if (!userId) return null;\n const response = await $axios.post('/api/notifications/telegram/generate-link', { userId });\n state.telegramDeepLink = response.data.deepLink;\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n\n /**\n * Get Telegram connection status\n */\n async getTelegramStatus() {\n try {\n const userId = auth.state.user._id;\n if (!userId) return;\n const response = await $axios.get(`/api/notifications/telegram/status/${userId}`);\n state.telegramConnected = response.data.connected;\n state.telegramChatId = response.data.chatId;\n return response.data;\n } catch (error) {\n console.error('Error getting Telegram status:', error);\n }\n },\n\n /**\n * Disconnect Telegram\n */\n async disconnectTelegram() {\n try {\n const userId = auth.state.user._id;\n if (!userId) return;\n await $axios.post('/api/notifications/telegram/disconnect', { userId });\n state.telegramConnected = false;\n state.telegramChatId = null;\n state.telegramDeepLink = null;\n state.preferences.telegram = false;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n\n /**\n * Add a local notification (for handling push notifications or WebSocket notifications)\n */\n addLocalNotification(notification) {\n // Check if notification already exists by ID to prevent duplicates\n if (notification._id) {\n const existingIndex = state.notifications.findIndex(n => n._id === notification._id);\n if (existingIndex !== -1) {\n // Update existing notification\n state.notifications[existingIndex] = {\n ...state.notifications[existingIndex],\n ...notification,\n updatedAt: new Date().toISOString(),\n };\n updateUnreadCount();\n return;\n }\n }\n\n // Create a notification object that matches our expected format\n const newNotification = {\n _id: notification._id || Date.now().toString(), // Use provided ID or generate temporary one\n title: notification.title,\n body: notification.body,\n type: notification.type || notification.data?.type || 'info',\n metadata: notification.data || notification.metadata || {},\n status: notification.status || 'unread',\n createdAt: notification.createdAt || new Date().toISOString(),\n updatedAt: notification.updatedAt || new Date().toISOString(),\n };\n\n // Add to local state\n state.notifications.unshift(newNotification);\n updateUnreadCount();\n },\n\n /**\n * Handle notification action (e.g., when user taps on push notification)\n */\n handleNotificationAction(data) {\n // Mark notification as read if ID is provided\n if (data.notificationId) {\n actions.markAsRead(data.notificationId);\n }\n\n return true\n\n // // Navigate based on notification type and metadata\n // if (data.route) {\n // // router.push(data.route);\n // alert('1');\n // } else if (data.type === 'order') {\n // // router.push(`/orders/${data.orderId}`);\n // alert('2');\n // } else if (data.type === 'message') {\n // // router.push('/messages');\n // alert('3');\n // } else {\n // // Default to notifications page\n // // router.push('/notifications');\n // alert('4');\n // }\n },\n\n /**\n * Mark all notifications as read\n */\n async markAllAsRead() {\n try {\n const userId = auth.state.user._id;\n if (!userId) {\n console.warn('Cannot mark all as read: No user ID found');\n return;\n }\n\n console.log('=== markAllAsRead API call ===');\n console.log('URL:', `/api/notifications/user/${userId}/read-all`);\n \n const response = await $axios.put(`/api/notifications/user/${userId}/read-all`);\n \n console.log('markAllAsRead response status:', response.status);\n console.log('markAllAsRead response data:', response.data);\n\n // Update all notifications in local state\n state.notifications.forEach(notification => {\n notification.status = 'read';\n notification.updatedAt = new Date().toISOString();\n });\n\n updateUnreadCount();\n console.log('Local state updated, unread count:', state.unreadCount);\n return response.data;\n } catch (error) {\n setError(error);\n throw error;\n }\n },\n};\n\nconst mutations = {\n resetNotifications() {\n state.notifications = [];\n state.unreadCount = 0;\n state.lastSync = null;\n },\n\n resetCurrent() {\n state.current = { ...notificationInitState };\n },\n\n resetPreferences() {\n state.preferences = { ...preferencesInitState };\n },\n};\n\n// Helper functions\nfunction updateUnreadCount() {\n state.unreadCount = state.notifications.filter(n => n.status !== 'read').length;\n}\n\n// Track state changes\nconst history = [];\nhistory.push(state);\n\nwatch(state, newState => {\n history.push(newState);\n});\n\n// Computed properties\nconst getters = {\n unreadNotifications: computed(() => {\n return state.notifications.filter(n => n.status !== 'read');\n }),\n\n readNotifications: computed(() => {\n return state.notifications.filter(n => n.status === 'read');\n }),\n\n notificationsByType: computed(() => {\n const result = {};\n state.notifications.forEach(notification => {\n if (!result[notification.type]) {\n result[notification.type] = [];\n }\n result[notification.type].push(notification);\n });\n return result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EAAE,GAAG,qBAAoB;AAAA,EAC/C;AACF;AAGA,SAAS,oBAAoB;AAC3B,QAAM,cAAc,MAAM,cAAc,OAAO,OAAK,EAAE,WAAW,MAAM,EAAE;AAC3E;AAMA,MAAM,OAAO,cAAY;AAEzB,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,qBAAqB,SAAS,MAAM;AAClC,WAAO,MAAM,cAAc,OAAO,OAAK,EAAE,WAAW,MAAM;AAAA,EAC5D,CAAC;AAAA,EAED,mBAAmB,SAAS,MAAM;AAChC,WAAO,MAAM,cAAc,OAAO,OAAK,EAAE,WAAW,MAAM;AAAA,EAC5D,CAAC;AAAA,EAED,qBAAqB,SAAS,MAAM;AAClC,UAAM,SAAS,CAAA;AACf,UAAM,cAAc,QAAQ,kBAAgB;AAC1C,UAAI,CAAC,OAAO,aAAa,IAAI,GAAG;AAC9B,eAAO,aAAa,IAAI,IAAI,CAAA;AAAA,MAC9B;AACA,aAAO,aAAa,IAAI,EAAE,KAAK,YAAY;AAAA,IAC7C,CAAC;AACD,WAAO;AAAA,EACT,CAAC;AACH;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, createVNode } from "vue";
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, createVNode, unref } from "vue";
|
|
2
2
|
import IconTime from "../../../icons/entities/IconTime.vue.js";
|
|
3
3
|
import _sfc_main$1 from "../../../../components/Table/StatusBadge.vue.js";
|
|
4
|
+
import { useGlobalMixins } from "../../../core/views/mixins/mixins.js";
|
|
4
5
|
const _hoisted_1 = { class: "bg-light pos-relative pd-medium radius-medium" };
|
|
5
6
|
const _hoisted_2 = { class: "mn-b-small flex" };
|
|
6
7
|
const _hoisted_3 = { class: "mn-r-auto" };
|
|
7
8
|
const _hoisted_4 = { class: "mn-b-thin" };
|
|
8
|
-
const _hoisted_5 = { class: "
|
|
9
|
+
const _hoisted_5 = { class: "opacity-50" };
|
|
9
10
|
const _hoisted_6 = { class: "flex-center" };
|
|
10
11
|
const _hoisted_7 = { class: "mn-b-thin pd-small bg-white radius-small flex" };
|
|
11
12
|
const _hoisted_8 = { class: "truncate" };
|
|
@@ -31,6 +32,7 @@ const _sfc_main = {
|
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
setup(__props) {
|
|
35
|
+
const { formatPhone } = useGlobalMixins();
|
|
34
36
|
return (_ctx, _cache) => {
|
|
35
37
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
36
38
|
createElementVNode("div", _hoisted_2, [
|
|
@@ -45,15 +47,15 @@ const _sfc_main = {
|
|
|
45
47
|
])
|
|
46
48
|
]),
|
|
47
49
|
createElementVNode("div", _hoisted_7, [
|
|
48
|
-
_cache[0] || (_cache[0] = createElementVNode("p", { class: "mn-r-auto
|
|
50
|
+
_cache[0] || (_cache[0] = createElementVNode("p", { class: "mn-r-auto opacity-50" }, "Type", -1)),
|
|
49
51
|
createElementVNode("p", _hoisted_8, toDisplayString(__props.application.type || "Unknown"), 1)
|
|
50
52
|
]),
|
|
51
53
|
createElementVNode("div", _hoisted_9, [
|
|
52
|
-
_cache[1] || (_cache[1] = createElementVNode("p", { class: "mn-r-auto
|
|
53
|
-
createElementVNode("p", null, toDisplayString(__props.application.contacts?.phone
|
|
54
|
+
_cache[1] || (_cache[1] = createElementVNode("p", { class: "mn-r-auto opacity-50" }, "Phone", -1)),
|
|
55
|
+
createElementVNode("p", null, toDisplayString(__props.application.contacts?.phone ? unref(formatPhone)(__props.application.contacts.phone) : "No phone"), 1)
|
|
54
56
|
]),
|
|
55
57
|
createElementVNode("div", _hoisted_10, [
|
|
56
|
-
_cache[2] || (_cache[2] = createElementVNode("p", { class: "mn-r-auto
|
|
58
|
+
_cache[2] || (_cache[2] = createElementVNode("p", { class: "mn-r-auto opacity-50" }, "ID", -1)),
|
|
57
59
|
createElementVNode("p", null, "#" + toDisplayString(__props.application._id.slice(0, 4) + "..." + __props.application._id.slice(-4)), 1)
|
|
58
60
|
]),
|
|
59
61
|
__props.application.text ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
@@ -61,7 +63,7 @@ const _sfc_main = {
|
|
|
61
63
|
])) : createCommentVNode("", true),
|
|
62
64
|
createElementVNode("div", _hoisted_13, [
|
|
63
65
|
createVNode(IconTime, {
|
|
64
|
-
class: "i-medium
|
|
66
|
+
class: "i-medium opacity-50",
|
|
65
67
|
fill: "rgb(var(--black))"
|
|
66
68
|
}),
|
|
67
69
|
createElementVNode("p", _hoisted_14, toDisplayString(__props.formatDate(__props.application.updatedAt)), 1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardApplication.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CardApplication.vue.js","sources":["../../../../../../../src/modules/orders/components/blocks/CardApplication.vue"],"sourcesContent":["<template>\n <div class=\"bg-light pos-relative pd-medium radius-medium\">\n <div class=\"mn-b-small flex\">\n <div class=\"mn-r-auto\">\n <h3 class=\"mn-b-thin\">{{ application.contacts?.name || application.contacts?.email || application.contacts?.phone || 'Unnamed Application' }}</h3>\n <p class=\"opacity-50\">{{ application.contacts?.email || application.contacts?.phone }}</p>\n </div>\n <div class=\"flex-center\">\n <StatusBadge :value=\"application.status\" />\n </div>\n </div>\n\n <div class=\"mn-b-thin pd-small bg-white radius-small flex\">\n <p class=\"mn-r-auto opacity-50\">Type</p>\n <p class=\"truncate\">{{ application.type || 'Unknown' }}</p>\n </div>\n\n <div class=\"mn-b-thin pd-small bg-white radius-small flex\">\n <p class=\"mn-r-auto opacity-50\">Phone</p>\n <p>{{ application.contacts?.phone ? formatPhone(application.contacts.phone) : 'No phone' }}</p>\n </div>\n\n <div class=\"mn-b-thin pd-small bg-white radius-small flex\">\n <p class=\"mn-r-auto opacity-50\">ID</p>\n <p>#{{ application._id.slice(0, 4) + '...' + application._id.slice(-4) }}</p>\n </div>\n\n <div v-if=\"application.text\" class=\"mn-b-thin pd-small bg-white radius-small\">\n <p class=\"t-small\">{{ application.text.length > 100 ? application.text.slice(0, 100) + '...' : application.text }}</p>\n </div>\n\n <div class=\"pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex\">\n <IconTime class=\"i-medium opacity-50\" fill=\"rgb(var(--black))\" />\n <p class=\"fw-medium mn-r-auto\">{{ formatDate(application.updatedAt) }}</p>\n </div>\n </div>\n</template>\n\n<script setup>\n import IconTime from '@martyrs/src/modules/icons/entities/IconTime.vue';\n import StatusBadge from '@martyrs/src/components/Table/StatusBadge.vue';\n import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\n const { formatPhone } = useGlobalMixins();\n\n defineProps({\n application: {\n type: Object,\n required: true\n },\n formatDate: {\n type: Function,\n required: true\n }\n });\n</script>\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CE,UAAM,EAAE,YAAW,IAAK,gBAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, createVNode, Fragment, renderList } from "vue";
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, unref, createVNode, Fragment, renderList } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Table/StatusBadge.vue.js";
|
|
3
3
|
import IconTime from "../../../icons/entities/IconTime.vue.js";
|
|
4
|
+
import { useGlobalMixins } from "../../../core/views/mixins/mixins.js";
|
|
4
5
|
const _hoisted_1 = { class: "bg-light pos-relative pd-medium radius-medium" };
|
|
5
6
|
const _hoisted_2 = { class: "mn-b-small flex" };
|
|
6
7
|
const _hoisted_3 = { class: "mn-r-auto" };
|
|
7
8
|
const _hoisted_4 = { class: "mn-b-thin" };
|
|
8
|
-
const _hoisted_5 = { class: "
|
|
9
|
+
const _hoisted_5 = { class: "opacity-50" };
|
|
9
10
|
const _hoisted_6 = { class: "flex-center" };
|
|
10
11
|
const _hoisted_7 = { class: "mn-b-thin pd-small bg-white radius-small flex" };
|
|
11
12
|
const _hoisted_8 = { class: "truncate" };
|
|
@@ -17,7 +18,7 @@ const _hoisted_11 = {
|
|
|
17
18
|
};
|
|
18
19
|
const _hoisted_12 = {
|
|
19
20
|
key: 0,
|
|
20
|
-
class: "bg-light pd-nano radius-small t-small
|
|
21
|
+
class: "bg-light pd-nano radius-small t-small opacity-50"
|
|
21
22
|
};
|
|
22
23
|
const _hoisted_13 = {
|
|
23
24
|
key: 1,
|
|
@@ -39,12 +40,13 @@ const _sfc_main = {
|
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
42
|
setup(__props) {
|
|
43
|
+
const { formatPhone } = useGlobalMixins();
|
|
42
44
|
return (_ctx, _cache) => {
|
|
43
45
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
44
46
|
createElementVNode("div", _hoisted_2, [
|
|
45
47
|
createElementVNode("div", _hoisted_3, [
|
|
46
|
-
createElementVNode("h3", _hoisted_4, toDisplayString(__props.customer.profile?.name || __props.customer.email || __props.customer.phone || "Unnamed Customer"), 1),
|
|
47
|
-
createElementVNode("p", _hoisted_5, toDisplayString(__props.customer.email || __props.customer.phone), 1)
|
|
48
|
+
createElementVNode("h3", _hoisted_4, toDisplayString(__props.customer.profile?.name || __props.customer.email || unref(formatPhone)(__props.customer.phone) || "Unnamed Customer"), 1),
|
|
49
|
+
createElementVNode("p", _hoisted_5, toDisplayString(__props.customer.email || unref(formatPhone)(__props.customer.phone)), 1)
|
|
48
50
|
]),
|
|
49
51
|
createElementVNode("div", _hoisted_6, [
|
|
50
52
|
createVNode(_sfc_main$1, {
|
|
@@ -53,15 +55,15 @@ const _sfc_main = {
|
|
|
53
55
|
])
|
|
54
56
|
]),
|
|
55
57
|
createElementVNode("div", _hoisted_7, [
|
|
56
|
-
_cache[0] || (_cache[0] = createElementVNode("p", { class: "mn-r-auto
|
|
58
|
+
_cache[0] || (_cache[0] = createElementVNode("p", { class: "mn-r-auto opacity-50" }, "Source", -1)),
|
|
57
59
|
createElementVNode("p", _hoisted_8, toDisplayString(__props.customer.source || "Unknown"), 1)
|
|
58
60
|
]),
|
|
59
61
|
createElementVNode("div", _hoisted_9, [
|
|
60
|
-
_cache[1] || (_cache[1] = createElementVNode("p", { class: "mn-r-auto
|
|
62
|
+
_cache[1] || (_cache[1] = createElementVNode("p", { class: "mn-r-auto opacity-50" }, "Type", -1)),
|
|
61
63
|
createElementVNode("p", null, toDisplayString(__props.customer.identity?.type || "Visitor"), 1)
|
|
62
64
|
]),
|
|
63
65
|
createElementVNode("div", _hoisted_10, [
|
|
64
|
-
_cache[2] || (_cache[2] = createElementVNode("p", { class: "mn-r-auto
|
|
66
|
+
_cache[2] || (_cache[2] = createElementVNode("p", { class: "mn-r-auto opacity-50" }, "ID", -1)),
|
|
65
67
|
createElementVNode("p", null, "#" + toDisplayString(__props.customer._id.slice(0, 4) + "..." + __props.customer._id.slice(-4)), 1)
|
|
66
68
|
]),
|
|
67
69
|
__props.customer.tags && __props.customer.tags.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
@@ -78,7 +80,7 @@ const _sfc_main = {
|
|
|
78
80
|
])) : createCommentVNode("", true),
|
|
79
81
|
createElementVNode("div", _hoisted_15, [
|
|
80
82
|
createVNode(IconTime, {
|
|
81
|
-
class: "i-medium
|
|
83
|
+
class: "i-medium opacity-50",
|
|
82
84
|
fill: "rgb(var(--black))"
|
|
83
85
|
}),
|
|
84
86
|
createElementVNode("p", _hoisted_16, toDisplayString(__props.formatDate(__props.customer.lastActivity || __props.customer.updatedAt)), 1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardCustomer.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CardCustomer.vue.js","sources":["../../../../../../../src/modules/orders/components/blocks/CardCustomer.vue"],"sourcesContent":["<template>\n <div class=\"bg-light pos-relative pd-medium radius-medium\">\n <div class=\"mn-b-small flex\">\n <div class=\"mn-r-auto\">\n <h3 class=\"mn-b-thin\">{{ customer.profile?.name || customer.email || formatPhone(customer.phone) || 'Unnamed Customer' }}</h3>\n <p class=\"opacity-50\">{{ customer.email || formatPhone(customer.phone) }}</p>\n </div>\n <div class=\"flex-center\">\n <StatusBadge :value=\"customer.status\" />\n </div>\n </div>\n\n <div class=\"mn-b-thin pd-small bg-white radius-small flex\">\n <p class=\"mn-r-auto opacity-50\">Source</p>\n <p class=\"truncate\">{{ customer.source || 'Unknown' }}</p>\n </div>\n\n <div class=\"mn-b-thin pd-small bg-white radius-small flex\">\n <p class=\"mn-r-auto opacity-50\">Type</p>\n <p>{{ customer.identity?.type || 'Visitor' }}</p>\n </div>\n\n <div class=\"mn-b-thin pd-small bg-white radius-small flex\">\n <p class=\"mn-r-auto opacity-50\">ID</p>\n <p>#{{ customer._id.slice(0, 4) + '...' + customer._id.slice(-4) }}</p>\n </div>\n\n <div v-if=\"customer.tags && customer.tags.length > 0\" class=\"mn-b-thin pd-small bg-white radius-small flex flex-wrap gap-nano\">\n <span\n v-for=\"tag in customer.tags.slice(0, 3)\"\n :key=\"tag\"\n class=\"bg-light pd-nano radius-small t-small\"\n >\n {{ tag }}\n </span>\n <span\n v-if=\"customer.tags.length > 3\"\n class=\"bg-light pd-nano radius-small t-small opacity-50\"\n >\n +{{ customer.tags.length - 3 }}\n </span>\n </div>\n\n <div v-if=\"customer.referral?.code\" class=\"mn-b-thin pd-small bg-white radius-small\">\n <p class=\"t-small\">Referral: {{ customer.referral.code }}</p>\n </div>\n\n <div class=\"pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex\">\n <IconTime class=\"i-medium opacity-50\" fill=\"rgb(var(--black))\" />\n <p class=\"fw-medium mn-r-auto\">{{ formatDate(customer.lastActivity || customer.updatedAt) }}</p>\n </div>\n </div>\n</template>\n\n<script setup>\n import StatusBadge from '@martyrs/src/components/Table/StatusBadge.vue';\n import IconTime from '@martyrs/src/modules/icons/entities/IconTime.vue';\n import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\n const { formatPhone } = useGlobalMixins();\n\n defineProps({\n customer: {\n type: Object,\n required: true\n },\n formatDate: {\n type: Function,\n required: true\n }\n });\n</script>\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DE,UAAM,EAAE,YAAW,IAAK,gBAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -64,7 +64,7 @@ const _hoisted_24 = {
|
|
|
64
64
|
};
|
|
65
65
|
const _hoisted_25 = {
|
|
66
66
|
key: 5,
|
|
67
|
-
class: "
|
|
67
|
+
class: "opacity-50"
|
|
68
68
|
};
|
|
69
69
|
const _sfc_main = {
|
|
70
70
|
__name: "CardOrder",
|
|
@@ -101,21 +101,21 @@ const _sfc_main = {
|
|
|
101
101
|
]),
|
|
102
102
|
createElementVNode("div", _hoisted_10, [
|
|
103
103
|
createElementVNode("p", _hoisted_11, [
|
|
104
|
-
_cache[2] || (_cache[2] = createElementVNode("span", { class: "
|
|
104
|
+
_cache[2] || (_cache[2] = createElementVNode("span", { class: "opacity-50" }, "Order:", -1)),
|
|
105
105
|
createTextVNode(" №" + toDisplayString(__props.order._id.slice(0, 8)), 1)
|
|
106
106
|
]),
|
|
107
107
|
__props.order.delivery.type === "Post" ? (openBlock(), createElementBlock("p", _hoisted_12, [
|
|
108
|
-
_cache[3] || (_cache[3] = createElementVNode("span", { class: "
|
|
108
|
+
_cache[3] || (_cache[3] = createElementVNode("span", { class: "opacity-50" }, "Estimated shipping date:", -1)),
|
|
109
109
|
_cache[4] || (_cache[4] = createElementVNode("br", null, null, -1)),
|
|
110
110
|
createTextVNode(toDisplayString(DateToFormattedString(__props.order.createdAt)), 1)
|
|
111
111
|
])) : createCommentVNode("", true),
|
|
112
112
|
__props.order.delivery.type === "Courier" ? (openBlock(), createElementBlock("p", _hoisted_13, [
|
|
113
|
-
_cache[5] || (_cache[5] = createElementVNode("span", { class: "
|
|
113
|
+
_cache[5] || (_cache[5] = createElementVNode("span", { class: "opacity-50" }, "Shipping date:", -1)),
|
|
114
114
|
_cache[6] || (_cache[6] = createElementVNode("br", null, null, -1)),
|
|
115
115
|
createTextVNode(toDisplayString(DateToFormattedString2(__props.order.createdAt)), 1)
|
|
116
116
|
])) : createCommentVNode("", true),
|
|
117
117
|
__props.order.delivery.type === "Pickup" ? (openBlock(), createElementBlock("p", _hoisted_14, _cache[7] || (_cache[7] = [
|
|
118
|
-
createElementVNode("span", { class: "
|
|
118
|
+
createElementVNode("span", { class: "opacity-50" }, "Type of delivery:", -1),
|
|
119
119
|
createElementVNode("br", null, null, -1),
|
|
120
120
|
createTextVNode("Pickup ")
|
|
121
121
|
]))) : createCommentVNode("", true),
|
|
@@ -123,17 +123,17 @@ const _sfc_main = {
|
|
|
123
123
|
createElementVNode("div", {
|
|
124
124
|
class: normalizeClass([{ "mn-semi": __props.order.delivery.type == "" }, "flex"])
|
|
125
125
|
}, [
|
|
126
|
-
_cache[8] || (_cache[8] = createElementVNode("p", { class: "
|
|
126
|
+
_cache[8] || (_cache[8] = createElementVNode("p", { class: "opacity-50" }, "In total", -1)),
|
|
127
127
|
createElementVNode("p", null, "$ " + toDisplayString(_ctx.cartTotalPrice), 1)
|
|
128
128
|
], 2),
|
|
129
129
|
__props.order.delivery.type !== "" ? (openBlock(), createElementBlock("div", _hoisted_15, [
|
|
130
|
-
_cache[9] || (_cache[9] = createElementVNode("p", { class: "
|
|
130
|
+
_cache[9] || (_cache[9] = createElementVNode("p", { class: "opacity-50" }, "Delivery", -1)),
|
|
131
131
|
__props.order.delivery.type === "Pickup" ? (openBlock(), createElementBlock("p", _hoisted_16, "Free")) : createCommentVNode("", true),
|
|
132
132
|
__props.order.delivery.type === "Post" ? (openBlock(), createElementBlock("p", _hoisted_17, "$ 10")) : createCommentVNode("", true),
|
|
133
133
|
__props.order.delivery.type === "Courier" ? (openBlock(), createElementBlock("p", _hoisted_18, "$ 20")) : createCommentVNode("", true)
|
|
134
134
|
])) : createCommentVNode("", true),
|
|
135
135
|
createElementVNode("div", _hoisted_19, [
|
|
136
|
-
_cache[10] || (_cache[10] = createElementVNode("p", { class: "
|
|
136
|
+
_cache[10] || (_cache[10] = createElementVNode("p", { class: "opacity-50" }, "In total to pay", -1)),
|
|
137
137
|
__props.order.delivery.type === "" ? (openBlock(), createElementBlock("p", _hoisted_20, "$ " + toDisplayString(_ctx.cartTotalPrice), 1)) : createCommentVNode("", true),
|
|
138
138
|
__props.order.delivery.type === "Pickup" ? (openBlock(), createElementBlock("p", _hoisted_21, "$ " + toDisplayString(_ctx.cartTotalPrice) + " ₽", 1)) : createCommentVNode("", true),
|
|
139
139
|
__props.order.delivery.type === "Courier" ? (openBlock(), createElementBlock("p", _hoisted_22, "$ " + toDisplayString(_ctx.cartTotalPrice + 20), 1)) : createCommentVNode("", true),
|
|
@@ -147,7 +147,7 @@ const _sfc_main = {
|
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
const CardOrder = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
150
|
+
const CardOrder = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-62ed93f8"]]);
|
|
151
151
|
export {
|
|
152
152
|
CardOrder as default
|
|
153
153
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardOrder.vue.js","sources":["../../../../../../../src/modules/orders/components/blocks/CardOrder.vue"],"sourcesContent":["<template>\n\t<div class=\"pd-big mn-regular order-customer-card col\"> \n\t <p class=\"mn-regular flex-center flex-nowrap flex w-100\">\n\t\t\t\t<!-- <img loading=\"lazy\" v-if=\"order.status === 'Created'\" \t\t\tclass=\"mn-r-small\" src=\"@/assets/icons/status/created.svg\"/>\n\t\t\t\t<img loading=\"lazy\" v-if=\"order.status === 'Confirmed'\"\tclass=\"mn-r-small\" src=\"@/assets/icons/status/confirmed.svg\"/>\n\t\t\t\t<img loading=\"lazy\" v-if=\"order.status === 'Awaiting shipment'\" \t\t\tclass=\"mn-r-small\" src=\"@/assets/icons/status/paid.svg\"/>\n\t\t\t\t<img loading=\"lazy\" v-if=\"order.status === 'In delivery'\" \t\tclass=\"mn-r-small\" src=\"@/assets/icons/status/finished.svg\"/>\n\t\t\t\t<img loading=\"lazy\" v-if=\"order.status === 'Finished'\" \t\tclass=\"mn-r-small\" src=\"@/assets/icons/status/finished.svg\"/> -->\n\t <span class=\"w-100 fw-medium p-medium\">{{order.status}}</span>\n\t </p>\n\t \n\t <div class=\"flex-nowrap flex\">\n\t \t<div class=\"mn-r-bold pd-r-big br-r-1px br-dark w-66\">\n\t \t\t<ul class=\"mn-semi\">\n\t <!-- <li v-for=\"(product, index) in orderProducts(order.items.slice(0,2))\" :key=\"product.id\" class=\"shop-cart-item\">\n\t \t<img loading=\"lazy\" v-if=\"product.images\" :src=\"require( `@/assets/images/products/${product.images[0]}`)\">\n\t <img loading=\"lazy\" v-if=\"!(product.images)\" :src=\"require( `@/assets/icons/photo.svg`)\">\n\t \n\t <div class=\"text-left\">\n\t <p class=\"name\">{{ product.name }}</p>\n\n\t <div class=\"flex\">\n\t <div class=\"small-underline variant\">\n\t <span v-if=\"!product.size && !product.color\" class=\"\">One-size</span>\n\t <span v-if=\"product.size\" class=\"\">{{ product.size}}</span>\n\t <span v-if=\"product.color && product.size\" class=\"\">, </span>\n\t <span v-if=\"product.color\" class=\"\">{{ product.color}}</span>\n\t </div>\n\t \n\t <p class=\"fw-demi\">$ {{product.quantity}} x {{product.price}}</p>\n\t </div>\n\n\t </div>\n\n\t \t\t</li> -->\n\t </ul>\n\t <p class=\"mn-small fw-medium p-medium\">\n\t \tAdress and delivery\n\t </p>\n\t <p class=\"mn-small\">\n\t {{order.delivery.adress}} \n\t </p>\n\t <p v-if=\"order.delivery.type === 'Post'\" class=\"w-\">\n\t \t\tYou have chosen delivery using the courier service CDEK. Estimated delivery date {{DateToFormattedString(order.createdAt)}}.\n\t </p>\n\n\t <p v-if=\"order.delivery.type === 'Courier'\" class=\"w-\">\n\t \t\tYou have chosen delivery by courier. Estimated delivery date {{DateToFormattedString2(order.createdAt)}}.\n\t </p>\n\n\t <p v-if=\"order.delivery.type === 'Pickup'\" class=\"w-\">\n\t \t\tYou have chosen to receive the order in the Moscow store.\n\t </p>\n\t </div>\n\n\n\t <div class=\"w-40\">\n\t \t<p class=\"mn-small w-100 fw-medium p-medium\">\n\t <span class=\"
|
|
1
|
+
{"version":3,"file":"CardOrder.vue.js","sources":["../../../../../../../src/modules/orders/components/blocks/CardOrder.vue"],"sourcesContent":["<template>\n\t<div class=\"pd-big mn-regular order-customer-card col\"> \n\t <p class=\"mn-regular flex-center flex-nowrap flex w-100\">\n\t\t\t\t<!-- <img loading=\"lazy\" v-if=\"order.status === 'Created'\" \t\t\tclass=\"mn-r-small\" src=\"@/assets/icons/status/created.svg\"/>\n\t\t\t\t<img loading=\"lazy\" v-if=\"order.status === 'Confirmed'\"\tclass=\"mn-r-small\" src=\"@/assets/icons/status/confirmed.svg\"/>\n\t\t\t\t<img loading=\"lazy\" v-if=\"order.status === 'Awaiting shipment'\" \t\t\tclass=\"mn-r-small\" src=\"@/assets/icons/status/paid.svg\"/>\n\t\t\t\t<img loading=\"lazy\" v-if=\"order.status === 'In delivery'\" \t\tclass=\"mn-r-small\" src=\"@/assets/icons/status/finished.svg\"/>\n\t\t\t\t<img loading=\"lazy\" v-if=\"order.status === 'Finished'\" \t\tclass=\"mn-r-small\" src=\"@/assets/icons/status/finished.svg\"/> -->\n\t <span class=\"w-100 fw-medium p-medium\">{{order.status}}</span>\n\t </p>\n\t \n\t <div class=\"flex-nowrap flex\">\n\t \t<div class=\"mn-r-bold pd-r-big br-r-1px br-dark w-66\">\n\t \t\t<ul class=\"mn-semi\">\n\t <!-- <li v-for=\"(product, index) in orderProducts(order.items.slice(0,2))\" :key=\"product.id\" class=\"shop-cart-item\">\n\t \t<img loading=\"lazy\" v-if=\"product.images\" :src=\"require( `@/assets/images/products/${product.images[0]}`)\">\n\t <img loading=\"lazy\" v-if=\"!(product.images)\" :src=\"require( `@/assets/icons/photo.svg`)\">\n\t \n\t <div class=\"text-left\">\n\t <p class=\"name\">{{ product.name }}</p>\n\n\t <div class=\"flex\">\n\t <div class=\"small-underline variant\">\n\t <span v-if=\"!product.size && !product.color\" class=\"\">One-size</span>\n\t <span v-if=\"product.size\" class=\"\">{{ product.size}}</span>\n\t <span v-if=\"product.color && product.size\" class=\"\">, </span>\n\t <span v-if=\"product.color\" class=\"\">{{ product.color}}</span>\n\t </div>\n\t \n\t <p class=\"fw-demi\">$ {{product.quantity}} x {{product.price}}</p>\n\t </div>\n\n\t </div>\n\n\t \t\t</li> -->\n\t </ul>\n\t <p class=\"mn-small fw-medium p-medium\">\n\t \tAdress and delivery\n\t </p>\n\t <p class=\"mn-small\">\n\t {{order.delivery.adress}} \n\t </p>\n\t <p v-if=\"order.delivery.type === 'Post'\" class=\"w-\">\n\t \t\tYou have chosen delivery using the courier service CDEK. Estimated delivery date {{DateToFormattedString(order.createdAt)}}.\n\t </p>\n\n\t <p v-if=\"order.delivery.type === 'Courier'\" class=\"w-\">\n\t \t\tYou have chosen delivery by courier. Estimated delivery date {{DateToFormattedString2(order.createdAt)}}.\n\t </p>\n\n\t <p v-if=\"order.delivery.type === 'Pickup'\" class=\"w-\">\n\t \t\tYou have chosen to receive the order in the Moscow store.\n\t </p>\n\t </div>\n\n\n\t <div class=\"w-40\">\n\t \t<p class=\"mn-small w-100 fw-medium p-medium\">\n\t <span class=\"opacity-50\">Order:</span> №{{order._id.slice(0,8)}} \n\t </p>\n\t <p v-if=\"order.delivery.type === 'Post'\" class=\"mn-medium w-100\">\n\t \t<span class=\"opacity-50\">Estimated shipping date:</span><br>{{DateToFormattedString(order.createdAt)}}\n\t </p>\n\t <p v-if=\"order.delivery.type === 'Courier'\" class=\"mn-medium w-100\">\n\t \t<span class=\"opacity-50\">Shipping date:</span><br>{{DateToFormattedString2(order.createdAt)}}\n\t </p>\n\t <p v-if=\"order.delivery.type === 'Pickup'\" class=\"mn-medium w-100\">\n\t \t<span class=\"opacity-50\">Type of delivery:</span><br>Pickup\n\t </p>\n\t <hr class=\"mn-medium\">\n\n\t <div :class=\"{'mn-semi': order.delivery.type == ''}\" class=\"flex\">\n\t <p class=\"opacity-50\">In total</p>\n\t <p>$ {{ cartTotalPrice }}</p>\n\t </div>\n\t <div v-if=\"order.delivery.type !== ''\" class=\"mn-semi flex\">\n\t <p class=\"opacity-50\">Delivery</p>\n\t <p v-if=\"order.delivery.type === 'Pickup'\">Free</p>\n\t <p v-if=\"order.delivery.type === 'Post'\">$ 10</p>\n\t <p v-if=\"order.delivery.type === 'Courier'\">$ 20</p>\n\t </div>\n\t <div class=\"mn-semi intotal flex-bottom flex\">\n\t <p class=\"opacity-50\">In total to pay</p>\n\t <p v-if=\"order.delivery.type === ''\" class=\"p-medium fw-semi\">$ {{ cartTotalPrice }}</p>\n\t <p v-if=\"order.delivery.type === 'Pickup'\" class=\"p-medium fw-semi\">$ {{ cartTotalPrice}} ₽</p>\n\t <p v-if=\"order.delivery.type === 'Courier'\" class=\"p-medium fw-semi\">$ {{ cartTotalPrice + 20 }}</p>\n\t <p v-if=\"order.delivery.type === 'Post'\" class=\"p-medium fw-semi\">$ {{ cartTotalPrice + 10 }}</p>\n\t </div>\n\t <hr v-if=\"order.status === 'Confirmed'\" class=\"mn-semi\" >\n\t <!-- \t<button \n\t \t@click=\"requestPayment(order)\"\n\t \tv-if=\"\n\t \t\torder.status === 'Подтвержден' \n\t \t\t&& order.payment.type === 'Online'\n\t \t\t&& payment.Status !== 'CONFIRMED'\n\t \t\t&& payment.Status !== 'REFUNDED'\n\t \t\" \n\t \tclass='w-100 button'>Оплатить заказ</button> -->\n\t \t<span class=\"opacity-50\" v-if=\"payment && payment.Status === 'CONFIRMED'\">Paid</span> \n\t </div> \n\t </div>\n\t</div>\t\t\n\n</template>\n\n\n<script setup=\"props\">\n\timport { defineProps,computed } from 'vue'\n\timport { useRouter } from 'vue-router'\n\n\tconst router = useRouter()\n\n\tconst props = defineProps({\n\t order: Object,\n\t});\n\n\n\n\t// await store.dispatch('payments/getStatus', props.order._id)\n\n\t// const payment = computed(() => store.state.payments.current)\n\t// const cartTotalPrice = computed(() => store.getters['orders/orderTotalPrice'])\n\n\tfunction requestPayment(order) {\n\t\t // store.dispatch(\"payments/newPayment\", order);\n\t}\n\t\n\tfunction DateToFormattedString(d) { \n var fixedDate = new Date(d); \n var mm = (fixedDate.getMonth()+1).toString(); // getMonth() is zero-based \n var dd = (fixedDate.getDate() + 6).toString(); \n \n return (dd[1]?dd:\"0\"+dd[0]) + '/' + (mm[1]?mm:\"0\"+mm[0]);\n }\n\n function DateToFormattedString2(d) { \n var fixedDate = new Date(d); \n var mm = (fixedDate.getMonth() + 1).toString(); // getMonth() is zero-based \n var dd = (fixedDate.getDate() + 1).toString(); \n \n return (dd[1]?dd:\"0\"+dd[0]) + '/' + (mm[1]?mm:\"0\"+mm[0]);\n }\n\n\t// function orderProducts (items) {\n\t// return items.map(({ id, size, color, quantity }) => {\n\t// const product = store.state.products.all.find(product => product.id === id)\n\t// return {\n\t// name: product.name,\n\t// images: product.images[0],\n\t// color,\n\t// size,\n\t// price: product.price,\n\t// id: product.id,\n\t// quantity\n\t// }\n\t// })\n\t// }\n\n</script>\n\n<style lang=\"scss\" scoped>\n.shop-cart-item {\n\t&:first-of-type { padding-top: 0;}\n}\n\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GgB,cAAS;AAiBxB,aAAS,sBAAsB,GAAG;AAC/B,UAAI,YAAY,IAAI,KAAK,CAAC;AAC1B,UAAI,MAAM,UAAU,SAAQ,IAAG,GAAG;AAClC,UAAI,MAAO,UAAU,QAAO,IAAK,GAAG;AAEpC,cAAQ,GAAG,CAAC,IAAE,KAAG,MAAI,GAAG,CAAC,KAAK,OAAO,GAAG,CAAC,IAAE,KAAG,MAAI,GAAG,CAAC;AAAA,IACxD;AAEA,aAAS,uBAAuB,GAAG;AACjC,UAAI,YAAY,IAAI,KAAK,CAAC;AAC1B,UAAI,MAAM,UAAU,SAAQ,IAAK,GAAG;AACpC,UAAI,MAAO,UAAU,QAAO,IAAK,GAAG;AAEpC,cAAQ,GAAG,CAAC,IAAE,KAAG,MAAI,GAAG,CAAC,KAAK,OAAO,GAAG,CAAC,IAAE,KAAG,MAAI,GAAG,CAAC;AAAA,IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ref, createElementBlock, openBlock, createVNode, createElementVNode, createCommentVNode, toDisplayString, Fragment, renderList, createBlock, Transition, withCtx, createTextVNode, withModifiers } from "vue";
|
|
1
|
+
import { ref, createElementBlock, openBlock, createVNode, createElementVNode, createCommentVNode, toDisplayString, Fragment, renderList, createBlock, Transition, withCtx, createTextVNode, withModifiers, normalizeClass } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../core/views/components/blocks/CardHeader.vue.js";
|
|
3
3
|
import IconTime from "../../../icons/entities/IconTime.vue.js";
|
|
4
|
+
import { formatRentDateLabel } from "../../utils/rent-price.js";
|
|
4
5
|
const _hoisted_1 = { class: "bg-light pos-relative pd-medium radius-medium" };
|
|
5
6
|
const _hoisted_2 = { class: "mn-b-small pd-small bg-white radius-small flex-nowrap flex" };
|
|
6
7
|
const _hoisted_3 = { class: "w-100" };
|
|
@@ -9,13 +10,15 @@ const _hoisted_5 = { class: "w-100 t-right" };
|
|
|
9
10
|
const _hoisted_6 = { class: "mn-b-thin" };
|
|
10
11
|
const _hoisted_7 = { class: "cols-1 pos-relative mn-b-small gap-thin pd-small bg-white radius-small" };
|
|
11
12
|
const _hoisted_8 = { class: "mn-r-auto" };
|
|
12
|
-
const _hoisted_9 = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
13
|
+
const _hoisted_9 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "mn-t-thin p-small opacity-50"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_10 = { class: "t-right flex-shrink-0" };
|
|
18
|
+
const _hoisted_11 = { class: "opacity-50" };
|
|
19
|
+
const _hoisted_12 = { class: "pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex" };
|
|
20
|
+
const _hoisted_13 = { class: "fw-medium mn-r-auto" };
|
|
21
|
+
const _hoisted_14 = {
|
|
19
22
|
key: 0,
|
|
20
23
|
class: "pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small"
|
|
21
24
|
};
|
|
@@ -30,6 +33,10 @@ const _sfc_main = {
|
|
|
30
33
|
type: Object,
|
|
31
34
|
required: true
|
|
32
35
|
},
|
|
36
|
+
statuses: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: () => []
|
|
39
|
+
},
|
|
33
40
|
formatDate: {
|
|
34
41
|
type: Function,
|
|
35
42
|
required: true
|
|
@@ -44,7 +51,40 @@ const _sfc_main = {
|
|
|
44
51
|
}
|
|
45
52
|
},
|
|
46
53
|
setup(__props) {
|
|
54
|
+
const props = __props;
|
|
47
55
|
const spoiler = ref(false);
|
|
56
|
+
function positionRentLabel(position) {
|
|
57
|
+
return formatRentDateLabel(position.date?.start, position.date?.end, position.rentPeriod, props.formatDate);
|
|
58
|
+
}
|
|
59
|
+
function statusLabel(value) {
|
|
60
|
+
const found = props.statuses.find((s) => s.value === value);
|
|
61
|
+
return found ? found.label : value;
|
|
62
|
+
}
|
|
63
|
+
const orderStatusColors = {
|
|
64
|
+
"pending": "bg-yellow",
|
|
65
|
+
"created": "bg-yellow",
|
|
66
|
+
"confirmed": "t-white bg-second",
|
|
67
|
+
"in_progress": "bg-green",
|
|
68
|
+
"active": "bg-green",
|
|
69
|
+
"finished": "bg-grey",
|
|
70
|
+
"completed": "bg-grey",
|
|
71
|
+
"canceled": "t-white bg-red"
|
|
72
|
+
};
|
|
73
|
+
function orderStatusClass(status) {
|
|
74
|
+
return orderStatusColors[status] || "bg-main";
|
|
75
|
+
}
|
|
76
|
+
function paymentStatusClass(status) {
|
|
77
|
+
switch (status) {
|
|
78
|
+
case "paid":
|
|
79
|
+
return "t-white bg-green";
|
|
80
|
+
case "pending":
|
|
81
|
+
return "bg-yellow";
|
|
82
|
+
case "refunded":
|
|
83
|
+
return "t-white bg-second";
|
|
84
|
+
default:
|
|
85
|
+
return "t-white bg-red";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
48
88
|
return (_ctx, _cache) => {
|
|
49
89
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
50
90
|
createVNode(_sfc_main$1, {
|
|
@@ -71,12 +111,15 @@ const _sfc_main = {
|
|
|
71
111
|
default: withCtx(() => [
|
|
72
112
|
index < 2 || spoiler.value && index >= 2 ? (openBlock(), createElementBlock("div", {
|
|
73
113
|
key: index,
|
|
74
|
-
class: "w-100 flex"
|
|
114
|
+
class: "w-100 flex-v-center flex"
|
|
75
115
|
}, [
|
|
76
|
-
createElementVNode("
|
|
77
|
-
|
|
116
|
+
createElementVNode("div", _hoisted_8, [
|
|
117
|
+
createElementVNode("p", null, toDisplayString(position.name), 1),
|
|
118
|
+
position.listing === "rent" && position.date?.start && position.date?.end ? (openBlock(), createElementBlock("p", _hoisted_9, toDisplayString(positionRentLabel(position)), 1)) : createCommentVNode("", true)
|
|
119
|
+
]),
|
|
120
|
+
createElementVNode("p", _hoisted_10, [
|
|
78
121
|
createTextVNode(toDisplayString(position.quantity) + " " + toDisplayString(position.type) + " x ", 1),
|
|
79
|
-
createElementVNode("span",
|
|
122
|
+
createElementVNode("span", _hoisted_11, toDisplayString(__props.currency) + " " + toDisplayString(position.price), 1)
|
|
80
123
|
])
|
|
81
124
|
])) : createCommentVNode("", true)
|
|
82
125
|
]),
|
|
@@ -89,17 +132,21 @@ const _sfc_main = {
|
|
|
89
132
|
class: "cursor-pointer radius-big bg-light-transp-50 pd-nano w-100 flex-center flex"
|
|
90
133
|
}, toDisplayString(!spoiler.value ? `+${__props.order.positions.length - 2} more` : `Hide`), 1)) : createCommentVNode("", true)
|
|
91
134
|
]),
|
|
92
|
-
createElementVNode("div",
|
|
135
|
+
createElementVNode("div", _hoisted_12, [
|
|
93
136
|
createVNode(IconTime, {
|
|
94
|
-
class: "i-medium
|
|
137
|
+
class: "i-medium opacity-50",
|
|
95
138
|
fill: "rgb(var(--black)"
|
|
96
139
|
}),
|
|
97
|
-
createElementVNode("p",
|
|
98
|
-
createElementVNode("span",
|
|
99
|
-
|
|
140
|
+
createElementVNode("p", _hoisted_13, toDisplayString(__props.formatDate(__props.order.deadline)), 1),
|
|
141
|
+
createElementVNode("span", {
|
|
142
|
+
class: normalizeClass(["flex-child flex-shrink-0 w-max fw-medium radius-thin pd-thin", orderStatusClass(__props.order.status)])
|
|
143
|
+
}, toDisplayString(statusLabel(__props.order.status)), 3),
|
|
144
|
+
createElementVNode("span", {
|
|
145
|
+
class: normalizeClass(["flex-child flex-shrink-0 capitalize w-max fw-medium radius-thin pd-thin", paymentStatusClass(__props.order.payment.status)])
|
|
146
|
+
}, toDisplayString(__props.order.payment.status || "Unpaid"), 3)
|
|
100
147
|
]),
|
|
101
|
-
__props.order.comment ? (openBlock(), createElementBlock("div",
|
|
102
|
-
_cache[1] || (_cache[1] = createElementVNode("p", { class: "mn-b-thin
|
|
148
|
+
__props.order.comment ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
149
|
+
_cache[1] || (_cache[1] = createElementVNode("p", { class: "mn-b-thin opacity-50 uppercase p-small fw-medium" }, "Comment", -1)),
|
|
103
150
|
createElementVNode("p", null, toDisplayString(__props.order.comment), 1)
|
|
104
151
|
])) : createCommentVNode("", true)
|
|
105
152
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardOrderBackoffice.vue.js","sources":["../../../../../../../src/modules/orders/components/blocks/CardOrderBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"bg-light pos-relative pd-medium radius-medium\">\n <CardHeader \n :entity=\"order\"\n :entityType=\"'order'\"\n :user=\"user\"\n :owner=\"order.creator\" \n :creator=\"order.creator\"\n :date=\"order.createdAt\"\n class=\"mn-b-small\"\n />\n\n <div class=\"mn-b-small pd-small bg-white radius-small flex-nowrap flex\"> \n <div class=\"w-100\">\n <p class=\"truncate\">{{order.delivery.address || 'Not specified'}}</p> \n </div>\n\n <div class=\"w-100 t-right\">\n <h3 class=\"mn-b-thin\">{{currency}}{{getTotal(order.positions)}}</h3>\n <p>#{{order._id.slice(0, 4) + '...' + order._id.slice(-4)}}</p> \n </div>\n </div>\n \n <div class=\"cols-1 pos-relative mn-b-small gap-thin pd-small bg-white radius-small\">\n\t\t <!-- Всегда отображаем первые две позиции -->\n\t\t <template v-for=\"(position, index) in order.positions\">\n\t\t \t<transition name=\"moveFromTop\">\n\t\t\t <div \n\t\t\t v-if=\"index < 2 || (spoiler && index >= 2)\" \n\t\t\t :key=\"index\" \n\t\t\t class=\"w-100 flex\"\n\t\t\t >\n\t\t\t <
|
|
1
|
+
{"version":3,"file":"CardOrderBackoffice.vue.js","sources":["../../../../../../../src/modules/orders/components/blocks/CardOrderBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"bg-light pos-relative pd-medium radius-medium\">\n <CardHeader \n :entity=\"order\"\n :entityType=\"'order'\"\n :user=\"user\"\n :owner=\"order.creator\" \n :creator=\"order.creator\"\n :date=\"order.createdAt\"\n class=\"mn-b-small\"\n />\n\n <div class=\"mn-b-small pd-small bg-white radius-small flex-nowrap flex\"> \n <div class=\"w-100\">\n <p class=\"truncate\">{{order.delivery.address || 'Not specified'}}</p> \n </div>\n\n <div class=\"w-100 t-right\">\n <h3 class=\"mn-b-thin\">{{currency}}{{getTotal(order.positions)}}</h3>\n <p>#{{order._id.slice(0, 4) + '...' + order._id.slice(-4)}}</p> \n </div>\n </div>\n \n <div class=\"cols-1 pos-relative mn-b-small gap-thin pd-small bg-white radius-small\">\n\t\t <!-- Всегда отображаем первые две позиции -->\n\t\t <template v-for=\"(position, index) in order.positions\">\n\t\t \t<transition name=\"moveFromTop\">\n\t\t\t <div \n\t\t\t v-if=\"index < 2 || (spoiler && index >= 2)\" \n\t\t\t :key=\"index\" \n\t\t\t class=\"w-100 flex-v-center flex\"\n\t\t\t >\n\t\t\t <div class=\"mn-r-auto\">\n\t\t\t <p>{{ position.name }}</p>\n\t\t\t <p v-if=\"position.listing === 'rent' && position.date?.start && position.date?.end\" class=\"mn-t-thin p-small opacity-50\">\n\t\t\t {{ positionRentLabel(position) }}\n\t\t\t </p>\n\t\t\t </div>\n\t\t\t <p class=\"t-right flex-shrink-0\">\n\t\t\t {{ position.quantity }} {{ position.type }}\n\t\t\t x\n\t\t\t <span class=\"opacity-50\">{{ currency }} {{ position.price }}</span>\n\t\t\t </p>\n\t\t\t </div>\n\t </transition>\n\t\t </template>\n\t\t\n\t\t <!-- Кнопка переключения для дополнительных позиций, видна только если есть больше двух позиций -->\n\t\t <button\n\t\t v-if=\"order.positions.length > 2\"\n\t\t @click.prevent=\"spoiler = !spoiler\"\n\t\t class=\"cursor-pointer radius-big bg-light-transp-50 pd-nano w-100 flex-center flex\"\n\t\t >\n\t\t {{ !spoiler ? `+${order.positions.length - 2} more` : `Hide` }}\n\t\t </button>\n\t\t</div>\n\n <div class=\"pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex\"> \n <IconTime class=\"i-medium opacity-50\" fill=\"rgb(var(--black)\" />\n <p class=\"fw-medium mn-r-auto\">{{formatDate(order.deadline)}}</p>\n\n <span\n class=\"flex-child flex-shrink-0 w-max fw-medium radius-thin pd-thin\"\n :class=\"orderStatusClass(order.status)\"\n >\n {{statusLabel(order.status)}}\n </span>\n\n <span\n class=\"flex-child flex-shrink-0 capitalize w-max fw-medium radius-thin pd-thin\"\n :class=\"paymentStatusClass(order.payment.status)\"\n >\n {{order.payment.status || 'Unpaid'}}\n </span>\n </div>\n\n <div v-if=\"order.comment\" class=\"pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small\">\n <p class=\"mn-b-thin opacity-50 uppercase p-small fw-medium\">Comment</p>\n <p>{{order.comment}}</p>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\nimport CardHeader from '@martyrs/src/modules/core/views/components/blocks/CardHeader.vue';\nimport IconTime from '@martyrs/src/modules/icons/entities/IconTime.vue';\nimport { formatRentDateLabel } from '@martyrs/src/modules/orders/utils/rent-price.js';\n\nconst props = defineProps({\n order: {\n type: Object,\n required: true\n },\n user: {\n type: Object,\n required: true\n },\n statuses: {\n type: Array,\n default: () => []\n },\n formatDate: {\n type: Function,\n required: true\n },\n getTotal: {\n type: Function,\n required: true\n },\n currency: {\n type: String,\n default: ''\n }\n});\n\nconst spoiler = ref(false);\n\nfunction positionRentLabel(position) {\n return formatRentDateLabel(position.date?.start, position.date?.end, position.rentPeriod, props.formatDate);\n}\n\nfunction statusLabel(value) {\n const found = props.statuses.find(s => s.value === value)\n return found ? found.label : value\n}\n\nconst orderStatusColors = {\n 'pending': 'bg-yellow',\n 'created': 'bg-yellow',\n 'confirmed': 't-white bg-second',\n 'in_progress': 'bg-green',\n 'active': 'bg-green',\n 'finished': 'bg-grey',\n 'completed': 'bg-grey',\n 'canceled': 't-white bg-red',\n}\n\nfunction orderStatusClass(status) {\n return orderStatusColors[status] || 'bg-main'\n}\n\nfunction paymentStatusClass(status) {\n switch (status) {\n case 'paid': return 't-white bg-green'\n case 'pending': return 'bg-yellow'\n case 'refunded': return 't-white bg-second'\n default: return 't-white bg-red'\n }\n}\n\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,UAAM,QAAQ;AA2Bd,UAAM,UAAU,IAAI,KAAK;AAEzB,aAAS,kBAAkB,UAAU;AACnC,aAAO,oBAAoB,SAAS,MAAM,OAAO,SAAS,MAAM,KAAK,SAAS,YAAY,MAAM,UAAU;AAAA,IAC5G;AAEA,aAAS,YAAY,OAAO;AAC1B,YAAM,QAAQ,MAAM,SAAS,KAAK,OAAK,EAAE,UAAU,KAAK;AACxD,aAAO,QAAQ,MAAM,QAAQ;AAAA,IAC/B;AAEA,UAAM,oBAAoB;AAAA,MACxB,WAAW;AAAA,MACX,WAAW;AAAA,MACX,aAAa;AAAA,MACb,eAAe;AAAA,MACf,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,YAAY;AAAA,IACd;AAEA,aAAS,iBAAiB,QAAQ;AAChC,aAAO,kBAAkB,MAAM,KAAK;AAAA,IACtC;AAEA,aAAS,mBAAmB,QAAQ;AAClC,cAAQ,QAAM;AAAA,QACZ,KAAK;AAAQ,iBAAO;AAAA,QACpB,KAAK;AAAW,iBAAO;AAAA,QACvB,KAAK;AAAY,iBAAO;AAAA,QACxB;AAAS,iBAAO;AAAA,MACpB;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|