@ozdao/martyrs 0.2.604 → 0.2.605
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/_virtual/dayjs.min.js +1 -1
- package/dist/_virtual/weekOfYear.js +1 -1
- package/dist/{abac-Blt8bUTL.js → abac-kz5xI99l.js} +1 -0
- package/dist/auth.server.js +52 -12
- package/dist/builder.js +67 -2
- package/dist/chats.server.js +2 -2
- package/dist/community.server.js +3 -3
- package/dist/core.server.js +2 -2
- package/dist/{core.websocket-Cl76z2wT.js → core.websocket-B2FA8gGl.js} +0 -2
- package/dist/{crud-BT5FIvQC.js → crud-Cwn0frBP.js} +8 -2
- package/dist/events.server.js +4 -4
- package/dist/files.server.js +1 -1
- package/dist/gallery.server.js +2 -2
- package/dist/governance.server.js +10 -10
- package/dist/{index-kvBwwb0w.js → index-CPACC651.js} +1 -1
- package/dist/inventory.server.js +4 -4
- package/dist/{mailing-DT7nbNjZ.js → mailing-BBCidXGr.js} +38 -2
- package/dist/marketplace.server.js +2 -2
- package/dist/martyrs/dist/martyrs.es3.js +1 -1
- package/dist/martyrs/dist/martyrs.es3.js.map +1 -1
- package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js +1 -1
- package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js.map +1 -1
- package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js +1 -1
- package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js.map +1 -1
- package/dist/{node_modules/.pnpm/vue-draggable-next@2.2.1_sortablejs@1.15.6_vue@3.5.13_typescript@5.8.3_ → martyrs/node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.7_vue@3.5.13}/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +305 -268
- package/dist/martyrs/node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.7_vue@3.5.13/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js.map +1 -0
- package/dist/martyrs/src/components/Address/Address.vue2.js +13 -13
- package/dist/martyrs/src/components/Address/Address.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
- package/dist/martyrs/src/components/Button/Button.vue2.js +1 -1
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.js +150 -143
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Chart/Chart.vue.js +296 -0
- package/dist/martyrs/src/components/Chart/Chart.vue.js.map +1 -0
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.js +5 -6
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -1
- package/dist/martyrs/src/components/Countdown/Countdown.vue.js +5 -5
- package/dist/martyrs/src/components/Countdown/Countdown.vue.js.map +1 -1
- package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js +2 -2
- package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +6 -6
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
- package/dist/martyrs/src/components/EmptyState/EmptyState.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js +4 -4
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js +3 -3
- package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js.map +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +27 -21
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Map/Map.vue.js +20 -16
- package/dist/martyrs/src/components/Map/Map.vue.js.map +1 -1
- package/dist/martyrs/src/components/Popup/Popup.vue.js +3 -4
- package/dist/martyrs/src/components/Popup/Popup.vue.js.map +1 -1
- package/dist/martyrs/src/components/Radio/Radio.vue.js +12 -10
- package/dist/martyrs/src/components/Radio/Radio.vue.js.map +1 -1
- package/dist/martyrs/src/components/Select/Select.vue.js +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
- package/dist/martyrs/src/components/Status/Snack.vue.js +1 -1
- package/dist/martyrs/src/components/Status/Snack.vue.js.map +1 -1
- package/dist/martyrs/src/components/Status/Status.vue.js +1 -1
- package/dist/martyrs/src/components/Status/Status.vue.js.map +1 -1
- package/dist/martyrs/src/components/Table/Table.vue.js +21 -4
- package/dist/martyrs/src/components/Table/Table.vue.js.map +1 -1
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tree/Tree.vue.js +1 -1
- package/dist/martyrs/src/components/Upload/Upload.vue2.js +2 -2
- package/dist/martyrs/src/components/Upload/Upload.vue2.js.map +1 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +2 -2
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js.map +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/auth.client.js +14 -2
- package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js +4 -4
- package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/PopupAuth.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/SidebarUserCard.vue.js +96 -0
- package/dist/martyrs/src/modules/auth/views/components/blocks/SidebarUserCard.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/BackofficeUsers.vue.js +337 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/BackofficeUsers.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +32 -18
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +76 -40
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +6 -5
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +4 -4
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +3 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js +28 -16
- package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/FeaturedUsers.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/FeaturedUsers.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/middlewares/auth.validation.js +6 -2
- package/dist/martyrs/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.backoffice.router.js +53 -0
- package/dist/martyrs/src/modules/auth/views/router/users.backoffice.router.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.js +2 -2
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js +179 -253
- package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js +105 -44
- package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js +11 -5
- package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js +1 -1
- package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/community.client.js +4 -4
- package/dist/martyrs/src/modules/community/community.client.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +4 -4
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/ImageUpload.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/ImageUpload.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/core.client.js +18 -16
- package/dist/martyrs/src/modules/core/core.client.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/classes/core.app.js +25 -6
- package/dist/martyrs/src/modules/core/views/classes/core.app.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/classes/module.manager.js +4 -2
- package/dist/martyrs/src/modules/core/views/classes/module.manager.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/AlertDialog.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/AlertDialog.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSlider.vue.js +132 -0
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSlider.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +3 -3
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardStat.vue.js +6 -28
- package/dist/martyrs/src/modules/core/views/components/blocks/CardStat.vue.js.map +1 -1
- package/dist/martyrs/src/modules/{auth → core}/views/components/blocks/CardUser.vue.js +29 -11
- package/dist/martyrs/src/modules/{auth → core}/views/components/blocks/CardUser.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/HelpCard.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/blocks/HelpCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +41 -26
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +2 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue.js +5 -5
- package/dist/martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/CitySelection.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/CitySelection.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Footer.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/Footer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +4 -4
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/LocationSelection.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/LocationSelection.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js +3 -3
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js +6 -6
- package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/mixins/mixins.js +14 -1
- package/dist/martyrs/src/modules/core/views/mixins/mixins.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/plugins/date-picker.plugin.js +8 -5
- package/dist/martyrs/src/modules/core/views/plugins/date-picker.plugin.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/store/core.store.js +4 -0
- package/dist/martyrs/src/modules/core/views/store/core.store.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +3 -0
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +9 -9
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/events.client.js +4 -4
- package/dist/martyrs/src/modules/events/events.client.js.map +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/gallery/router/gallery.router.js +3 -3
- package/dist/martyrs/src/modules/gallery/router/gallery.router.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardInitiativeItem.vue.js +3 -3
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardInitiativeItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardSprintItem.vue.js +4 -4
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardSprintItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardTaskItem.vue.js +2 -2
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardTaskItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardVotingItem.vue.js +3 -3
- package/dist/martyrs/src/modules/governance/views/components/blocks/CardVotingItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/pages/Initiatives.vue.js +3 -3
- package/dist/martyrs/src/modules/governance/views/components/pages/Initiatives.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/partials/TaskStatusBadge.vue.js +1 -1
- package/dist/martyrs/src/modules/governance/views/components/partials/TaskStatusBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/sections/FormSprintDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/governance/views/components/sections/FormSprintDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/components/sections/FormTaskDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/governance/views/components/sections/FormTaskDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/governance/views/router/governance.router.js +3 -3
- package/dist/martyrs/src/modules/governance/views/router/governance.router.js.map +1 -1
- package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js +2 -2
- package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/entities/IconApplications.vue.js +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconApplications.vue.js.map +1 -0
- package/dist/martyrs/src/modules/icons/entities/IconCustomers.vue.js +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconCustomers.vue.js.map +1 -0
- package/dist/martyrs/src/modules/icons/entities/IconUsers.vue.js +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconUsers.vue.js.map +1 -0
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +290 -173
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/inventory.client.js +4 -4
- package/dist/martyrs/src/modules/inventory/inventory.client.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/router/inventory.router.js +15 -0
- package/dist/martyrs/src/modules/inventory/router/inventory.router.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js +4 -4
- package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js +3 -3
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +2 -2
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionHeroToken.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionHeroToken.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js +2 -2
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionRoadmap.vue.js +2 -2
- package/dist/martyrs/src/modules/landing/components/sections/SectionRoadmap.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +3 -3
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +6 -6
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +5 -5
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +8 -8
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +5 -5
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +11 -11
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +11 -11
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +4 -4
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +162 -68
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.js +181 -17
- package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/router/notifications.backoffice.router.js +21 -0
- package/dist/martyrs/src/modules/notifications/router/notifications.backoffice.router.js.map +1 -0
- package/dist/martyrs/src/modules/notifications/router/notifications.router.js +13 -42
- package/dist/martyrs/src/modules/notifications/router/notifications.router.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/store/notifications.store.js +66 -1
- package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js +9 -7
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js +11 -9
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrder.vue.js +9 -9
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrder.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +66 -19
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js +29 -27
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +7 -12
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js +4 -4
- package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +46 -25
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js +54 -38
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +454 -139
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +2 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +141 -68
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +38 -32
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +4 -4
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/AskToLogin.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/AskToLogin.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +167 -95
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.js +22 -20
- package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/orders.js +3 -5
- package/dist/martyrs/src/modules/orders/store/orders.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.js +5 -5
- package/dist/martyrs/src/modules/orders/store/shopcart.js.map +1 -1
- package/dist/martyrs/src/modules/orders/utils/rent-price.js +60 -0
- package/dist/martyrs/src/modules/orders/utils/rent-price.js.map +1 -0
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +45 -55
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/EmptyState.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/Rating.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +8 -8
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +216 -83
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +35 -25
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +3 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +20 -18
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/organizations.client.js +39 -33
- package/dist/martyrs/src/modules/organizations/organizations.client.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.backoffice.router.js +81 -0
- package/dist/martyrs/src/modules/organizations/router/organizations.backoffice.router.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/Pages.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/Pages.vue.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/router/pages.router.js +2 -2
- package/dist/martyrs/src/modules/pages/views/router/pages.router.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Price.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/elements/Price.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +9 -25
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +34 -17
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +96 -96
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +22 -9
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/router/categories.router.js +2 -2
- package/dist/martyrs/src/modules/products/router/categories.router.js.map +1 -1
- package/dist/martyrs/src/modules/products/router/products.router.js +17 -3
- package/dist/martyrs/src/modules/products/router/products.router.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js +11 -10
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js +197 -81
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +685 -80
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +68 -18
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/router/rents.router.js +3 -3
- package/dist/martyrs/src/modules/rents/views/router/rents.router.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/store/rents.store.js +1 -1
- package/dist/martyrs/src/modules/rents/views/store/rents.store.js.map +1 -1
- package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js +3 -3
- package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js.map +1 -1
- package/dist/martyrs/src/modules/reports/router/reports.router.js +1 -1
- package/dist/martyrs/src/modules/reports/router/reports.router.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +5 -5
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +3 -3
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +9 -7
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +29 -37
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +8 -8
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/router/spots.router.js +3 -3
- package/dist/martyrs/src/modules/spots/router/spots.router.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/router/wallet.router.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/router/wallet.router.js.map +1 -1
- package/dist/martyrs.es10.js +59 -57
- package/dist/martyrs.es106.js +2 -2
- package/dist/martyrs.es11.js +31 -30
- package/dist/martyrs.es113.js +22 -166
- package/dist/martyrs.es114.js +4 -457
- package/dist/martyrs.es115.js +8 -40
- package/dist/martyrs.es116.js +166 -9
- package/dist/martyrs.es117.js +451 -43
- package/dist/martyrs.es118.js +38 -10
- package/dist/martyrs.es119.js +9 -44
- package/dist/martyrs.es12.js +8 -9
- package/dist/martyrs.es120.js +49 -4
- package/dist/martyrs.es121.js +10 -127
- package/dist/martyrs.es122.js +42 -98
- package/dist/martyrs.es123.js +4 -86
- package/dist/martyrs.es124.js +120 -29
- package/dist/martyrs.es125.js +99 -10
- package/dist/martyrs.es126.js +71 -24
- package/dist/martyrs.es127.js +37 -8
- package/dist/martyrs.es128.js +11 -22
- package/dist/martyrs.es129.js +39 -4
- package/dist/martyrs.es13.js +22 -19
- package/dist/martyrs.es130.js +9 -8
- package/dist/martyrs.es131.js +7 -7
- package/dist/martyrs.es132.js +2 -2
- package/dist/martyrs.es133.js +1 -1
- package/dist/martyrs.es135.js +1 -1
- package/dist/martyrs.es137.js +1 -1
- package/dist/martyrs.es138.js +7 -8
- package/dist/martyrs.es139.js +8 -7
- package/dist/martyrs.es14.js +2 -2
- package/dist/martyrs.es140.js +2 -2
- package/dist/martyrs.es144.js +10 -29
- package/dist/martyrs.es145.js +29 -10
- package/dist/martyrs.es146.js +2 -2
- package/dist/martyrs.es147.js +2 -2
- package/dist/martyrs.es149.js +1 -1
- package/dist/martyrs.es2.js +31 -30
- package/dist/martyrs.es22.js +16 -16
- package/dist/martyrs.es23.js +8 -8
- package/dist/martyrs.es24.js +9 -9
- package/dist/martyrs.es26.js +9 -11
- package/dist/martyrs.es27.js +9 -9
- package/dist/martyrs.es28.js +1 -1
- package/dist/martyrs.es29.js +5 -5
- package/dist/martyrs.es3.js +1 -1
- package/dist/martyrs.es38.js +1 -1
- package/dist/martyrs.es4.js +12 -12
- package/dist/martyrs.es41.js +34 -224
- package/dist/martyrs.es5.js +251 -238
- package/dist/martyrs.es61.js +33 -26
- package/dist/martyrs.es74.js +7 -7
- package/dist/martyrs.es76.js +12 -12
- package/dist/martyrs.es8.js +31 -31
- package/dist/music.server.js +3 -3
- package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@2.0.2/node_modules/@googlemaps/js-api-loader/dist/index.js +90 -0
- package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@2.0.2/node_modules/@googlemaps/js-api-loader/dist/index.js.map +1 -0
- package/dist/notifications.server.js +255 -23
- package/dist/orders.server.js +674 -136
- package/dist/organizations.server.js +11 -6
- package/dist/products.server.js +68 -7
- package/dist/{queryProcessor-C_5Iipam.js → queryProcessor-B2FCngFP.js} +3 -2
- package/dist/rents.server.js +183 -7
- package/dist/{socials.schema-DxnnaBgO.js → socials.schema-C3RjkqJv.js} +4 -0
- package/dist/spots.server.js +1 -1
- package/dist/style.css +292 -204
- package/dist/{tickets.controller-DdF85W-i.js → tickets.controller-Dpzf4kQx.js} +1 -1
- package/dist/wallet.server.js +2 -2
- package/package.json +5 -3
- package/src/builder/modes/ssr.rspack.dev.js +2 -0
- package/src/builder/rspack/rspack.config.ssr.client.js +58 -1
- package/src/builder/ssr/asset-resolver.js +1 -1
- package/src/builder/templates/page.js +2 -0
- package/src/components/Address/Address.vue +16 -16
- package/src/components/Button/Button.vue +0 -1
- package/src/components/ButtonSegmented/ButtonSegmented.vue +1 -1
- package/src/components/Calendar/Calendar.vue +141 -118
- package/src/components/Chart/Chart.vue +216 -0
- package/src/components/Checkbox/Checkbox.vue +1 -1
- package/src/components/Chips/Chips.vue +4 -5
- package/src/components/Countdown/Countdown.vue +5 -5
- package/src/components/DatePicker/DatePicker.vue +2 -2
- package/src/components/EditImages/EditImages.vue +3 -3
- package/src/components/EmptyState/EmptyState.vue +1 -1
- package/src/components/Feed/Feed.vue +5 -0
- package/src/components/Field/Field.vue +3 -3
- package/src/components/FieldDate/FieldDate.vue +2 -2
- package/src/components/LocationMarker/LocationMarker.vue +28 -21
- package/src/components/Map/Map.vue +20 -15
- package/src/components/Popup/Popup.vue +3 -3
- package/src/components/Radio/Radio.vue +2 -2
- package/src/components/Select/Select.vue +1 -1
- package/src/components/Status/Snack.vue +1 -1
- package/src/components/Status/Status.vue +1 -1
- package/src/components/Table/Table.vue +16 -1
- package/src/components/Upload/Upload.vue +1 -1
- package/src/components/UploadImage/UploadImage.vue +1 -1
- package/src/components/UploadImageMultiple/UploadImageMultiple.vue +1 -1
- package/src/jit/rules.js +4 -0
- package/src/modules/TASKS.MD +16 -3
- package/src/modules/auth/auth.client.js +18 -3
- package/src/modules/auth/controllers/routes/users.routes.js +18 -0
- package/src/modules/auth/controllers/services/auth.service.js +3 -3
- package/src/modules/auth/controllers/services/users.service.js +34 -5
- package/src/modules/auth/views/components/blocks/OtpDialog.vue +4 -4
- package/src/modules/auth/views/components/blocks/PopupAuth.vue +1 -1
- package/src/modules/auth/views/components/blocks/SidebarUserCard.vue +95 -0
- package/src/modules/auth/views/components/pages/BackofficeUsers.vue +337 -0
- package/src/modules/auth/views/components/pages/Invite.vue +1 -1
- package/src/modules/auth/views/components/pages/Profile.vue +1 -1
- package/src/modules/auth/views/components/pages/ProfileEdit.vue +23 -14
- package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +45 -26
- package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +8 -7
- package/src/modules/auth/views/components/pages/ResetPassword.vue +4 -4
- package/src/modules/auth/views/components/pages/SignUp.vue +3 -3
- package/src/modules/auth/views/components/pages/UserDashboard.vue +8 -5
- package/src/modules/auth/views/components/sections/FeaturedUsers.vue +1 -1
- package/src/modules/auth/views/components/sections/SliderFeatures.vue +1 -1
- package/src/modules/auth/views/middlewares/auth.validation.js +7 -2
- package/src/modules/auth/views/router/users.backoffice.router.js +39 -0
- package/src/modules/auth/views/store/auth.js +2 -2
- package/src/modules/backoffice/components/admin/Backcalls.vue +2 -2
- package/src/modules/backoffice/components/admin/Dashboard.sublime-workspace +1 -1
- package/src/modules/backoffice/components/admin/FastOrders.vue +3 -3
- package/src/modules/backoffice/components/admin/UserEdit.vue +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +102 -139
- package/src/modules/backoffice/configs/navigation.backoffice.config.js +91 -29
- package/src/modules/backoffice/router/backoffice.router.js +7 -1
- package/src/modules/chats/components/blocks/ChatMessage.vue +1 -1
- package/src/modules/chats/components/sections/ChatWindow.vue +1 -1
- package/src/modules/community/community.client.js +4 -4
- package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
- package/src/modules/community/components/layouts/Community.vue +4 -4
- package/src/modules/community/components/sections/Comment.vue +1 -1
- package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
- package/src/modules/core/TASK.MD +2 -2
- package/src/modules/core/controllers/classes/abac/abac.core.js +1 -0
- package/src/modules/core/controllers/classes/core.websocket.js +0 -2
- package/src/modules/core/controllers/classes/crud/crud.core.js +6 -0
- package/src/modules/core/controllers/classes/crud/crud.service.js +6 -0
- package/src/modules/core/controllers/utils/mailing.js +35 -26
- package/src/modules/core/controllers/utils/queryProcessor.js +4 -2
- package/src/modules/core/core.client.js +1 -0
- package/src/modules/core/models/schemas/embedding.schema.js +8 -0
- package/src/modules/core/models/schemas/socials.schema.js +4 -0
- package/src/modules/core/sw.js +448 -0
- package/src/modules/core/views/classes/core.app.js +37 -13
- package/src/modules/core/views/classes/module.manager.js +3 -1
- package/src/modules/core/views/components/blocks/AlertDialog.vue +1 -1
- package/src/modules/core/views/components/blocks/BlockSearch.vue +1 -1
- package/src/modules/core/views/components/blocks/BlockSlider.vue +96 -0
- package/src/modules/core/views/components/blocks/CardHeader.vue +2 -2
- package/src/modules/core/views/components/blocks/CardStat.vue +4 -18
- package/src/modules/{auth → core}/views/components/blocks/CardUser.vue +45 -20
- package/src/modules/core/views/components/blocks/HelpCard.vue +1 -1
- package/src/modules/core/views/components/blocks/PopupAuth.vue +1 -1
- package/src/modules/core/views/components/blocks/PopupDateSelector.vue +41 -24
- package/src/modules/core/views/components/layouts/Client.vue +1 -1
- package/src/modules/core/views/components/pages/404.vue +5 -5
- package/src/modules/core/views/components/partials/BottomNavigationBar.vue +5 -5
- package/src/modules/core/views/components/partials/CitySelection.vue +2 -2
- package/src/modules/core/views/components/partials/Footer.centered.vue +2 -2
- package/src/modules/core/views/components/partials/Footer.vue +2 -2
- package/src/modules/core/views/components/partials/Header.vue +3 -3
- package/src/modules/core/views/components/partials/LocationSelection.vue +1 -1
- package/src/modules/core/views/components/partials/Navigation.vue +1 -1
- package/src/modules/core/views/components/sections/Filters.vue +2 -2
- package/src/modules/core/views/components/sections/SectionPageTitle.vue +2 -2
- package/src/modules/core/views/components/sections/Walkthrough.vue +6 -6
- package/src/modules/core/views/mixins/mixins.js +17 -0
- package/src/modules/core/views/plugins/date-picker.plugin.js +8 -5
- package/src/modules/core/views/store/core.store.js +5 -0
- package/src/modules/core/views/utils/vue-app-renderer.js +5 -0
- package/src/modules/events/components/pages/EditEventTickets.vue +9 -9
- package/src/modules/events/components/pages/Event.vue +2 -2
- package/src/modules/events/components/sections/EditTickets.vue +1 -1
- package/src/modules/events/components/sections/SelectDate.vue +1 -1
- package/src/modules/events/events.client.js +4 -4
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
- package/src/modules/gallery/router/gallery.router.js +3 -3
- package/src/modules/governance/middlewares/sprints.verifier.js +3 -3
- package/src/modules/governance/middlewares/tasks.verifier.js +3 -3
- package/src/modules/governance/models/sprint.model.js +1 -1
- package/src/modules/governance/models/task.model.js +1 -1
- package/src/modules/governance/reactcode/src/components/TaskStatusBadge.tsx +1 -1
- package/src/modules/governance/views/components/blocks/CardInitiativeItem.vue +3 -3
- package/src/modules/governance/views/components/blocks/CardSprintItem.vue +4 -4
- package/src/modules/governance/views/components/blocks/CardTaskItem.vue +2 -2
- package/src/modules/governance/views/components/blocks/CardVotingItem.vue +3 -3
- package/src/modules/governance/views/components/pages/Initiatives.vue +3 -3
- package/src/modules/governance/views/components/partials/TaskStatusBadge.vue +1 -1
- package/src/modules/governance/views/components/sections/FormSprintDetails.vue +1 -1
- package/src/modules/governance/views/components/sections/FormTaskDetails.vue +1 -1
- package/src/modules/governance/views/router/governance.router.js +3 -3
- package/src/modules/icons/components/IconSearchPopup.vue +1 -1
- package/src/modules/icons/entities/IconApplications.vue +14 -0
- package/src/modules/icons/entities/IconCustomers.vue +14 -0
- package/src/modules/icons/entities/IconUsers.vue +14 -0
- package/src/modules/inventory/components/forms/AdjustmentForm.vue +2 -2
- package/src/modules/inventory/components/forms/ColumnSettingsMenu.vue +2 -2
- package/src/modules/inventory/components/forms/HistoryView.vue +1 -1
- package/src/modules/inventory/components/forms/StockAlertsForm.vue +3 -3
- package/src/modules/inventory/components/pages/Inventory.vue +278 -159
- package/src/modules/inventory/components/pages/InventoryEdit.vue +2 -2
- package/src/modules/inventory/inventory.client.js +4 -4
- package/src/modules/inventory/models/stock.audit.model.js +1 -1
- package/src/modules/inventory/router/inventory.router.js +12 -0
- package/src/modules/landing/components/sections/SectionEarn.vue +3 -3
- package/src/modules/landing/components/sections/SectionFeature.vue +1 -1
- package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +2 -2
- package/src/modules/landing/components/sections/SectionGuide.vue +2 -2
- package/src/modules/landing/components/sections/SectionHeroToken.vue +1 -1
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +1 -1
- package/src/modules/landing/components/sections/SectionMobileApp.vue +2 -2
- package/src/modules/landing/components/sections/SectionOverview.vue +1 -1
- package/src/modules/landing/components/sections/SectionRoadmap.vue +1 -1
- package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
- package/src/modules/marketplace/views/components/sections/SectionMenu.vue +2 -2
- package/src/modules/music/components/SidebarMusic.vue +1 -1
- package/src/modules/music/components/cards/AlbumCard.vue +1 -1
- package/src/modules/music/components/cards/ArtistCard.vue +1 -1
- package/src/modules/music/components/cards/ArtistCardSmall.vue +1 -1
- package/src/modules/music/components/cards/PlaylistCard.vue +1 -1
- package/src/modules/music/components/cards/TrackListCard.vue +6 -6
- package/src/modules/music/components/forms/AlbumForm.vue +2 -2
- package/src/modules/music/components/forms/ArtistForm.vue +1 -1
- package/src/modules/music/components/forms/PlaylistForm.vue +5 -5
- package/src/modules/music/components/forms/TrackForm.vue +3 -3
- package/src/modules/music/components/pages/Album.vue +8 -8
- package/src/modules/music/components/pages/Artist.vue +5 -5
- package/src/modules/music/components/pages/Playlist.vue +11 -11
- package/src/modules/music/components/pages/SearchResults.vue +2 -2
- package/src/modules/music/components/pages/Track.vue +11 -11
- package/src/modules/music/components/player/FullscreenPlayer.vue +3 -3
- package/src/modules/music/components/player/TrackProgress.vue +1 -1
- package/src/modules/notifications/components/sections/NotificationPreferences.vue +182 -52
- package/src/modules/notifications/controllers/notifications.controller.js +242 -17
- package/src/modules/notifications/models/notification-preference.model.js +4 -0
- package/src/modules/notifications/notifications.client.js +213 -20
- package/src/modules/notifications/router/notifications.backoffice.router.js +16 -0
- package/src/modules/notifications/router/notifications.router.js +13 -45
- package/src/modules/notifications/routes/notifications.routes.js +9 -0
- package/src/modules/notifications/services/notification.service.js +33 -9
- package/src/modules/notifications/services/telegram.service.js +2 -2
- package/src/modules/notifications/services/web-push.service.js +6 -2
- package/src/modules/notifications/store/notifications.store.js +69 -0
- package/src/modules/orders/components/blocks/CardApplication.vue +9 -6
- package/src/modules/orders/components/blocks/CardCustomer.vue +10 -7
- package/src/modules/orders/components/blocks/CardOrder.vue +8 -8
- package/src/modules/orders/components/blocks/CardOrderBackoffice.vue +58 -12
- package/src/modules/orders/components/blocks/CardOrderItem.vue +31 -28
- package/src/modules/orders/components/blocks/CardOrderUser.vue +7 -12
- package/src/modules/orders/components/blocks/CardOrderVar1.vue +3 -3
- package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +1 -1
- package/src/modules/orders/components/elements/PriceTotal.vue +4 -4
- package/src/modules/orders/components/forms/FormApplicationDetails.vue +1 -1
- package/src/modules/orders/components/forms/FormSelectCustomer.vue +48 -25
- package/src/modules/orders/components/pages/Applications.vue +2 -2
- package/src/modules/orders/components/pages/Customers.vue +35 -23
- package/src/modules/orders/components/pages/OrderBackoffice.vue +780 -393
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +112 -42
- package/src/modules/orders/components/pages/Orders.vue +20 -19
- package/src/modules/orders/components/pages/Orders_refact.vue +3 -3
- package/src/modules/orders/components/partials/ShopCart.vue +1 -1
- package/src/modules/orders/components/sections/ApplicationDetails.vue +2 -2
- package/src/modules/orders/components/sections/AskToLogin.vue +1 -1
- package/src/modules/orders/components/sections/CustomerDetails.vue +130 -64
- package/src/modules/orders/controllers/orders.controller.js +463 -134
- package/src/modules/orders/middlewares/applications.verifier.js +3 -3
- package/src/modules/orders/middlewares/customers.verifier.js +4 -0
- package/src/modules/orders/middlewares/orders.verifier.js +187 -0
- package/src/modules/orders/models/customer.model.js +2 -0
- package/src/modules/orders/models/order.model.js +20 -2
- package/src/modules/orders/orders.client.js +21 -19
- package/src/modules/orders/routes/applications.routes.js +13 -3
- package/src/modules/orders/routes/customers.routes.js +2 -0
- package/src/modules/orders/routes/orders.routes.js +46 -4
- package/src/modules/orders/store/orders.js +4 -7
- package/src/modules/orders/store/shopcart.js +6 -7
- package/src/modules/orders/utils/rent-price.js +90 -0
- package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +30 -33
- package/src/modules/organizations/components/blocks/EmptyState.vue +1 -1
- package/src/modules/organizations/components/blocks/Rating.vue +1 -1
- package/src/modules/organizations/components/blocks/Socials.vue +2 -2
- package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +1 -1
- package/src/modules/organizations/components/forms/AddExistingMembersForm.vue +3 -3
- package/src/modules/organizations/components/forms/DepartmentForm.vue +1 -1
- package/src/modules/organizations/components/forms/InviteForm.vue +1 -1
- package/src/modules/organizations/components/pages/Department.vue +2 -2
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
- package/src/modules/organizations/components/pages/Members.vue +8 -8
- package/src/modules/organizations/components/pages/Organization.vue +232 -124
- package/src/modules/organizations/components/pages/OrganizationCreate.vue +3 -3
- package/src/modules/organizations/components/pages/OrganizationDocuments.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +15 -6
- package/src/modules/organizations/components/pages/Organizations.vue +3 -2
- package/src/modules/organizations/components/sections/Documents.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
- package/src/modules/organizations/configs/navigation.organization.config.js +34 -26
- package/src/modules/organizations/controllers/organizations.controller.js +8 -3
- package/src/modules/organizations/models/organization.model.js +1 -0
- package/src/modules/organizations/organizations.client.js +39 -33
- package/src/modules/organizations/router/organizations.backoffice.router.js +67 -0
- package/src/modules/pages/views/components/pages/Pages.vue +1 -1
- package/src/modules/pages/views/router/pages.router.js +2 -2
- package/src/modules/products/components/blocks/CardPosition.vue +2 -2
- package/src/modules/products/components/blocks/CardProduct.vue +2 -2
- package/src/modules/products/components/blocks/ProductDiscounts.vue +1 -1
- package/src/modules/products/components/blocks/ProductImages.vue +1 -1
- package/src/modules/products/components/blocks/ProductVariants.vue +3 -3
- package/src/modules/products/components/elements/Price.vue +2 -2
- package/src/modules/products/components/forms/ColumnSettingsMenu.vue +2 -2
- package/src/modules/products/components/forms/ReorderSettingsForm.vue +3 -3
- package/src/modules/products/components/forms/StockAuditForm.vue +2 -2
- package/src/modules/products/components/forms/StockHistoryView.vue +1 -1
- package/src/modules/products/components/pages/Categories.vue +9 -20
- package/src/modules/products/components/pages/ProductEdit.vue +19 -3
- package/src/modules/products/components/pages/Products.vue +20 -19
- package/src/modules/products/components/sections/EditAttributes.vue +1 -1
- package/src/modules/products/components/sections/EditCategories.vue +1 -1
- package/src/modules/products/components/sections/EditDiscounts.vue +2 -2
- package/src/modules/products/components/sections/EditVariants.vue +14 -2
- package/src/modules/products/components/sections/FilterProducts.vue +1 -1
- package/src/modules/products/components/sections/ProductConfigurator.vue +1 -1
- package/src/modules/products/components/sections/SectionProduct.vue +3 -3
- package/src/modules/products/controllers/products.controller.js +50 -5
- package/src/modules/products/experiments/product-recommendation/components/HeroRecommendation.vue +2 -2
- package/src/modules/products/models/product.model.js +7 -0
- package/src/modules/products/models/variant.model.js +4 -0
- package/src/modules/products/router/categories.router.js +2 -2
- package/src/modules/products/router/products.router.js +14 -3
- package/src/modules/rents/controllers/routes/rents.routes.js +11 -0
- package/src/modules/rents/controllers/services/rents.services.js +193 -2
- package/src/modules/rents/models/rent.model.js +9 -0
- package/src/modules/rents/views/components/pages/Gant/GanttBar.vue +28 -11
- package/src/modules/rents/views/components/pages/Gant/GanttChart.vue +200 -40
- package/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue +2 -2
- package/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue +2 -2
- package/src/modules/rents/views/components/pages/Rents.vue +641 -142
- package/src/modules/rents/views/components/pages/RentsEdit.vue +44 -4
- package/src/modules/rents/views/router/rents.router.js +3 -3
- package/src/modules/rents/views/store/rents.store.js +1 -1
- package/src/modules/reports/components/pages/BackofficeReports.vue +3 -3
- package/src/modules/reports/router/reports.router.js +1 -1
- package/src/modules/spots/components/blocks/CardSpot.vue +6 -6
- package/src/modules/spots/components/pages/Spot.vue +2 -2
- package/src/modules/spots/components/pages/SpotEdit.vue +8 -6
- package/src/modules/spots/components/pages/Spots.vue +18 -24
- package/src/modules/spots/components/sections/WorktimeEdit.vue +7 -7
- package/src/modules/spots/router/spots.router.js +3 -3
- package/src/modules/wallet/views/components/blocks/CashDeposit.vue +1 -1
- package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +3 -3
- package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
- package/src/modules/wallet/views/components/pages/Wallet.vue +4 -4
- package/src/modules/wallet/views/router/wallet.router.js +1 -1
- package/src/styles/layout.scss +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +0 -1
- package/dist/martyrs/src/modules/icons/entities/IconCash.vue.js +0 -70
- package/dist/martyrs/src/modules/icons/entities/IconCash.vue.js.map +0 -1
- package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js +0 -336
- package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/vue-draggable-next@2.2.1_sortablejs@1.15.6_vue@3.5.13_typescript@5.8.3_/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js.map +0 -1
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import { getCurrentInstance, computed,
|
|
1
|
+
import { getCurrentInstance, ref, computed, watch, onMounted, createElementBlock, openBlock, createVNode, createBlock, createCommentVNode, unref, withCtx, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
/* empty css */
|
|
4
|
-
|
|
5
|
-
import _sfc_main$
|
|
6
|
-
import _sfc_main$
|
|
7
|
-
import _sfc_main$
|
|
4
|
+
/* empty css */
|
|
5
|
+
import _sfc_main$5 from "../../../../components/Tab/Tab.vue2.js";
|
|
6
|
+
import _sfc_main$1 from "../../../core/views/components/sections/SectionPageTitle.vue.js";
|
|
7
|
+
import _sfc_main$6 from "../../../../components/Popup/Popup.vue.js";
|
|
8
|
+
import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
|
|
8
9
|
import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
|
|
9
|
-
import _sfc_main$
|
|
10
|
+
import _sfc_main$7 from "../blocks/CardOrderItem.vue.js";
|
|
10
11
|
import { useGlobalMixins } from "../../../core/views/mixins/mixins.js";
|
|
11
|
-
import _sfc_main$
|
|
12
|
-
import _sfc_main$
|
|
13
|
-
import _sfc_main$
|
|
12
|
+
import _sfc_main$3 from "../../../core/views/components/blocks/Card.vue.js";
|
|
13
|
+
import _sfc_main$8 from "../forms/FormSelectCustomer.vue.js";
|
|
14
|
+
import _sfc_main$9 from "../sections/FormDelivery.vue.js";
|
|
15
|
+
import _sfc_main$a from "../sections/FormPayment.vue.js";
|
|
14
16
|
import { useStore } from "../../../core/views/store/core.store.js";
|
|
15
17
|
import { state as state$1 } from "../../../auth/views/store/auth.js";
|
|
16
18
|
import { mutations, state, actions as actions$2 } from "../../store/orders.js";
|
|
17
19
|
import { actions } from "../../../organizations/store/organizations.js";
|
|
18
20
|
import { actions as actions$1 } from "../../../products/store/products.js";
|
|
19
21
|
import variantsStore from "../../../products/store/variants.store.js";
|
|
22
|
+
import { calcRentTotalPrice } from "../../utils/rent-price.js";
|
|
20
23
|
/* empty css */
|
|
21
24
|
const _hoisted_1 = { class: "flex flex-column pd-thin" };
|
|
22
|
-
const _hoisted_2 = {
|
|
25
|
+
const _hoisted_2 = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "o-x-hidden o-y-scroll"
|
|
28
|
+
};
|
|
23
29
|
const _hoisted_3 = { class: "bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big" };
|
|
24
30
|
const _hoisted_4 = { class: "gap-thin flex flex-column" };
|
|
25
31
|
const _hoisted_5 = ["onClick"];
|
|
@@ -31,7 +37,7 @@ const _hoisted_7 = ["src"];
|
|
|
31
37
|
const _hoisted_8 = { class: "fw-medium" };
|
|
32
38
|
const _hoisted_9 = {
|
|
33
39
|
key: 0,
|
|
34
|
-
class: "t-small
|
|
40
|
+
class: "t-small opacity-50"
|
|
35
41
|
};
|
|
36
42
|
const _hoisted_10 = { class: "mn-l-auto" };
|
|
37
43
|
const _hoisted_11 = {
|
|
@@ -46,15 +52,20 @@ const _sfc_main = {
|
|
|
46
52
|
const route = useRoute();
|
|
47
53
|
const router = useRouter();
|
|
48
54
|
const { proxy } = getCurrentInstance();
|
|
49
|
-
const { formatPrice, returnCurrency } = useGlobalMixins();
|
|
55
|
+
const { formatPrice, returnCurrency, isPhone, isTablet } = useGlobalMixins();
|
|
50
56
|
mutations.resetOrder(state.current);
|
|
57
|
+
const selectedOrganization = ref(null);
|
|
58
|
+
const orgId = computed(() => selectedOrganization.value?._id || route.params._id);
|
|
51
59
|
let cartTotalPrice = computed(() => {
|
|
52
60
|
return Number(state.current.positions.reduce((total, product) => {
|
|
53
61
|
if (product.listing === "rent" && product.date?.start && product.date?.end) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
return total + calcRentTotalPrice(
|
|
63
|
+
product.price,
|
|
64
|
+
product.quantity,
|
|
65
|
+
product.date.start,
|
|
66
|
+
product.date.end,
|
|
67
|
+
product.rentPeriod || "day"
|
|
68
|
+
);
|
|
58
69
|
} else {
|
|
59
70
|
return total + product.price * product.quantity;
|
|
60
71
|
}
|
|
@@ -93,11 +104,14 @@ const _sfc_main = {
|
|
|
93
104
|
try {
|
|
94
105
|
let selectedDates = null;
|
|
95
106
|
if (selectedProduct.value.listing === "rent") {
|
|
107
|
+
const rentPeriod = selectedProduct.value.rentPeriod || "day";
|
|
108
|
+
const enableTime = ["hour", "4hours", "flat"].includes(rentPeriod);
|
|
96
109
|
selectedDates = await proxy.$dateSelector(
|
|
97
110
|
selectedProduct.value._id,
|
|
98
111
|
variant._id,
|
|
99
112
|
1,
|
|
100
|
-
variant.price || selectedProduct.value.price
|
|
113
|
+
variant.price || selectedProduct.value.price,
|
|
114
|
+
{ enableTime, periodType: rentPeriod }
|
|
101
115
|
);
|
|
102
116
|
if (!selectedDates) {
|
|
103
117
|
return;
|
|
@@ -113,7 +127,8 @@ const _sfc_main = {
|
|
|
113
127
|
unit: variant.unit || selectedProduct.value.unit,
|
|
114
128
|
date: selectedDates,
|
|
115
129
|
variant: variant._id,
|
|
116
|
-
|
|
130
|
+
rentPeriod: selectedProduct.value.rentPeriod || "day",
|
|
131
|
+
org_id: orgId.value
|
|
117
132
|
};
|
|
118
133
|
store.core.actions.add(state.current.positions, position);
|
|
119
134
|
closeVariantsPopup();
|
|
@@ -164,12 +179,9 @@ const _sfc_main = {
|
|
|
164
179
|
};
|
|
165
180
|
state.current.owner = {
|
|
166
181
|
type: "Organization",
|
|
167
|
-
target:
|
|
168
|
-
};
|
|
169
|
-
state.current.customer = {
|
|
170
|
-
type: "Customer",
|
|
171
|
-
target: state.current.customer._id || null
|
|
182
|
+
target: orgId.value
|
|
172
183
|
};
|
|
184
|
+
state.current.customer = state.current.customer._id ? { type: "Customer", target: state.current.customer._id } : { type: "Customer", target: null, phone: state.current.customer.phone, email: state.current.customer.email, profile: { name: state.current.customer.profile?.name } };
|
|
173
185
|
order.value = await actions$2.create(state.current);
|
|
174
186
|
}
|
|
175
187
|
function redirectTo() {
|
|
@@ -177,55 +189,110 @@ const _sfc_main = {
|
|
|
177
189
|
name: route.meta.context === "backoffice" ? "BackofficeOrderEdit" : "OrganizationOrderEdit",
|
|
178
190
|
params: {
|
|
179
191
|
order: order.value._id,
|
|
180
|
-
_id:
|
|
192
|
+
_id: orgId.value
|
|
181
193
|
}
|
|
182
194
|
});
|
|
183
195
|
}
|
|
184
196
|
const orderOrganization = ref({});
|
|
197
|
+
watch(selectedOrganization, async (org) => {
|
|
198
|
+
if (org) {
|
|
199
|
+
orderOrganization.value = await actions.read({
|
|
200
|
+
_id: org._id,
|
|
201
|
+
lookup: ["spots"]
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
});
|
|
185
205
|
onMounted(async () => {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
206
|
+
if (route.params._id) {
|
|
207
|
+
orderOrganization.value = await actions.read({
|
|
208
|
+
_id: route.params._id,
|
|
209
|
+
lookup: ["spots"]
|
|
210
|
+
});
|
|
211
|
+
selectedOrganization.value = orderOrganization.value[0];
|
|
212
|
+
} else {
|
|
213
|
+
const orgs = await actions.read({ user: state$1.user._id });
|
|
214
|
+
if (orgs?.length) {
|
|
215
|
+
selectedOrganization.value = orgs[0];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
190
218
|
});
|
|
191
219
|
return (_ctx, _cache) => {
|
|
192
220
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
193
|
-
createVNode(_sfc_main$1, {
|
|
221
|
+
createVNode(_sfc_main$1, {
|
|
222
|
+
title: "Add Order",
|
|
223
|
+
actions: [
|
|
224
|
+
{ method: async () => {
|
|
225
|
+
await onSubmit();
|
|
226
|
+
redirectTo();
|
|
227
|
+
}, label: "Save Order" }
|
|
228
|
+
],
|
|
229
|
+
class: "mn-b-thin"
|
|
230
|
+
}, null, 8, ["actions"]),
|
|
231
|
+
!unref(route).params._id ? (openBlock(), createBlock(_sfc_main$2, {
|
|
232
|
+
key: 0,
|
|
233
|
+
title: "Organization",
|
|
234
|
+
class: "mn-b-small"
|
|
235
|
+
}, {
|
|
194
236
|
default: withCtx(() => [
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
237
|
+
selectedOrganization.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
238
|
+
key: 0,
|
|
239
|
+
photo: selectedOrganization.value.profile?.photo,
|
|
240
|
+
title: selectedOrganization.value.profile?.name,
|
|
241
|
+
classImage: "h-3r w-3r radius-small o-hidden flex-shrink-0",
|
|
242
|
+
onClick: _cache[0] || (_cache[0] = () => {
|
|
243
|
+
selectedOrganization.value = null;
|
|
244
|
+
}),
|
|
245
|
+
class: "h-4r w-100 bg-white pd-thin radius-medium mn-b-thin flex-v-center flex-nowrap flex gap-thin cursor-pointer"
|
|
246
|
+
}, null, 8, ["photo", "title"])) : (openBlock(), createElementBlock("section", _hoisted_2, [
|
|
247
|
+
createVNode(_sfc_main$4, {
|
|
248
|
+
showLoadMore: false,
|
|
249
|
+
search: { placeholder: "Search organization...", class: "bg-white mn-b-thin" },
|
|
250
|
+
states: { empty: { title: "No organizations", description: "No organizations found." } },
|
|
251
|
+
store: { read: (options) => actions.read(options), state: null },
|
|
252
|
+
options: { user: state$1.user._id }
|
|
201
253
|
}, {
|
|
202
|
-
default: withCtx(() =>
|
|
203
|
-
|
|
204
|
-
|
|
254
|
+
default: withCtx(({ items }) => [
|
|
255
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (org) => {
|
|
256
|
+
return openBlock(), createBlock(_sfc_main$3, {
|
|
257
|
+
key: org._id,
|
|
258
|
+
photo: org.profile?.photo,
|
|
259
|
+
title: org.profile?.name,
|
|
260
|
+
classImage: "h-3r w-3r radius-small o-hidden flex-shrink-0",
|
|
261
|
+
onClick: () => {
|
|
262
|
+
selectedOrganization.value = org;
|
|
263
|
+
},
|
|
264
|
+
class: "h-4r bg-white pd-thin radius-medium w-100 mn-b-thin cursor-pointer flex-v-center flex-nowrap flex gap-thin"
|
|
265
|
+
}, null, 8, ["photo", "title", "onClick"]);
|
|
266
|
+
}), 128))
|
|
267
|
+
]),
|
|
205
268
|
_: 1
|
|
206
|
-
})
|
|
207
|
-
])
|
|
269
|
+
}, 8, ["store", "options"])
|
|
270
|
+
]))
|
|
208
271
|
]),
|
|
209
272
|
_: 1
|
|
210
|
-
}),
|
|
211
|
-
createVNode(_sfc_main$
|
|
273
|
+
})) : createCommentVNode("", true),
|
|
274
|
+
createVNode(_sfc_main$5, {
|
|
212
275
|
selected: tabOrderCreate.value,
|
|
213
|
-
"onUpdate:selected": _cache[
|
|
276
|
+
"onUpdate:selected": _cache[1] || (_cache[1] = ($event) => tabOrderCreate.value = $event),
|
|
214
277
|
tabs: [
|
|
215
278
|
{ name: "Positions", value: "positions" },
|
|
216
279
|
{ name: "Customer", value: "customer" },
|
|
217
280
|
{ name: "Delivery", value: "delivery" },
|
|
218
281
|
{ name: "Payment", value: "payment" }
|
|
219
282
|
],
|
|
220
|
-
class: "fw-medium radius-medium bg-light mn-b-small"
|
|
283
|
+
class: "fw-medium radius-medium bg-light pd-thin mn-b-small"
|
|
221
284
|
}, null, 8, ["selected"]),
|
|
222
|
-
createVNode(_sfc_main$
|
|
285
|
+
createVNode(_sfc_main$6, {
|
|
223
286
|
onClosePopup: closeProductsPopup,
|
|
224
287
|
isPopupOpen: isOpenProductsPopup.value,
|
|
225
|
-
|
|
288
|
+
align: unref(isPhone)() || unref(isTablet)() ? "bottom center" : "center center",
|
|
289
|
+
class: normalizeClass([
|
|
290
|
+
"bg-white flex flex-column radius-big pd-medium pos-relative",
|
|
291
|
+
unref(isPhone)() || unref(isTablet)() ? "w-100 radius-zero radius-tr-medium radius-tl-medium h-max-80" : "w-min-30r w-max-30r"
|
|
292
|
+
])
|
|
226
293
|
}, {
|
|
227
294
|
default: withCtx(() => [
|
|
228
|
-
_cache[
|
|
295
|
+
_cache[4] || (_cache[4] = createElementVNode("h3", { class: "mn-b-small" }, "Add to order", -1)),
|
|
229
296
|
createElementVNode("div", _hoisted_3, [
|
|
230
297
|
createVNode(_sfc_main$4, {
|
|
231
298
|
showLoadMore: false,
|
|
@@ -247,7 +314,7 @@ const _sfc_main = {
|
|
|
247
314
|
state: null
|
|
248
315
|
},
|
|
249
316
|
options: {
|
|
250
|
-
owner:
|
|
317
|
+
owner: orgId.value
|
|
251
318
|
},
|
|
252
319
|
class: ""
|
|
253
320
|
}, {
|
|
@@ -255,7 +322,7 @@ const _sfc_main = {
|
|
|
255
322
|
items
|
|
256
323
|
}) => [
|
|
257
324
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (product, index) => {
|
|
258
|
-
return openBlock(), createBlock(_sfc_main$
|
|
325
|
+
return openBlock(), createBlock(_sfc_main$7, {
|
|
259
326
|
key: `${product._id}_${index}`,
|
|
260
327
|
editable: false,
|
|
261
328
|
productId: product._id,
|
|
@@ -271,12 +338,16 @@ const _sfc_main = {
|
|
|
271
338
|
])
|
|
272
339
|
]),
|
|
273
340
|
_: 1
|
|
274
|
-
}, 8, ["isPopupOpen"]),
|
|
275
|
-
createVNode(_sfc_main$
|
|
341
|
+
}, 8, ["isPopupOpen", "align", "class"]),
|
|
342
|
+
createVNode(_sfc_main$6, {
|
|
276
343
|
title: "Select variant",
|
|
277
344
|
onClosePopup: closeVariantsPopup,
|
|
278
345
|
isPopupOpen: isVariantsPopupOpen.value,
|
|
279
|
-
|
|
346
|
+
align: unref(isPhone)() || unref(isTablet)() ? "bottom center" : "center center",
|
|
347
|
+
class: normalizeClass([
|
|
348
|
+
"bg-white w-100 radius-medium pd-medium",
|
|
349
|
+
unref(isPhone)() || unref(isTablet)() ? "radius-zero radius-tr-medium radius-tl-medium" : "w-max-30r"
|
|
350
|
+
])
|
|
280
351
|
}, {
|
|
281
352
|
default: withCtx(() => [
|
|
282
353
|
createVNode(_sfc_main$4, {
|
|
@@ -325,9 +396,9 @@ const _sfc_main = {
|
|
|
325
396
|
}, 8, ["store", "options"])
|
|
326
397
|
]),
|
|
327
398
|
_: 1
|
|
328
|
-
}, 8, ["isPopupOpen"]),
|
|
329
|
-
tabOrderCreate.value === "positions" ? (openBlock(), createBlock(_sfc_main$
|
|
330
|
-
key:
|
|
399
|
+
}, 8, ["isPopupOpen", "align", "class"]),
|
|
400
|
+
tabOrderCreate.value === "positions" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
401
|
+
key: 1,
|
|
331
402
|
title: "Positions",
|
|
332
403
|
actions: [{
|
|
333
404
|
label: "+",
|
|
@@ -338,7 +409,7 @@ const _sfc_main = {
|
|
|
338
409
|
default: withCtx(() => [
|
|
339
410
|
state.current.positions.length === 0 ? (openBlock(), createElementBlock("span", _hoisted_11, " No positions added yet ")) : createCommentVNode("", true),
|
|
340
411
|
(openBlock(true), createElementBlock(Fragment, null, renderList(state.current.positions, (product, index) => {
|
|
341
|
-
return openBlock(), createBlock(_sfc_main$
|
|
412
|
+
return openBlock(), createBlock(_sfc_main$7, {
|
|
342
413
|
key: `${product._id}_${product.variant || "no-variant"}_${index}`,
|
|
343
414
|
editable: true,
|
|
344
415
|
productId: product._id,
|
|
@@ -349,37 +420,39 @@ const _sfc_main = {
|
|
|
349
420
|
unit: product.unit,
|
|
350
421
|
dates: product.date,
|
|
351
422
|
listing: product.listing,
|
|
423
|
+
rentPeriod: product.rentPeriod || "day",
|
|
352
424
|
price: product.price,
|
|
353
425
|
increase: () => incrementOrderItemQuantity(product._id, product.variant),
|
|
354
426
|
decrease: () => decrementOrderItemQuantity(product._id, product.variant),
|
|
355
427
|
remove: () => removeOrderItem(product._id, product.variant),
|
|
356
|
-
onUpdateRentDates: _cache[
|
|
428
|
+
onUpdateRentDates: _cache[2] || (_cache[2] = (productId, variantId, dates) => updateOrderRentDates(productId, variantId, dates)),
|
|
357
429
|
class: "mn-b-thin pd-thin radius-medium bg-white"
|
|
358
|
-
}, null, 8, ["productId", "variantId", "images", "name", "quantity", "unit", "dates", "listing", "price", "increase", "decrease", "remove"]);
|
|
430
|
+
}, null, 8, ["productId", "variantId", "images", "name", "quantity", "unit", "dates", "listing", "rentPeriod", "price", "increase", "decrease", "remove"]);
|
|
359
431
|
}), 128))
|
|
360
432
|
]),
|
|
361
433
|
_: 1
|
|
362
434
|
}, 8, ["actions"])) : createCommentVNode("", true),
|
|
363
|
-
tabOrderCreate.value === "customer" ? (openBlock(), createBlock(_sfc_main$
|
|
364
|
-
key:
|
|
435
|
+
tabOrderCreate.value === "customer" ? (openBlock(), createBlock(_sfc_main$8, {
|
|
436
|
+
key: 2,
|
|
365
437
|
customer: state.current.customer,
|
|
366
|
-
"onUpdate:customer": _cache[
|
|
438
|
+
"onUpdate:customer": _cache[3] || (_cache[3] = ($event) => state.current.customer = $event),
|
|
439
|
+
orgId: orgId.value,
|
|
367
440
|
class: "mn-b-semi"
|
|
368
|
-
}, null, 8, ["customer"])) : createCommentVNode("", true),
|
|
369
|
-
tabOrderCreate.value === "delivery" ? (openBlock(), createBlock(_sfc_main$
|
|
370
|
-
key:
|
|
441
|
+
}, null, 8, ["customer", "orgId"])) : createCommentVNode("", true),
|
|
442
|
+
tabOrderCreate.value === "delivery" ? (openBlock(), createBlock(_sfc_main$9, {
|
|
443
|
+
key: 3,
|
|
371
444
|
order: state.current,
|
|
372
445
|
organization: orderOrganization.value[0]
|
|
373
446
|
}, null, 8, ["order", "organization"])) : createCommentVNode("", true),
|
|
374
|
-
tabOrderCreate.value === "payment" ? (openBlock(), createBlock(_sfc_main$
|
|
375
|
-
key:
|
|
447
|
+
tabOrderCreate.value === "payment" ? (openBlock(), createBlock(_sfc_main$a, {
|
|
448
|
+
key: 4,
|
|
376
449
|
order: state.current,
|
|
377
450
|
organization: orderOrganization.value[0]
|
|
378
451
|
}, null, 8, ["order", "organization"])) : createCommentVNode("", true),
|
|
379
|
-
createVNode(_sfc_main$
|
|
452
|
+
createVNode(_sfc_main$2, { class: "mn-b-semi" }, {
|
|
380
453
|
default: withCtx(() => [
|
|
381
454
|
createElementVNode("div", _hoisted_12, [
|
|
382
|
-
_cache[
|
|
455
|
+
_cache[5] || (_cache[5] = createElementVNode("span", { class: "mn-r-auto opacity-50" }, "In total", -1)),
|
|
383
456
|
createElementVNode("span", null, toDisplayString(unref(cartTotalPrice)) + " " + toDisplayString(unref(returnCurrency)()), 1)
|
|
384
457
|
])
|
|
385
458
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderCreateBackoffice.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreateBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"flex flex-column pd-thin\">\n <Block class=\"mn-b-thin\">\n <header class=\"flex-v-center flex-nowrap flex\">\n <h2 class=\"mn-r-auto\">Create Order</h2>\n <Button \n :submit=\"onSubmit\"\n :callback=\"redirectTo\"\n class=\"pd-small radius-big bg-main t-black uppercase fw-medium\"\n >\n Add Order \n </Button>\n </header>\n </Block>\n\n <Tab \n v-model:selected=\"tabOrderCreate\"\n :tabs=\"[\n {name: 'Positions', value: 'positions'},\n {name: 'Customer', value: 'customer'},\n {name: 'Delivery', value: 'delivery'},\n {name: 'Payment', value: 'payment'}\n ]\"\n class=\"fw-medium radius-medium bg-light mn-b-small\"\n />\n\n <Popup \n @close-popup=\"closeProductsPopup\" \n :isPopupOpen=\"isOpenProductsPopup\"\n class=\"bg-white flex flex-column radius-big pd-medium pos-relative\"\n >\n\n <h3 class=\"mn-b-small\">Add to order</h3>\n\n <div class=\"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big\">\n <Feed\n :showLoadMore=\"false\"\n :search=\"{\n placeholder: 'Search products...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n },\n skeleton: {\n hide: true\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\" \n :key=\"`${product._id}_${index}`\"\n :editable=\"false\" \n :productId=\"product._id\"\n :images=\"product.images\"\n :name=\"product.name\"\n @click=\"() => selectProduct(product)\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <!-- Popup for selecting variant of the product -->\n <Popup \n title=\"Select variant\" \n @close-popup=\"closeVariantsPopup\" \n :isPopupOpen=\"isVariantsPopupOpen\"\n class=\"bg-white w-100 w-max-30r radius-medium pd-medium\"\n >\n <Feed\n :store=\"variants\"\n :options=\"{\n product: selectedProduct?._id,\n }\"\n :skeleton=\"{\n structure: [\n { block: 'text', size: 'small' },\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'small' }\n ]\n }\"\n :states=\"{\n empty: {\n title: 'No variants',\n description: 'Create your first variant'\n }\n }\"\n v-slot=\"{ items }\"\n >\n <div class=\"gap-thin flex flex-column\">\n <div \n v-for=\"(variant, index) in items\" \n :key=\"index\"\n @click=\"addVariantToOrder(variant)\"\n class=\"w-100 cursor-pointer hover:scale-[1.05] bg-light pd-small radius-small flex-v-center flex-nowrap flex gap-thin\"\n >\n <div v-if=\"variant.images && variant.images.length\" class=\"aspect-1x1 h-3r radius-small o-hidden\">\n <img \n :src=\"(FILE_SERVER_URL || '') + variant.images[0]\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n </div>\n <div>\n <p class=\"fw-medium\">{{ variant.name || 'Default variant' }}</p>\n <p v-if=\"variant.attributes && variant.attributes.length\" class=\"t-small t-transp\">\n {{ variant.attributes.map(attr => `${attr.name}: ${attr.value}`).join(', ') }}\n </p>\n </div>\n <p class=\"mn-l-auto\">{{ formatPrice(variant.price || variant.cost) }}</p>\n </div>\n </div>\n </Feed>\n </Popup>\n\n <Block\n v-if=\"tabOrderCreate === 'positions'\"\n title=\"Positions\"\n :actions=\"[{\n label: '+',\n function: () => openProductsPopup()\n }]\"\n class=\"mn-b-small\"\n >\n <span \n v-if=\"orders.state.current.positions.length === 0\" \n class=\"w-100\"\n >\n No positions added yet\n </span> \n\n <CardOrderItem\n v-for=\"(product, index) in orders.state.current.positions\" \n :key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n :editable=\"true\" \n :productId=\"product._id\"\n :variantId=\"product.variant\"\n :images=\"product.images\"\n :name=\"product.name\"\n :quantity=\"product.quantity\"\n :unit=\"product.unit\"\n :dates=\"product.date\"\n :listing=\"product.listing\"\n :price=\"product.price\"\n :increase=\"() => incrementOrderItemQuantity(product._id, product.variant)\"\n :decrease=\"() => decrementOrderItemQuantity(product._id, product.variant)\"\n :remove=\"() => removeOrderItem(product._id, product.variant)\"\n @updateRentDates=\"(productId, variantId, dates) => updateOrderRentDates(productId, variantId, dates)\"\n class=\"mn-b-thin pd-thin radius-medium bg-white\"\n /> \n </Block>\n\n <FormSelectCustomer\n v-if=\"tabOrderCreate === 'customer'\"\n v-model:customer=\"orders.state.current.customer\"\n class=\"mn-b-semi\"\n />\n\n <FormDelivery \n v-if=\"tabOrderCreate === 'delivery'\" \n :order=\"orders.state.current\"\n :organization=\"orderOrganization[0]\" \n />\n\n <FormPayment \n v-if=\"tabOrderCreate === 'payment'\"\n :order=\"orders.state.current\" \n :organization=\"orderOrganization[0]\" \n />\n\n\n <Block\n class=\"mn-b-semi\"\n >\n <div class=\"h3 flex\">\n <span class=\"mn-r-auto t-transp\">In total</span>\n <span>{{ cartTotalPrice }} {{returnCurrency()}} </span >\n </div>\n </Block>\n</div>\n\n\n</template>\n\n<script setup=\"props\">\n import { computed, ref, defineProps, onMounted, reactive, toRefs, watch, getCurrentInstance } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n\n import Field from '@martyrs/src/components/Field/Field.vue'\n import Button from \"@martyrs/src/components/Button/Button.vue\"; \n import Tab from '@martyrs/src/components/Tab/Tab.vue'\n import Popup from '@martyrs/src/components/Popup/Popup.vue';\n\timport Block from '@martyrs/src/components/Block/Block.vue';\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'\n import CardPosition from '@martyrs/src/modules/products/components/blocks/CardPosition.vue';\n import CardUser from '@martyrs/src/modules/auth/views/components/blocks/CardUser.vue'\n\n import BlockSearch from '@martyrs/src/modules/core/views/components/blocks/BlockSearch.vue'\n\n import FormSelectCustomer from '@martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue'\n import FormDelivery from '@martyrs/src/modules/orders/components/sections/FormDelivery.vue'\n import FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'\n\n // Import your store\n import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as orders from '@martyrs/src/modules/orders/store/orders.js';\n import * as organizations from '@martyrs/src/modules/organizations/store/organizations.js';\n import * as products from '@martyrs/src/modules/products/store/products.js';\n import variants from '@martyrs/src/modules/products/store/variants.store.js';\n\n import customers from '@martyrs/src/modules/orders/store/customers.store';\n\n import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\n const store = useStore()\n\t\n // Accessing router\n const route = useRoute()\n const router = useRouter()\n const { proxy } = getCurrentInstance()\n const { formatPrice, returnCurrency } = useGlobalMixins()\n\n orders.mutations.resetOrder(orders.state.current)\n\n let cartTotalPrice = computed(() => {\n return Number(orders.state.current.positions.reduce((total, product) => {\n if (product.listing === 'rent' && product.date?.start && product.date?.end) {\n const start = new Date(product.date.start);\n const end = new Date(product.date.end);\n const days = Math.ceil(Math.abs(end - start) / (1000 * 60 * 60 * 24)) + 1;\n return total + product.price * product.quantity * days;\n } else {\n return total + product.price * product.quantity;\n }\n }, 0));\n })\n\n // Tab\n const tabOrderCreate = ref('positions')\n\n // Popup\n const isOpenProductsPopup = ref(false);\n const isVariantsPopupOpen = ref(false);\n const selectedProduct = ref(null);\n\n function openProductsPopup() {\n isOpenProductsPopup.value = true;\n }\n\n function closeProductsPopup() {\n isOpenProductsPopup.value = false;\n }\n\n function closeVariantsPopup() {\n isVariantsPopupOpen.value = false;\n selectedProduct.value = null;\n }\n\n function selectProduct(product) {\n selectedProduct.value = product;\n closeProductsPopup();\n \n // If product has only one variant, add it directly without showing popup\n if (product.variants && product.variants.length === 1) {\n addVariantToOrder(product.variants[0]);\n return;\n }\n \n // If product has multiple variants or no variants defined, show popup\n isVariantsPopupOpen.value = true;\n }\n\n function formatProductName(product, variant) {\n if (!variant || product.variants?.length === 1 && !(variant.attributes?.length))\n return product.name;\n\n const attrs = variant.attributes?.map(a => a.value).filter(Boolean);\n return attrs?.length\n ? `${product.name} / ${attrs.join(' / ')}`\n : `${product.name} / ${variant.name}`;\n }\n\n async function addVariantToOrder(variant) {\n try {\n let selectedDates = null;\n \n // Если товар для аренды, сначала выбираем даты\n if (selectedProduct.value.listing === 'rent') {\n selectedDates = await proxy.$dateSelector(\n selectedProduct.value._id,\n variant._id,\n 1,\n variant.price || selectedProduct.value.price\n );\n \n if (!selectedDates) {\n // Если отменили выбор дат, возвращаемся к выбору вариантов\n return;\n }\n }\n \n const position = {\n _id: selectedProduct.value._id,\n images: variant.images?.length > 0 ? variant.images : selectedProduct.value.images,\n name: formatProductName(selectedProduct.value, variant),\n listing: selectedProduct.value.listing,\n price: variant.price || selectedProduct.value.price,\n quantity: 1,\n unit: variant.unit || selectedProduct.value.unit,\n date: selectedDates,\n variant: variant._id,\n org_id: route.params._id\n };\n\n store.core.actions.add(orders.state.current.positions, position);\n closeVariantsPopup();\n } catch (error) {\n console.error('Error adding variant to order:', error);\n }\n }\n\n\n // Функции управления позициями заказа\n function incrementOrderItemQuantity(productId, variantId) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.quantity++;\n }\n }\n\n function decrementOrderItemQuantity(productId, variantId) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.quantity--;\n \n if (orderItem.quantity < 1) {\n removeOrderItem(productId, variantId);\n }\n }\n }\n\n function removeOrderItem(productId, variantId) {\n const itemIndex = orders.state.current.positions.findIndex(item => \n item._id === productId && item.variant === variantId\n );\n \n if (itemIndex > -1) {\n orders.state.current.positions.splice(itemIndex, 1);\n }\n }\n\n function updateOrderRentDates(productId, variantId, dates) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.date = dates;\n }\n }\n\n // Data\n let order = ref(null)\n\n async function onSubmit() {\n\n orders.state.current.creator = {\n type: 'User',\n target: auth.state.user._id\n }\n\n orders.state.current.owner = {\n type: 'Organization',\n target: route.params._id,\n }\n\n orders.state.current.customer = {\n type: 'Customer',\n target: orders.state.current.customer._id || null,\n }\n\n order.value = await orders.actions.create(orders.state.current)\n }\n\n function redirectTo () {\n router.push({\n name: route.meta.context === 'backoffice' ? 'BackofficeOrderEdit' : 'OrganizationOrderEdit',\n params: { \n order: order.value._id,\n _id: route.params._id\n } \n })\n }\n\n const orderOrganization = ref({})\n\n\n\n onMounted(async() => {\n\n orderOrganization.value = await organizations.actions.read({\n _id: route.params._id,\n lookup: ['spots']\n })\n\n // await orders.actions.fetchOrder(route.params.id) // Implement this action in your store\n\n // order.value = orders.state.current\n })\n\n</script>\n\n\n<style lang=\"scss\">\n\n.vue-select {\n width: inherit;\n\n margin-right: 1rem;\n}\n.vue-select-header {\n height: 3rem;\n}\n</style>\n"],"names":["orders.mutations","orders.state","auth.state","orders.actions","organizations.actions"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"OrderCreateBackoffice.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreateBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"flex flex-column pd-thin\">\n <SectionPageTitle\n title=\"Add Order\"\n :actions=\"[\n { method: async () => { await onSubmit(); redirectTo(); }, label: 'Save Order' }\n ]\"\n class=\"mn-b-thin\"\n />\n\n <!-- Выбор организации (backoffice context) -->\n <Block v-if=\"!route.params._id\" title=\"Organization\" class=\"mn-b-small\">\n <Card\n v-if=\"selectedOrganization\"\n :photo=\"selectedOrganization.profile?.photo\"\n :title=\"selectedOrganization.profile?.name\"\n classImage=\"h-3r w-3r radius-small o-hidden flex-shrink-0\"\n @click=\"() => { selectedOrganization = null }\"\n class=\"h-4r w-100 bg-white pd-thin radius-medium mn-b-thin flex-v-center flex-nowrap flex gap-thin cursor-pointer\"\n />\n <section v-else class=\"o-x-hidden o-y-scroll\">\n <Feed\n :showLoadMore=\"false\"\n :search=\"{ placeholder: 'Search organization...', class: 'bg-white mn-b-thin' }\"\n :states=\"{ empty: { title: 'No organizations', description: 'No organizations found.' } }\"\n :store=\"{ read: (options) => organizations.actions.read(options), state: null }\"\n :options=\"{ user: auth.state.user._id }\"\n v-slot=\"{ items }\"\n >\n <Card\n v-for=\"org in items\"\n :key=\"org._id\"\n :photo=\"org.profile?.photo\"\n :title=\"org.profile?.name\"\n classImage=\"h-3r w-3r radius-small o-hidden flex-shrink-0\"\n @click=\"() => { selectedOrganization = org }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin cursor-pointer flex-v-center flex-nowrap flex gap-thin\"\n />\n </Feed>\n </section>\n </Block>\n\n <Tab\n v-model:selected=\"tabOrderCreate\"\n :tabs=\"[\n {name: 'Positions', value: 'positions'},\n {name: 'Customer', value: 'customer'},\n {name: 'Delivery', value: 'delivery'},\n {name: 'Payment', value: 'payment'}\n ]\"\n class=\"fw-medium radius-medium bg-light pd-thin mn-b-small\"\n />\n\n <Popup\n @close-popup=\"closeProductsPopup\"\n :isPopupOpen=\"isOpenProductsPopup\"\n :align=\"isPhone() || isTablet() ? 'bottom center' : 'center center'\"\n class=\"bg-white flex flex-column radius-big pd-medium pos-relative\"\n :class=\"\n isPhone() || isTablet()\n ? 'w-100 radius-zero radius-tr-medium radius-tl-medium h-max-80'\n : 'w-min-30r w-max-30r'\n \"\n >\n\n <h3 class=\"mn-b-small\">Add to order</h3>\n\n <div class=\"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big\">\n <Feed\n :showLoadMore=\"false\"\n :search=\"{\n placeholder: 'Search products...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n },\n skeleton: {\n hide: true\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n owner: orgId\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\" \n :key=\"`${product._id}_${index}`\"\n :editable=\"false\" \n :productId=\"product._id\"\n :images=\"product.images\"\n :name=\"product.name\"\n @click=\"() => selectProduct(product)\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <!-- Popup for selecting variant of the product -->\n <Popup\n title=\"Select variant\"\n @close-popup=\"closeVariantsPopup\"\n :isPopupOpen=\"isVariantsPopupOpen\"\n :align=\"isPhone() || isTablet() ? 'bottom center' : 'center center'\"\n class=\"bg-white w-100 radius-medium pd-medium\"\n :class=\"\n isPhone() || isTablet()\n ? 'radius-zero radius-tr-medium radius-tl-medium'\n : 'w-max-30r'\n \"\n >\n <Feed\n :store=\"variants\"\n :options=\"{\n product: selectedProduct?._id,\n }\"\n :skeleton=\"{\n structure: [\n { block: 'text', size: 'small' },\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'small' }\n ]\n }\"\n :states=\"{\n empty: {\n title: 'No variants',\n description: 'Create your first variant'\n }\n }\"\n v-slot=\"{ items }\"\n >\n <div class=\"gap-thin flex flex-column\">\n <div \n v-for=\"(variant, index) in items\" \n :key=\"index\"\n @click=\"addVariantToOrder(variant)\"\n class=\"w-100 cursor-pointer hover:scale-[1.05] bg-light pd-small radius-small flex-v-center flex-nowrap flex gap-thin\"\n >\n <div v-if=\"variant.images && variant.images.length\" class=\"aspect-1x1 h-3r radius-small o-hidden\">\n <img \n :src=\"(FILE_SERVER_URL || '') + variant.images[0]\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n </div>\n <div>\n <p class=\"fw-medium\">{{ variant.name || 'Default variant' }}</p>\n <p v-if=\"variant.attributes && variant.attributes.length\" class=\"t-small opacity-50\">\n {{ variant.attributes.map(attr => `${attr.name}: ${attr.value}`).join(', ') }}\n </p>\n </div>\n <p class=\"mn-l-auto\">{{ formatPrice(variant.price || variant.cost) }}</p>\n </div>\n </div>\n </Feed>\n </Popup>\n\n <Block\n v-if=\"tabOrderCreate === 'positions'\"\n title=\"Positions\"\n :actions=\"[{\n label: '+',\n function: () => openProductsPopup()\n }]\"\n class=\"mn-b-small\"\n >\n <span \n v-if=\"orders.state.current.positions.length === 0\" \n class=\"w-100\"\n >\n No positions added yet\n </span> \n\n <CardOrderItem\n v-for=\"(product, index) in orders.state.current.positions\" \n :key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n :editable=\"true\" \n :productId=\"product._id\"\n :variantId=\"product.variant\"\n :images=\"product.images\"\n :name=\"product.name\"\n :quantity=\"product.quantity\"\n :unit=\"product.unit\"\n :dates=\"product.date\"\n :listing=\"product.listing\"\n :rentPeriod=\"product.rentPeriod || 'day'\"\n :price=\"product.price\"\n :increase=\"() => incrementOrderItemQuantity(product._id, product.variant)\"\n :decrease=\"() => decrementOrderItemQuantity(product._id, product.variant)\"\n :remove=\"() => removeOrderItem(product._id, product.variant)\"\n @updateRentDates=\"(productId, variantId, dates) => updateOrderRentDates(productId, variantId, dates)\"\n class=\"mn-b-thin pd-thin radius-medium bg-white\"\n /> \n </Block>\n\n <FormSelectCustomer\n v-if=\"tabOrderCreate === 'customer'\"\n v-model:customer=\"orders.state.current.customer\"\n :orgId=\"orgId\"\n class=\"mn-b-semi\"\n />\n\n <FormDelivery \n v-if=\"tabOrderCreate === 'delivery'\" \n :order=\"orders.state.current\"\n :organization=\"orderOrganization[0]\" \n />\n\n <FormPayment \n v-if=\"tabOrderCreate === 'payment'\"\n :order=\"orders.state.current\" \n :organization=\"orderOrganization[0]\" \n />\n\n\n <Block\n class=\"mn-b-semi\"\n >\n <div class=\"h3 flex\">\n <span class=\"mn-r-auto opacity-50\">In total</span>\n <span>{{ cartTotalPrice }} {{returnCurrency()}} </span >\n </div>\n </Block>\n</div>\n\n\n</template>\n\n<script setup=\"props\">\n import { computed, ref, defineProps, onMounted, reactive, toRefs, watch, getCurrentInstance } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n\n import Field from '@martyrs/src/components/Field/Field.vue'\n import Button from \"@martyrs/src/components/Button/Button.vue\";\n import Tab from '@martyrs/src/components/Tab/Tab.vue'\n import SectionPageTitle from '@martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue'\n import Popup from '@martyrs/src/components/Popup/Popup.vue';\n\timport Block from '@martyrs/src/components/Block/Block.vue';\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'\n import CardPosition from '@martyrs/src/modules/products/components/blocks/CardPosition.vue';\n import CardUser from '@martyrs/src/modules/core/views/components/blocks/CardUser.vue'\n import Card from '@martyrs/src/modules/core/views/components/blocks/Card.vue'\n\n import BlockSearch from '@martyrs/src/modules/core/views/components/blocks/BlockSearch.vue'\n\n import FormSelectCustomer from '@martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue'\n import FormDelivery from '@martyrs/src/modules/orders/components/sections/FormDelivery.vue'\n import FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'\n\n // Import your store\n import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as orders from '@martyrs/src/modules/orders/store/orders.js';\n import * as organizations from '@martyrs/src/modules/organizations/store/organizations.js';\n import * as products from '@martyrs/src/modules/products/store/products.js';\n import variants from '@martyrs/src/modules/products/store/variants.store.js';\n\n import customers from '@martyrs/src/modules/orders/store/customers.store';\n\n import { calcRentTotalPrice } from '@martyrs/src/modules/orders/utils/rent-price.js';\n import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\n const store = useStore()\n\t\n // Accessing router\n const route = useRoute()\n const router = useRouter()\n const { proxy } = getCurrentInstance()\n const { formatPrice, returnCurrency, isPhone, isTablet } = useGlobalMixins()\n\n orders.mutations.resetOrder(orders.state.current)\n\n // Organization selection (backoffice context without route.params._id)\n const selectedOrganization = ref(null)\n const orgId = computed(() => selectedOrganization.value?._id || route.params._id)\n\n let cartTotalPrice = computed(() => {\n return Number(orders.state.current.positions.reduce((total, product) => {\n if (product.listing === 'rent' && product.date?.start && product.date?.end) {\n return total + calcRentTotalPrice(\n product.price,\n product.quantity,\n product.date.start,\n product.date.end,\n product.rentPeriod || 'day'\n );\n } else {\n return total + product.price * product.quantity;\n }\n }, 0));\n })\n\n // Tab\n const tabOrderCreate = ref('positions')\n\n // Popup\n const isOpenProductsPopup = ref(false);\n const isVariantsPopupOpen = ref(false);\n const selectedProduct = ref(null);\n\n function openProductsPopup() {\n isOpenProductsPopup.value = true;\n }\n\n function closeProductsPopup() {\n isOpenProductsPopup.value = false;\n }\n\n function closeVariantsPopup() {\n isVariantsPopupOpen.value = false;\n selectedProduct.value = null;\n }\n\n function selectProduct(product) {\n selectedProduct.value = product;\n closeProductsPopup();\n \n // If product has only one variant, add it directly without showing popup\n if (product.variants && product.variants.length === 1) {\n addVariantToOrder(product.variants[0]);\n return;\n }\n \n // If product has multiple variants or no variants defined, show popup\n isVariantsPopupOpen.value = true;\n }\n\n function formatProductName(product, variant) {\n if (!variant || product.variants?.length === 1 && !(variant.attributes?.length))\n return product.name;\n\n const attrs = variant.attributes?.map(a => a.value).filter(Boolean);\n return attrs?.length\n ? `${product.name} / ${attrs.join(' / ')}`\n : `${product.name} / ${variant.name}`;\n }\n\n async function addVariantToOrder(variant) {\n try {\n let selectedDates = null;\n \n // Если товар для аренды, сначала выбираем даты\n if (selectedProduct.value.listing === 'rent') {\n const rentPeriod = selectedProduct.value.rentPeriod || 'day'\n const enableTime = ['hour', '4hours', 'flat'].includes(rentPeriod)\n selectedDates = await proxy.$dateSelector(\n selectedProduct.value._id,\n variant._id,\n 1,\n variant.price || selectedProduct.value.price,\n { enableTime, periodType: rentPeriod }\n );\n \n if (!selectedDates) {\n // Если отменили выбор дат, возвращаемся к выбору вариантов\n return;\n }\n }\n \n const position = {\n _id: selectedProduct.value._id,\n images: variant.images?.length > 0 ? variant.images : selectedProduct.value.images,\n name: formatProductName(selectedProduct.value, variant),\n listing: selectedProduct.value.listing,\n price: variant.price || selectedProduct.value.price,\n quantity: 1,\n unit: variant.unit || selectedProduct.value.unit,\n date: selectedDates,\n variant: variant._id,\n rentPeriod: selectedProduct.value.rentPeriod || 'day',\n org_id: orgId.value\n };\n\n store.core.actions.add(orders.state.current.positions, position);\n closeVariantsPopup();\n } catch (error) {\n console.error('Error adding variant to order:', error);\n }\n }\n\n\n // Функции управления позициями заказа\n function incrementOrderItemQuantity(productId, variantId) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.quantity++;\n }\n }\n\n function decrementOrderItemQuantity(productId, variantId) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.quantity--;\n \n if (orderItem.quantity < 1) {\n removeOrderItem(productId, variantId);\n }\n }\n }\n\n function removeOrderItem(productId, variantId) {\n const itemIndex = orders.state.current.positions.findIndex(item => \n item._id === productId && item.variant === variantId\n );\n \n if (itemIndex > -1) {\n orders.state.current.positions.splice(itemIndex, 1);\n }\n }\n\n function updateOrderRentDates(productId, variantId, dates) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.date = dates;\n }\n }\n\n // Data\n let order = ref(null)\n\n async function onSubmit() {\n\n orders.state.current.creator = {\n type: 'User',\n target: auth.state.user._id\n }\n\n orders.state.current.owner = {\n type: 'Organization',\n target: orgId.value,\n }\n\n orders.state.current.customer = orders.state.current.customer._id\n ? { type: 'Customer', target: orders.state.current.customer._id }\n : { type: 'Customer', target: null, phone: orders.state.current.customer.phone, email: orders.state.current.customer.email, profile: { name: orders.state.current.customer.profile?.name } }\n\n order.value = await orders.actions.create(orders.state.current)\n }\n\n function redirectTo () {\n router.push({\n name: route.meta.context === 'backoffice' ? 'BackofficeOrderEdit' : 'OrganizationOrderEdit',\n params: {\n order: order.value._id,\n _id: orgId.value\n } \n })\n }\n\n const orderOrganization = ref({})\n\n\n\n watch(selectedOrganization, async (org) => {\n if (org) {\n orderOrganization.value = await organizations.actions.read({\n _id: org._id,\n lookup: ['spots']\n })\n }\n })\n\n onMounted(async() => {\n if (route.params._id) {\n orderOrganization.value = await organizations.actions.read({\n _id: route.params._id,\n lookup: ['spots']\n })\n selectedOrganization.value = orderOrganization.value[0]\n } else {\n const orgs = await organizations.actions.read({ user: auth.state.user._id })\n if (orgs?.length) {\n selectedOrganization.value = orgs[0]\n }\n }\n\n // await orders.actions.fetchOrder(route.params.id) // Implement this action in your store\n\n // order.value = orders.state.current\n })\n\n</script>\n\n\n<style lang=\"scss\">\n\n.vue-select {\n width: inherit;\n\n margin-right: 1rem;\n}\n.vue-select-header {\n height: 3rem;\n}\n</style>\n"],"names":["orders.mutations","orders.state","auth.state","orders.actions","organizations.actions"],"mappings":"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"}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { ref, computed, resolveComponent, createElementBlock, openBlock, createBlock, createCommentVNode, createVNode, unref, withCtx, createElementVNode,
|
|
2
|
-
import { useRoute } from "vue-router";
|
|
3
|
-
import _sfc_main$
|
|
1
|
+
import { ref, computed, resolveComponent, createElementBlock, openBlock, createBlock, createCommentVNode, createVNode, unref, withCtx, createElementVNode, normalizeClass, Fragment, renderList } from "vue";
|
|
2
|
+
import { useRoute, useRouter } from "vue-router";
|
|
3
|
+
import _sfc_main$4 from "../../../../components/Tab/Tab.vue2.js";
|
|
4
4
|
import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
|
|
5
|
-
import _sfc_main$
|
|
5
|
+
import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
|
|
6
6
|
import { state, actions, getters } from "../../store/orders.js";
|
|
7
7
|
import { state as state$1 } from "../../../auth/views/store/auth.js";
|
|
8
|
-
import _sfc_main$
|
|
9
|
-
import _sfc_main$
|
|
8
|
+
import _sfc_main$3 from "../../../core/views/components/blocks/CardStat.vue.js";
|
|
9
|
+
import _sfc_main$7 from "../blocks/CardOrderUser.vue.js";
|
|
10
|
+
import _sfc_main$6 from "../blocks/CardOrderBackoffice.vue.js";
|
|
10
11
|
import _sfc_main$1 from "../../../core/views/components/sections/SectionPageTitle.vue.js";
|
|
11
12
|
import { useGlobalMixins } from "../../../core/views/mixins/mixins.js";
|
|
13
|
+
import { useStore } from "../../../core/views/store/core.store.js";
|
|
12
14
|
const _hoisted_1 = { class: "mobile:pd-thin pd-medium" };
|
|
13
|
-
const _hoisted_2 = { class: "gap-micro flex-
|
|
14
|
-
const _hoisted_3 = { class: "w-100 bg-white radius-small pd-small" };
|
|
15
|
-
const _hoisted_4 = { class: "w-100 bg-white radius-small pd-small" };
|
|
16
|
-
const _hoisted_5 = { class: "w-100 bg-white radius-small pd-small" };
|
|
15
|
+
const _hoisted_2 = { class: "flex gap-micro mobile:flex-column" };
|
|
17
16
|
const _sfc_main = {
|
|
18
17
|
__name: "Orders",
|
|
19
18
|
setup(__props) {
|
|
19
|
+
const store = useStore();
|
|
20
20
|
const route = useRoute();
|
|
21
|
+
const router = useRouter();
|
|
21
22
|
const { returnCurrency, formatPrice, formatDate } = useGlobalMixins();
|
|
23
|
+
const orderStatuses = store.core.state.options?.orders?.statuses || [];
|
|
22
24
|
const tab = ref("all");
|
|
23
25
|
const tabs = [
|
|
24
26
|
{ label: "All Orders", value: "all" },
|
|
@@ -28,9 +30,9 @@ const _sfc_main = {
|
|
|
28
30
|
const tabStatusFilter = computed(() => {
|
|
29
31
|
switch (tab.value) {
|
|
30
32
|
case "in_progress":
|
|
31
|
-
return ["created", "confirmed", "
|
|
33
|
+
return ["created", "confirmed", "in_progress"];
|
|
32
34
|
case "returns":
|
|
33
|
-
return ["
|
|
35
|
+
return ["canceled"];
|
|
34
36
|
default:
|
|
35
37
|
return null;
|
|
36
38
|
}
|
|
@@ -38,6 +40,9 @@ const _sfc_main = {
|
|
|
38
40
|
const totalPrice = computed(() => {
|
|
39
41
|
return calculateTotalSum(state.all);
|
|
40
42
|
});
|
|
43
|
+
const totalPricePaid = computed(() => {
|
|
44
|
+
return calculateSum(state.all, "paid");
|
|
45
|
+
});
|
|
41
46
|
const totalPriceUnpaid = computed(() => {
|
|
42
47
|
return calculateSum(state.all, "unpaid");
|
|
43
48
|
});
|
|
@@ -61,8 +66,8 @@ const _sfc_main = {
|
|
|
61
66
|
key: 0,
|
|
62
67
|
title: "Orders",
|
|
63
68
|
actions: [
|
|
64
|
-
unref(route).meta.context === "backoffice" && {
|
|
65
|
-
unref(route).meta.context === "organization" && {
|
|
69
|
+
unref(route).meta.context === "backoffice" && { method: () => unref(router).push({ name: "BackofficeAdminCreateOrder" }), label: "+ Add Order" },
|
|
70
|
+
unref(route).meta.context === "organization" && { method: () => unref(router).push({ name: "OrganizationAdminCreateOrder", params: { _id: unref(route).params._id } }), label: "+ Add Order" }
|
|
66
71
|
].filter(Boolean),
|
|
67
72
|
class: "mn-b-small"
|
|
68
73
|
}, null, 8, ["actions"])) : createCommentVNode("", true),
|
|
@@ -73,23 +78,23 @@ const _sfc_main = {
|
|
|
73
78
|
}, {
|
|
74
79
|
default: withCtx(() => [
|
|
75
80
|
createElementVNode("div", _hoisted_2, [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
]),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
]),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
])
|
|
81
|
+
createVNode(_sfc_main$3, {
|
|
82
|
+
title: "Total",
|
|
83
|
+
value: unref(formatPrice)(totalPrice.value)
|
|
84
|
+
}, null, 8, ["value"]),
|
|
85
|
+
createVNode(_sfc_main$3, {
|
|
86
|
+
title: "Paid",
|
|
87
|
+
value: unref(formatPrice)(totalPricePaid.value)
|
|
88
|
+
}, null, 8, ["value"]),
|
|
89
|
+
createVNode(_sfc_main$3, {
|
|
90
|
+
title: "Unpaid",
|
|
91
|
+
value: unref(formatPrice)(totalPriceUnpaid.value)
|
|
92
|
+
}, null, 8, ["value"])
|
|
88
93
|
])
|
|
89
94
|
]),
|
|
90
95
|
_: 1
|
|
91
96
|
})) : createCommentVNode("", true),
|
|
92
|
-
unref(route).meta.context === "user" ? (openBlock(), createBlock(_sfc_main$
|
|
97
|
+
unref(route).meta.context === "user" ? (openBlock(), createBlock(_sfc_main$4, {
|
|
93
98
|
key: 2,
|
|
94
99
|
tabs,
|
|
95
100
|
selected: tab.value,
|
|
@@ -97,7 +102,7 @@ const _sfc_main = {
|
|
|
97
102
|
classTab: "bg-light",
|
|
98
103
|
class: "mn-b-small"
|
|
99
104
|
}, null, 8, ["selected"])) : createCommentVNode("", true),
|
|
100
|
-
createVNode(_sfc_main$
|
|
105
|
+
createVNode(_sfc_main$5, {
|
|
101
106
|
search: true,
|
|
102
107
|
states: {
|
|
103
108
|
empty: {
|
|
@@ -114,7 +119,7 @@ const _sfc_main = {
|
|
|
114
119
|
...unref(route).meta.context === "user" && { customer: unref(route).params._id },
|
|
115
120
|
...tab.value !== "all" && { status: tabStatusFilter.value }
|
|
116
121
|
},
|
|
117
|
-
class: normalizeClass(unref(route).meta.context === "user" ? "gap-small cols-1" : "gap-thin cols-3 mobile:cols-1")
|
|
122
|
+
class: normalizeClass(unref(route).meta.context === "user" ? "gap-small cols-1" : "gap-thin cols-3 tablet:cols-1 mobile:cols-1")
|
|
118
123
|
}, {
|
|
119
124
|
default: withCtx(({
|
|
120
125
|
items
|
|
@@ -127,13 +132,14 @@ const _sfc_main = {
|
|
|
127
132
|
}
|
|
128
133
|
}, {
|
|
129
134
|
default: withCtx(() => [
|
|
130
|
-
createVNode(_sfc_main$
|
|
135
|
+
createVNode(_sfc_main$6, {
|
|
131
136
|
order,
|
|
132
137
|
user: state$1.user,
|
|
138
|
+
statuses: unref(orderStatuses),
|
|
133
139
|
formatDate: unref(formatDate),
|
|
134
140
|
getTotal: getters.getTotal,
|
|
135
141
|
currency: unref(returnCurrency)()
|
|
136
|
-
}, null, 8, ["order", "user", "formatDate", "getTotal", "currency"])
|
|
142
|
+
}, null, 8, ["order", "user", "statuses", "formatDate", "getTotal", "currency"])
|
|
137
143
|
]),
|
|
138
144
|
_: 2
|
|
139
145
|
}, 1032, ["to"]);
|
|
@@ -143,7 +149,7 @@ const _sfc_main = {
|
|
|
143
149
|
to: `/users/${unref(route).params._id}/orders/${order._id}`
|
|
144
150
|
}, {
|
|
145
151
|
default: withCtx(() => [
|
|
146
|
-
createVNode(_sfc_main$
|
|
152
|
+
createVNode(_sfc_main$7, {
|
|
147
153
|
orderId: order._id,
|
|
148
154
|
status: order.status,
|
|
149
155
|
createdAt: order.createdAt,
|