@ozdao/martyrs 0.2.564 → 0.2.566
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abac-BPl9Bmf9.js +1527 -0
- package/dist/builder.js +51 -39
- package/dist/{common.schema-GFSlNJo7.js → common.schema-DswiUXKB.js} +1 -1
- package/dist/community.server.js +48 -9
- package/dist/core.server.js +6 -4
- package/dist/{crud-C7FSTUes.js → crud-q1ye5IhV.js} +7 -7
- package/dist/events.server.js +3 -3
- package/dist/gallery.server.js +2 -2
- package/dist/inventory.server.js +4 -6
- package/dist/{main-CmjWiDVF.js → main-B9o1iBAZ.js} +1279 -1287
- package/dist/marketplace.server.js +1 -1
- package/dist/martyrs/dist/main-B9o1iBAZ.js +943 -0
- package/dist/martyrs/dist/main-B9o1iBAZ.js.map +1 -0
- package/dist/martyrs/dist/web-BF3ijvEr.js +55 -0
- package/dist/martyrs/dist/web-BF3ijvEr.js.map +1 -0
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js +96 -0
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js.map +1 -0
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +36 -45
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/Field/{Field.vue2.js → Field.vue.js} +2 -2
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -0
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +2 -2
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js.map +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +3 -4
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/martyrs/src/components/Media/Media.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue.js → SelectMulti.vue2.js} +2 -2
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Tree/Tree.vue.js +6 -3
- package/dist/martyrs/src/components/Tree/Tree.vue.js.map +1 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/auth.client.js +10 -7
- package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +13 -13
- 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 +2 -2
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/router/auth.router.js +116 -0
- package/dist/martyrs/src/modules/auth/views/router/auth.router.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/router/users.router.js +180 -0
- package/dist/martyrs/src/modules/auth/views/router/users.router.js.map +1 -0
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +4 -4
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/martyrs/src/modules/core/locales/en.js +45 -0
- package/dist/martyrs/src/modules/core/locales/en.js.map +1 -1
- package/dist/martyrs/src/modules/core/locales/ru.js +45 -0
- package/dist/martyrs/src/modules/core/locales/ru.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/classes/i18n.manager.js +9 -0
- package/dist/martyrs/src/modules/core/views/classes/i18n.manager.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/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/layouts/App.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +3 -2
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/mixins/mixins.js +1 -2
- package/dist/martyrs/src/modules/core/views/mixins/mixins.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/router/addRoutes.js +6 -1
- package/dist/martyrs/src/modules/core/views/router/addRoutes.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +4 -4
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/events/events.client.js +15 -12
- package/dist/martyrs/src/modules/events/events.client.js.map +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +5 -5
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +95 -0
- package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +6 -3
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +25 -25
- 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 +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +4 -4
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js +31 -6
- package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +121 -206
- 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 +2 -2
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +9 -13
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +167 -246
- 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 +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +136 -221
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +171 -0
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +32 -154
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +96 -0
- package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +55 -27
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/tonar.png.js +5 -0
- package/dist/martyrs/src/modules/music/components/player/tonar.png.js.map +1 -0
- package/dist/martyrs/src/modules/music/store/albums.js +8 -2
- package/dist/martyrs/src/modules/music/store/albums.js.map +1 -1
- package/dist/martyrs/src/modules/music/store/player.js +83 -65
- package/dist/martyrs/src/modules/music/store/player.js.map +1 -1
- package/dist/martyrs/src/modules/music/store/tracks.js +4 -13
- package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +4 -4
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.js +2 -2
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +3 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.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/forms/AddExistingMembersForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +15 -2
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +10 -7
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +7 -6
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +11 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +11 -8
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +211 -61
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +4 -4
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/music.server.js +44 -18
- package/dist/node_modules/.pnpm/{@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1 → @capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4}/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +1 -0
- package/dist/node_modules/.pnpm/@capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
- package/dist/node_modules/.pnpm/{@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1 → @capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4}/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +1 -1
- package/dist/node_modules/.pnpm/{@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1 → @capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4}/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -1
- package/dist/node_modules/.pnpm/{@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1 → @capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4}/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +16 -1
- package/dist/node_modules/.pnpm/@capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
- package/dist/node_modules/.pnpm/{@capacitor_core@7.0.1 → @capacitor_core@7.4.4}/node_modules/@capacitor/core/dist/index.js +2 -1
- package/dist/node_modules/.pnpm/@capacitor_core@7.4.4/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/{@capacitor_device@7.0.0_@capacitor_core@7.0.1 → @capacitor_device@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/device/dist/esm/index.js +1 -1
- package/dist/node_modules/.pnpm/{@capacitor_device@7.0.0_@capacitor_core@7.0.1 → @capacitor_device@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/device/dist/esm/index.js.map +1 -1
- package/dist/node_modules/.pnpm/{@capacitor_device@7.0.0_@capacitor_core@7.0.1 → @capacitor_device@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/device/dist/esm/web.js +1 -1
- package/dist/node_modules/.pnpm/{@capacitor_device@7.0.0_@capacitor_core@7.0.1 → @capacitor_device@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/device/dist/esm/web.js.map +1 -1
- package/dist/node_modules/.pnpm/{@capacitor_keyboard@7.0.0_@capacitor_core@7.0.1 → @capacitor_keyboard@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/keyboard/dist/esm/definitions.js.map +1 -1
- package/dist/node_modules/.pnpm/{@capacitor_keyboard@7.0.0_@capacitor_core@7.0.1 → @capacitor_keyboard@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/keyboard/dist/esm/index.js +1 -1
- package/dist/node_modules/.pnpm/{@capacitor_keyboard@7.0.0_@capacitor_core@7.0.1 → @capacitor_keyboard@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/keyboard/dist/esm/index.js.map +1 -1
- package/dist/node_modules/.pnpm/{@capacitor_push-notifications@7.0.0_@capacitor_core@7.0.1 → @capacitor_push-notifications@7.0.3_@capacitor_core@7.4.4}/node_modules/@capacitor/push-notifications/dist/esm/index.js +1 -1
- package/dist/node_modules/.pnpm/{@capacitor_push-notifications@7.0.0_@capacitor_core@7.0.1 → @capacitor_push-notifications@7.0.3_@capacitor_core@7.4.4}/node_modules/@capacitor/push-notifications/dist/esm/index.js.map +1 -1
- package/dist/node_modules/.pnpm/{capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.0.1 → capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.4.4}/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/index.js +1 -1
- package/dist/node_modules/.pnpm/{capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.0.1 → capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.4.4}/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/index.js.map +1 -1
- package/dist/node_modules/.pnpm/{capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.0.1 → capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.4.4}/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/web.js +1 -1
- package/dist/node_modules/.pnpm/{capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.0.1 → capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.4.4}/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/web.js.map +1 -1
- package/dist/notifications.server.js +0 -3
- package/dist/orders.server.js +5 -6
- package/dist/organizations.server.js +9 -10
- package/dist/products.server.js +27 -26
- package/dist/{queryProcessor-CBQgZycY.js → queryProcessor-C_5Iipam.js} +4 -1
- package/dist/rents.server.js +2 -3
- package/dist/spots.server.js +1 -1
- package/dist/style.css +252 -161
- package/dist/{web-cNKIl_cL.js → web-BF3ijvEr.js} +1 -1
- package/package.json +1 -1
- package/src/builder/modes/ssr.rspack.dev.js +4 -3
- package/src/builder/rspack/rspack.config.api.js +15 -4
- package/src/builder/rspack/rspack.config.base.js +3 -3
- package/src/builder/rspack/rspack.config.ssr.client.js +28 -28
- package/src/builder/templates/page.js +2 -2
- package/src/components/BottomSheet/BottomSheet.vue +4 -4
- package/src/components/Button/Button.vue +50 -37
- package/src/components/FieldPhone/FieldPhone.vue +1 -1
- package/src/components/Loader/Loader.vue +1 -1
- package/src/components/Tree/Tree.vue +6 -3
- package/src/modules/LAYOUT.MD +767 -0
- package/src/modules/PROCESS.md +0 -0
- package/src/modules/TASKS.MD +17 -0
- package/src/modules/auth/auth.client.js +11 -7
- package/src/modules/auth/views/components/pages/SignIn.vue +1 -1
- package/src/modules/auth/views/router/auth.router.js +94 -0
- package/src/modules/auth/views/router/users.router.js +153 -0
- package/src/modules/backoffice/components/partials/Sidebar.vue +7 -7
- package/src/modules/community/community.server.js +8 -0
- package/src/modules/community/policies/blog.policies.js +55 -0
- package/src/modules/community/routes/blog.routes.js +1 -1
- package/src/modules/community/routes/comments.routes.js +1 -1
- package/src/modules/community/routes/reactions.routes.js +1 -4
- package/src/modules/core/controllers/classes/abac/abac.adapter.express.js +206 -124
- package/src/modules/core/controllers/classes/abac/abac.adapter.ws.js +203 -50
- package/src/modules/core/controllers/classes/abac/abac.core.js +127 -36
- package/src/modules/core/controllers/classes/abac/abac.fields.js +144 -179
- package/src/modules/core/controllers/classes/abac/abac.js +201 -10
- package/src/modules/core/controllers/classes/abac/abac.policies.js +147 -57
- package/src/modules/core/controllers/classes/crud/crud.policies.js +5 -5
- package/src/modules/core/controllers/policies/core.policies.js +5 -2
- package/src/modules/core/controllers/utils/queryProcessor.js +4 -1
- package/src/modules/core/core.server.js +1 -0
- package/src/modules/core/locales/en.js +45 -0
- package/src/modules/core/locales/ru.js +45 -0
- package/src/modules/core/models/schemas/common.schema.js +1 -1
- package/src/modules/core/views/classes/i18n.manager.js +13 -0
- package/src/modules/core/views/components/layouts/Client.vue +1 -1
- package/src/modules/core/views/components/sections/filters/FilterPrice.vue +81 -0
- package/src/modules/core/views/mixins/mixins.js +1 -2
- package/src/modules/core/views/router/addRoutes.js +6 -1
- package/src/modules/events/events.client.js +3 -0
- package/src/modules/events/routes/events.routes.js +1 -1
- package/src/modules/inventory/components/pages/InventoryEdit.vue +3 -3
- package/src/modules/inventory/policies/inventory.policies.js +1 -1
- package/src/modules/inventory/routes/inventory.routes.js +1 -1
- package/src/modules/marketplace/marketplace.router.js +66 -0
- package/src/modules/marketplace/views/components/layouts/Marketplace.vue +363 -0
- package/src/modules/marketplace/views/components/pages/Catalog.vue +73 -0
- package/src/modules/music/components/blocks/ActionButtons.vue +74 -0
- package/src/modules/music/components/cards/AlbumCard.vue +1 -1
- package/src/modules/music/components/cards/ArtistCardSmall.vue +8 -6
- package/src/modules/music/components/layouts/MusicBottomPlayer.vue +94 -4
- package/src/modules/music/components/pages/Album.vue +55 -67
- package/src/modules/music/components/pages/MusicHome.vue +4 -6
- package/src/modules/music/components/pages/Playlist.vue +61 -70
- package/src/modules/music/components/pages/Track.vue +54 -71
- package/src/modules/music/components/player/FullscreenPlayer.vue +248 -0
- package/src/modules/music/components/player/MusicPlayer.vue +21 -216
- package/src/modules/music/components/player/PlayerControls.vue +112 -0
- package/src/modules/music/components/player/Visualizer.vue +151 -0
- package/src/modules/music/components/player/VolumeControl.vue +75 -23
- package/src/modules/music/components/player/tonar.png +0 -0
- package/src/modules/music/controllers/stream.controller.js +1 -1
- package/src/modules/music/music.server.js +1 -1
- package/src/modules/music/policies/music.policies.js +3 -2
- package/src/modules/music/router/library.router.js +26 -0
- package/src/modules/music/router/music.router.js +176 -0
- package/src/modules/music/routes/albums.routes.js +13 -12
- package/src/modules/music/routes/tracks.routes.js +39 -0
- package/src/modules/music/store/albums.js +10 -2
- package/src/modules/music/store/player.js +101 -89
- package/src/modules/music/store/tracks.js +5 -21
- package/src/modules/notifications/components/elements/NotificationBadge.vue +5 -6
- package/src/modules/notifications/notifications.server.js +1 -3
- package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +5 -0
- package/src/modules/orders/orders.server.js +0 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +2 -2
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +2 -2
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +2 -2
- package/src/modules/organizations/policies/organizations.policies.js +12 -6
- package/src/modules/organizations/routes/organizations.routes.js +1 -3
- package/src/modules/products/components/blocks/CardCategory.vue +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +16 -2
- package/src/modules/products/components/pages/Categories.vue +9 -6
- package/src/modules/products/components/pages/CategoryEdit.vue +8 -4
- package/src/modules/products/components/pages/Product.vue +11 -5
- package/src/modules/products/components/sections/SectionProduct.vue +11 -7
- package/src/modules/products/controllers/categories.controller.js +32 -27
- package/src/modules/products/routes/categories.routes.js +1 -1
- package/src/modules/rents/controllers/routes/rents.routes.js +1 -1
- package/src/modules/rents/views/components/pages/RentsEdit.vue +208 -49
- package/src/modules/spots/components/pages/Map.vue +2 -2
- package/src/styles/config.scss +6 -6
- package/dist/abac-DYoheWuc.js +0 -1031
- package/dist/core.abac-DUPBnlk6.js +0 -298
- package/dist/core.logger-C3q8A9dl.js +0 -51
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/Field/Field.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue2.js.map +0 -1
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +0 -1
- package/dist/martyrs/src/modules/auth/auth.router.js +0 -342
- package/dist/martyrs/src/modules/auth/auth.router.js.map +0 -1
- package/dist/node_modules/.pnpm/@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +0 -1
- package/dist/node_modules/.pnpm/@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +0 -1
- package/dist/node_modules/.pnpm/@capacitor_core@7.0.1/node_modules/@capacitor/core/dist/index.js.map +0 -1
- package/src/modules/auth/auth.router.js +0 -262
- package/src/modules/core/controllers/classes/abac/v2/abac-core-fixed.js +0 -313
- package/src/modules/core/controllers/classes/abac/v2/abac-express-fixed.js +0 -276
- package/src/modules/core/controllers/classes/abac/v2/abac-fields-fixed.js +0 -425
- package/src/modules/core/controllers/classes/abac/v2/abac-main-fixed.js +0 -295
- package/src/modules/core/controllers/classes/abac/v2/abac-policies-fixed.js +0 -316
- package/src/modules/core/controllers/classes/abac/v2/abac-ws-fixed.js +0 -237
- package/src/modules/core/controllers/classes/core.abac.js +0 -310
- package/src/modules/core/controllers/classes/core.crud.js +0 -89
- package/src/modules/governance/reactcode/eslint.config.js +0 -28
- /package/dist/node_modules/.pnpm/{@capacitor_keyboard@7.0.0_@capacitor_core@7.0.1 → @capacitor_keyboard@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/keyboard/dist/esm/definitions.js +0 -0
|
@@ -1,27 +1,45 @@
|
|
|
1
|
-
import { ref, computed, onMounted, createElementBlock, openBlock, createElementVNode, createVNode, toDisplayString, unref, withCtx, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
1
|
+
import { ref, computed, onMounted, createElementBlock, openBlock, createElementVNode, createVNode, toDisplayString, unref, withCtx, Fragment, renderList, createBlock, createCommentVNode, createTextVNode } from "vue";
|
|
2
2
|
import _sfc_main$4 from "../../../../../components/Block/Block.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import _sfc_main$5 from "../../../../../components/Button/Button.vue2.js";
|
|
4
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
|
4
5
|
import _sfc_main$2 from "../../../../../components/Feed/Feed.vue.js";
|
|
5
6
|
import _sfc_main$1 from "../../../../../components/Popup/Popup.vue.js";
|
|
7
|
+
import { useGlobalMixins } from "../../../../core/views/mixins/mixins.js";
|
|
6
8
|
import _sfc_main$3 from "../../../../orders/components/blocks/CardOrderItem.vue.js";
|
|
7
9
|
import { useRoute, useRouter } from "vue-router";
|
|
8
10
|
import { state as state$2 } from "../../../../auth/views/store/auth.js";
|
|
9
11
|
import { state as state$1, actions, mutations } from "../../store/rents.store.js";
|
|
10
12
|
import { state, actions as actions$1 } from "../../../../products/store/products.js";
|
|
13
|
+
import variantsStore from "../../../../products/store/variants.store.js";
|
|
11
14
|
/* empty css */
|
|
12
15
|
const _hoisted_1 = { class: "pd-thin" };
|
|
13
16
|
const _hoisted_2 = { class: "mn-b-medium gap-small flex-v-center flex-nowrap flex" };
|
|
14
|
-
const _hoisted_3 = { class: "
|
|
15
|
-
const _hoisted_4 =
|
|
16
|
-
const _hoisted_5 = {
|
|
17
|
-
|
|
17
|
+
const _hoisted_3 = { class: "gap-thin flex flex-column" };
|
|
18
|
+
const _hoisted_4 = ["onClick"];
|
|
19
|
+
const _hoisted_5 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "aspect-1x1 h-3r radius-small o-hidden"
|
|
22
|
+
};
|
|
23
|
+
const _hoisted_6 = ["src"];
|
|
24
|
+
const _hoisted_7 = { class: "t-medium" };
|
|
25
|
+
const _hoisted_8 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "t-small t-transp"
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_9 = { class: "mn-l-auto" };
|
|
30
|
+
const _hoisted_10 = { class: "flex gap-small" };
|
|
31
|
+
const _hoisted_11 = { class: "gap-thin flex-v-center flex-nojustify flex" };
|
|
32
|
+
const _hoisted_12 = { class: "mn-r-auto" };
|
|
18
33
|
const _sfc_main = {
|
|
19
34
|
__name: "RentsEdit",
|
|
20
35
|
setup(__props) {
|
|
21
36
|
const route = useRoute();
|
|
22
37
|
const router = useRouter();
|
|
38
|
+
const { formatPrice } = useGlobalMixins();
|
|
23
39
|
const Products = ref(state.all);
|
|
24
40
|
const isOpenProductsPopup = ref(false);
|
|
41
|
+
const isVariantsPopupOpen = ref(false);
|
|
42
|
+
const selectedProduct = ref({});
|
|
25
43
|
const totalDays = computed(() => {
|
|
26
44
|
const start = new Date(state$1.current.startDate);
|
|
27
45
|
const end = new Date(state$1.current.endDate);
|
|
@@ -35,9 +53,40 @@ const _sfc_main = {
|
|
|
35
53
|
function closeProductsPopup() {
|
|
36
54
|
isOpenProductsPopup.value = false;
|
|
37
55
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
56
|
+
function closeVariantsPopup() {
|
|
57
|
+
isVariantsPopupOpen.value = false;
|
|
58
|
+
selectedProduct.value = {};
|
|
59
|
+
}
|
|
60
|
+
function selectProduct(product) {
|
|
61
|
+
selectedProduct.value = product;
|
|
40
62
|
closeProductsPopup();
|
|
63
|
+
if (product.variants && product.variants.length === 1) {
|
|
64
|
+
addVariantToRent(product.variants[0]);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
isVariantsPopupOpen.value = true;
|
|
68
|
+
}
|
|
69
|
+
function formatProductName(product, variant) {
|
|
70
|
+
if (!variant || product.variants?.length === 1 && !variant.attributes?.length)
|
|
71
|
+
return product.name;
|
|
72
|
+
const attrs = variant.attributes?.map((a) => a.value).filter(Boolean);
|
|
73
|
+
if (attrs?.length) {
|
|
74
|
+
return `${product.name} / ${attrs.join(" / ")}`;
|
|
75
|
+
}
|
|
76
|
+
return variant.name || product.name;
|
|
77
|
+
}
|
|
78
|
+
function addVariantToRent(variant) {
|
|
79
|
+
state$1.current.product = {
|
|
80
|
+
_id: selectedProduct.value._id,
|
|
81
|
+
variant: variant._id,
|
|
82
|
+
name: formatProductName(selectedProduct.value, variant),
|
|
83
|
+
images: variant.images || selectedProduct.value.images || [],
|
|
84
|
+
price: variant.price || variant.cost || 0,
|
|
85
|
+
unit: variant.unit || "pcs",
|
|
86
|
+
quantity: 1,
|
|
87
|
+
listing: "rent"
|
|
88
|
+
};
|
|
89
|
+
closeVariantsPopup();
|
|
41
90
|
}
|
|
42
91
|
onMounted(async () => {
|
|
43
92
|
try {
|
|
@@ -46,7 +95,7 @@ const _sfc_main = {
|
|
|
46
95
|
} else {
|
|
47
96
|
mutations.clean();
|
|
48
97
|
}
|
|
49
|
-
await actions$1.read({
|
|
98
|
+
await actions$1.read({ owner: route.params._id, listing: "rent", limit: 100 });
|
|
50
99
|
Products.value = state.all;
|
|
51
100
|
} catch (error) {
|
|
52
101
|
console.error("Ошибка при загрузке данных:", error);
|
|
@@ -55,21 +104,30 @@ const _sfc_main = {
|
|
|
55
104
|
async function onSubmit() {
|
|
56
105
|
try {
|
|
57
106
|
if (route.params.rent) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
107
|
+
const rentData = {
|
|
108
|
+
_id: state$1.current._id,
|
|
109
|
+
product: state$1.current.product._id,
|
|
110
|
+
variant: state$1.current.product.variant,
|
|
111
|
+
startDate: new Date(state$1.current.startDate),
|
|
112
|
+
endDate: new Date(state$1.current.endDate),
|
|
113
|
+
comment: state$1.current.comment,
|
|
114
|
+
status: state$1.current.status
|
|
115
|
+
};
|
|
116
|
+
await actions.update(rentData);
|
|
63
117
|
} else {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
118
|
+
const rentData = {
|
|
119
|
+
product: state$1.current.product._id,
|
|
120
|
+
variant: state$1.current.product.variant,
|
|
121
|
+
startDate: new Date(state$1.current.startDate),
|
|
122
|
+
endDate: new Date(state$1.current.endDate),
|
|
123
|
+
comment: state$1.current.comment || "",
|
|
124
|
+
status: state$1.current.status || "active",
|
|
125
|
+
creator: { type: "user", target: state$2.user._id },
|
|
126
|
+
owner: { type: "organization", target: route.params._id }
|
|
127
|
+
};
|
|
128
|
+
await actions.create(rentData);
|
|
72
129
|
}
|
|
130
|
+
router.push({ name: "Rents", params: { _id: route.params._id } });
|
|
73
131
|
} catch (error) {
|
|
74
132
|
console.error("Ошибка при отправке данных:", error);
|
|
75
133
|
}
|
|
@@ -102,30 +160,104 @@ const _sfc_main = {
|
|
|
102
160
|
title: "Add Product to Rent",
|
|
103
161
|
onClosePopup: closeProductsPopup,
|
|
104
162
|
isPopupOpen: isOpenProductsPopup.value,
|
|
105
|
-
class: "bg-white w-
|
|
163
|
+
class: "bg-white w-100 w-max-30r radius-medium pd-medium"
|
|
106
164
|
}, {
|
|
107
165
|
default: withCtx(() => [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
166
|
+
createVNode(_sfc_main$2, {
|
|
167
|
+
search: {
|
|
168
|
+
class: "bg-light radius-small"
|
|
169
|
+
},
|
|
170
|
+
states: {
|
|
171
|
+
empty: {
|
|
172
|
+
title: "No Products Found",
|
|
173
|
+
description: "No products available for rent."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
store: {
|
|
177
|
+
read: (options) => actions$1.read(options),
|
|
178
|
+
state: null
|
|
179
|
+
},
|
|
180
|
+
options: {
|
|
181
|
+
owner: unref(route).params._id,
|
|
182
|
+
listing: "rent"
|
|
183
|
+
},
|
|
184
|
+
class: "flex-column flex gap-thin h-max-20r o-scroll"
|
|
185
|
+
}, {
|
|
186
|
+
default: withCtx(({ items }) => [
|
|
187
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (product, index) => {
|
|
188
|
+
return openBlock(), createBlock(_sfc_main$3, {
|
|
189
|
+
key: `${product._id}_${product.variant || "no-variant"}_${index}`,
|
|
190
|
+
editable: false,
|
|
191
|
+
productId: product._id,
|
|
192
|
+
variantId: product.variant,
|
|
193
|
+
images: product.images,
|
|
194
|
+
name: product.name,
|
|
195
|
+
quantity: product.quantity || 1,
|
|
196
|
+
unit: product.unit,
|
|
197
|
+
dates: product.date,
|
|
198
|
+
listing: product.listing,
|
|
199
|
+
price: product.price,
|
|
200
|
+
onClick: () => selectProduct(product),
|
|
201
|
+
class: "bg-light pd-small radius-small w-100"
|
|
202
|
+
}, null, 8, ["productId", "variantId", "images", "name", "quantity", "unit", "dates", "listing", "price", "onClick"]);
|
|
203
|
+
}), 128))
|
|
204
|
+
]),
|
|
205
|
+
_: 1
|
|
206
|
+
}, 8, ["store", "options"])
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
}, 8, ["isPopupOpen"]),
|
|
210
|
+
createVNode(_sfc_main$1, {
|
|
211
|
+
title: "Select variant",
|
|
212
|
+
onClosePopup: closeVariantsPopup,
|
|
213
|
+
isPopupOpen: isVariantsPopupOpen.value,
|
|
214
|
+
class: "bg-white w-100 w-max-30r radius-medium pd-medium"
|
|
215
|
+
}, {
|
|
216
|
+
default: withCtx(() => [
|
|
217
|
+
createVNode(_sfc_main$2, {
|
|
218
|
+
store: unref(variantsStore),
|
|
219
|
+
options: {
|
|
220
|
+
product: selectedProduct.value._id
|
|
221
|
+
},
|
|
222
|
+
skeleton: {
|
|
223
|
+
structure: [
|
|
224
|
+
{ block: "text", size: "small" },
|
|
225
|
+
{ block: "text", size: "medium" },
|
|
226
|
+
{ block: "text", size: "small" }
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
states: {
|
|
230
|
+
empty: {
|
|
231
|
+
title: "No variants",
|
|
232
|
+
description: "Create your first variant"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}, {
|
|
236
|
+
default: withCtx(({ items }) => [
|
|
237
|
+
createElementVNode("div", _hoisted_3, [
|
|
238
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (variant, index) => {
|
|
239
|
+
return openBlock(), createElementBlock("div", {
|
|
240
|
+
key: index,
|
|
241
|
+
onClick: ($event) => addVariantToRent(variant),
|
|
242
|
+
class: "w-100 cursor-pointer hover-scale-1 bg-light pd-small radius-small flex-v-center flex-nowrap flex gap-thin"
|
|
243
|
+
}, [
|
|
244
|
+
variant.images && variant.images.length ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
245
|
+
createElementVNode("img", {
|
|
246
|
+
src: (_ctx.FILE_SERVER_URL || "") + variant.images[0],
|
|
247
|
+
class: "w-100 h-100 object-fit-cover"
|
|
248
|
+
}, null, 8, _hoisted_6)
|
|
249
|
+
])) : createCommentVNode("", true),
|
|
250
|
+
createElementVNode("div", null, [
|
|
251
|
+
createElementVNode("p", _hoisted_7, toDisplayString(variant.name || "Default variant"), 1),
|
|
252
|
+
variant.attributes && variant.attributes.length ? (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString(variant.attributes.map((attr) => `${attr.name}: ${attr.value}`).join(", ")), 1)) : createCommentVNode("", true)
|
|
253
|
+
]),
|
|
254
|
+
createElementVNode("p", _hoisted_9, toDisplayString(unref(formatPrice)(variant.price || variant.cost)), 1)
|
|
255
|
+
], 8, _hoisted_4);
|
|
124
256
|
}), 128))
|
|
125
|
-
])
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
])
|
|
257
|
+
])
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["store", "options"])
|
|
129
261
|
]),
|
|
130
262
|
_: 1
|
|
131
263
|
}, 8, ["isPopupOpen"]),
|
|
@@ -134,7 +266,7 @@ const _sfc_main = {
|
|
|
134
266
|
class: "mn-b-semi"
|
|
135
267
|
}, {
|
|
136
268
|
default: withCtx(() => [
|
|
137
|
-
createElementVNode("div",
|
|
269
|
+
createElementVNode("div", _hoisted_10, [
|
|
138
270
|
createVNode(Field, {
|
|
139
271
|
field: state$1.current.startDate,
|
|
140
272
|
"onUpdate:field": _cache[0] || (_cache[0] = ($event) => state$1.current.startDate = $event),
|
|
@@ -154,8 +286,8 @@ const _sfc_main = {
|
|
|
154
286
|
_: 1
|
|
155
287
|
}),
|
|
156
288
|
createVNode(_sfc_main$4, {
|
|
157
|
-
title: "Rented
|
|
158
|
-
actions: [{ label: "+", function: openProductsPopup }],
|
|
289
|
+
title: "Rented Product",
|
|
290
|
+
actions: state$1.current.product ? [] : [{ label: "+", function: openProductsPopup }],
|
|
159
291
|
placeholder: "No products added yet",
|
|
160
292
|
class: "mn-b-semi"
|
|
161
293
|
}, {
|
|
@@ -168,7 +300,10 @@ const _sfc_main = {
|
|
|
168
300
|
name: state$1.current.product.name,
|
|
169
301
|
quantity: state$1.current.product.quantity || 1,
|
|
170
302
|
unit: state$1.current.product.unit,
|
|
171
|
-
dates:
|
|
303
|
+
dates: {
|
|
304
|
+
start: state$1.current.startDate,
|
|
305
|
+
end: state$1.current.endDate
|
|
306
|
+
},
|
|
172
307
|
listing: state$1.current.product.listing,
|
|
173
308
|
price: state$1.current.product.price,
|
|
174
309
|
editable: false,
|
|
@@ -195,21 +330,36 @@ const _sfc_main = {
|
|
|
195
330
|
}),
|
|
196
331
|
createVNode(_sfc_main$4, null, {
|
|
197
332
|
default: withCtx(() => [
|
|
198
|
-
createElementVNode("section",
|
|
199
|
-
createElementVNode("h3",
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
class: "bg-main
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
333
|
+
createElementVNode("section", _hoisted_11, [
|
|
334
|
+
createElementVNode("h3", _hoisted_12, "Total Days: " + toDisplayString(totalDays.value), 1),
|
|
335
|
+
createVNode(_sfc_main$5, {
|
|
336
|
+
submit: onSubmit,
|
|
337
|
+
class: "pd-small radius-medium bg-main t-black uppercase t-medium"
|
|
338
|
+
}, {
|
|
339
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
340
|
+
createTextVNode(" Save ")
|
|
341
|
+
])),
|
|
342
|
+
_: 1
|
|
343
|
+
}),
|
|
344
|
+
createVNode(_sfc_main$5, {
|
|
345
|
+
submit: onReset,
|
|
346
|
+
class: "pd-small radius-medium t-white bg-second uppercase t-medium"
|
|
347
|
+
}, {
|
|
348
|
+
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
349
|
+
createTextVNode(" Reset ")
|
|
350
|
+
])),
|
|
351
|
+
_: 1
|
|
352
|
+
}),
|
|
353
|
+
unref(route).params._id ? (openBlock(), createBlock(_sfc_main$5, {
|
|
209
354
|
key: 0,
|
|
210
|
-
|
|
211
|
-
class: "t-white bg-red
|
|
212
|
-
},
|
|
355
|
+
submit: onDelete,
|
|
356
|
+
class: "pd-small radius-medium t-white bg-red uppercase t-medium"
|
|
357
|
+
}, {
|
|
358
|
+
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
359
|
+
createTextVNode(" Delete ")
|
|
360
|
+
])),
|
|
361
|
+
_: 1
|
|
362
|
+
})) : createCommentVNode("", true)
|
|
213
363
|
])
|
|
214
364
|
]),
|
|
215
365
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RentsEdit.vue.js","sources":["../../../../../../../../src/modules/rents/views/components/pages/RentsEdit.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <header class=\"mn-b-medium gap-small flex-v-center flex-nowrap flex\">\n <h2>{{ route.params._id ? 'Edit' : 'Add' }} Rent</h2>\n </header>\n\n <Popup \n title=\"Add Product to Rent\" \n @close-popup=\"closeProductsPopup\" \n :isPopupOpen=\"isOpenProductsPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <div class=\"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big\">\n <Feed\n :search=\"true\"\n :states=\"{ empty: { title: 'No Products Found', description: 'No products available for rent.' } }\"\n :store=\"{ read: (options) => products.actions.read(options) }\"\n :options=\"{ organization: route.params._id, listing: 'rent' }\"\n v-slot=\"{ items }\"\n >\n <CardOrderItem\n v-for=\"product in items\" \n :key=\"product._id\"\n :editable=\"false\" \n :product=\"product\" \n @click=\"addProduct(product)\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <Block title=\"Rent Period\" class=\"mn-b-semi\">\n <div class=\"flex gap-small\">\n <Field v-model:field=\"rents.state.current.startDate\" label=\"Start Date\" type=\"date\" class=\"w-100 bg-white radius-small pd-medium\" />\n <Field v-model:field=\"rents.state.current.endDate\" label=\"End Date\" type=\"date\" class=\"w-100 bg-white radius-small pd-medium\" />\n </div>\n </Block>\n\n <Block\n title=\"Rented Products\"\n :actions=\"[{ label: '+', function: openProductsPopup }]\"\n placeholder=\"No products added yet\"\n class=\"mn-b-semi\"\n >\n <CardOrderItem\n v-if=\"rents.state.current.product\"\n :key=\"rents.state.current.product._id\" \n :productId=\"rents.state.current.product._id\"\n :variantId=\"rents.state.current.product.variant\"\n :images=\"rents.state.current.product.images\"\n :name=\"rents.state.current.product.name\"\n :quantity=\"rents.state.current.product.quantity || 1\"\n :unit=\"rents.state.current.product.unit\"\n :dates=\"rents.state.current.product.date\"\n :listing=\"rents.state.current.product.listing\"\n :price=\"rents.state.current.product.price\"\n :editable=\"false\" \n @click=\"() => rents.state.current.product = null\"\n class=\"mn-b-small radius-medium bg-white pd-small\"\n />\n </Block>\n\n <Block title=\"Comment\" class=\"mn-b-semi\">\n <Field v-model:field=\"rents.state.current.comment\" label=\"Comment\" type=\"textarea\" class=\"w-100 bg-white radius-small pd-medium\" /> \n </Block>\n\n <Block>\n <section class=\"gap-thin flex-v-center flex-nojustify flex\">\n <h3 class=\"mn-r-auto\">Total Days: {{ totalDays }}</h3>\n <a @click=\"onSubmit\" class=\"bg-main button\">Save</a> \n <a @click=\"onReset\" class=\"t-white bg-second button\">Reset</a>\n <a v-if=\"route.params._id\" @click=\"onDelete\" class=\"t-white bg-red button\">Delete</a>\n </section>\n </Block>\n </div>\n</template>\n\n<script setup>\nimport Block from '@martyrs/src/components/Block/Block.vue';\nimport Field from '@martyrs/src/components/Field/Field.vue';\nimport Feed from '@martyrs/src/components/Feed/Feed.vue';\nimport Popup from '@martyrs/src/components/Popup/Popup.vue';\nimport CardPosition from '@martyrs/src/modules/products/components/blocks/CardPosition.vue';\nimport CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue';\n\nimport { computed, onMounted, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\nimport * as rents from '@martyrs/src/modules/rents/views/store/rents.store';\nimport * as products from '@martyrs/src/modules/products/store/products.js';\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst Products = ref(products.state.all);\nconst isOpenProductsPopup = ref(false);\n\nconst totalDays = computed(() => {\n const start = new Date(rents.state.current.startDate);\n const end = new Date(rents.state.current.endDate);\n if (!start || !end) return 0;\n const diffTime = Math.abs(end - start);\n return Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n});\n\nfunction openProductsPopup() { isOpenProductsPopup.value = true; }\nfunction closeProductsPopup() { isOpenProductsPopup.value = false; }\n\nfunction addProduct(product) {\n rents.state.current.product = product\n closeProductsPopup();\n}\n\nfunction updateItem(index, updatedItem) {\n rents.state.current.items[index] = { product: updatedItem.product._id || updatedItem.product, quantity: updatedItem.quantity || 1 };\n}\n\nfunction deleteItem(index) {\n try {\n rents.state.current.items.splice(index, 1);\n } catch (error) {\n console.error('Ошибка при удалении элемента:', error);\n }\n}\n\nonMounted(async () => {\n try {\n if (route.params.rent) {\n await rents.actions.read({ _id: route.params.rent });\n } else {\n rents.mutations.clean();\n }\n\n await products.actions.read({ organization: route.params._id, listing: 'rent', limit: 100 });\n Products.value = products.state.all;\n } catch (error) {\n console.error('Ошибка при загрузке данных:', error);\n }\n});\n\nasync function onSubmit() {\n try {\n if (route.params.rent) {\n let newProduct = rents.state.current\n newProduct.product = rents.state.current.product._id\n newProduct.startDate = new Date(rents.state.current.startDate);\n newProduct.endDate = new Date(rents.state.current.endDate);\n await rents.actions.update(newProduct);\n } else {\n rents.state.current.creator = { type: 'user', target: auth.state.user._id };\n rents.state.current.owner = { type: 'organization', target: route.params._id };\n rents.state.current.owner = { type: 'organization', target: route.params._id };\n let newProduct = rents.state.current\n newProduct.product = rents.state.current.product._id\n newProduct.startDate = new Date(rents.state.current.startDate);\n newProduct.endDate = new Date(rents.state.current.endDate);\n await rents.actions.create(newProduct);\n }\n // router.push({ name: 'Rents', params: { _id: route.params._id } });\n } catch (error) {\n console.error('Ошибка при отправке данных:', error);\n }\n}\n\nasync function onReset() {\n try {\n if (route.params._id) {\n await rents.actions.read({ _id: route.params._id });\n } else {\n rents.mutations.clean();\n }\n } catch (error) {\n console.error('Ошибка при сбросе данных:', error);\n }\n}\n\nasync function onDelete() {\n try {\n await rents.actions.delete(route.params._id);\n router.push({ name: 'Rents', params: { _id: route.params._id } });\n } catch (error) {\n console.error('Ошибка при удалении:', error);\n }\n}\n\n</script>\n\n<style lang=\"scss\">\n.round-stat {\n padding: 1rem;\n border-radius: 5rem;\n width: 3rem;\n height: 3rem;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid rgba(0,0,0,0.1);\n}\n</style>"],"names":["products.state","rents.state","rents.actions","rents.mutations","products.actions","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4FA,UAAM,QAAQ,SAAQ;AACtB,UAAM,SAAS,UAAS;AAExB,UAAM,WAAW,IAAIA,MAAe,GAAG;AACvC,UAAM,sBAAsB,IAAI,KAAK;AAErC,UAAM,YAAY,SAAS,MAAM;AAC/B,YAAM,QAAQ,IAAI,KAAKC,QAAY,QAAQ,SAAS;AACpD,YAAM,MAAM,IAAI,KAAKA,QAAY,QAAQ,OAAO;AAChD,UAAI,CAAC,SAAS,CAAC,IAAK,QAAO;AAC3B,YAAM,WAAW,KAAK,IAAI,MAAM,KAAK;AACrC,aAAO,KAAK,KAAK,YAAY,MAAO,KAAK,KAAK,GAAG;AAAA,IACnD,CAAC;AAED,aAAS,oBAAoB;AAAE,0BAAoB,QAAQ;AAAA,IAAM;AACjE,aAAS,qBAAqB;AAAE,0BAAoB,QAAQ;AAAA,IAAO;AAEnE,aAAS,WAAW,SAAS;AAC3BA,cAAY,QAAQ,UAAU;AAC9B,yBAAkB;AAAA,IACpB;AAc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B,gBAAMA,QAAc,KAAK,EAAE,KAAK,MAAM,OAAO,KAAK;AAAA,QACpD,OAAO;AACLC,oBAAgB,MAAK;AAAA,QACvB;AAAA,MACF,SAAS,OAAO;AACd,gBAAQ,MAAM,6BAA6B,KAAK;AAAA,MAClD;AAAA,IACF;AAEA,mBAAe,WAAW;AACxB,UAAI;AACF,cAAMD,QAAc,OAAO,MAAM,OAAO,GAAG;AAC3C,eAAO,KAAK,EAAE,MAAM,SAAS,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAE,CAAE;AAAA,MAClE,SAAS,OAAO;AACd,gBAAQ,MAAM,wBAAwB,KAAK;AAAA,MAC7C;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"RentsEdit.vue.js","sources":["../../../../../../../../src/modules/rents/views/components/pages/RentsEdit.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <header class=\"mn-b-medium gap-small flex-v-center flex-nowrap flex\">\n <h2>{{ route.params._id ? 'Edit' : 'Add' }} Rent</h2>\n </header>\n\n <Popup\n title=\"Add Product to Rent\"\n @close-popup=\"closeProductsPopup\"\n :isPopupOpen=\"isOpenProductsPopup\"\n class=\"bg-white w-100 w-max-30r radius-medium pd-medium\"\n >\n <Feed\n :search=\"{\n class: 'bg-light radius-small'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'No products available for rent.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n owner: route.params._id,\n listing: 'rent'\n }\"\n v-slot=\"{ items }\"\n class=\"flex-column flex gap-thin h-max-20r o-scroll\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\"\n :key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n :editable=\"false\"\n :productId=\"product._id\"\n :variantId=\"product.variant\"\n :images=\"product.images\"\n :name=\"product.name\"\n :quantity=\"product.quantity || 1\"\n :unit=\"product.unit\"\n :dates=\"product.date\"\n :listing=\"product.listing\"\n :price=\"product.price\"\n @click=\"() => selectProduct(product)\"\n class=\"bg-light pd-small radius-small w-100\"\n />\n </Feed>\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=\"addVariantToRent(variant)\"\n class=\"w-100 cursor-pointer hover-scale-1 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=\"t-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 title=\"Rent Period\" class=\"mn-b-semi\">\n <div class=\"flex gap-small\">\n <Field v-model:field=\"rents.state.current.startDate\" label=\"Start Date\" type=\"date\" class=\"w-100 bg-white radius-small pd-medium\" />\n <Field v-model:field=\"rents.state.current.endDate\" label=\"End Date\" type=\"date\" class=\"w-100 bg-white radius-small pd-medium\" />\n </div>\n </Block>\n\n <Block\n title=\"Rented Product\"\n :actions=\"rents.state.current.product ? [] : [{ label: '+', function: openProductsPopup }]\"\n placeholder=\"No products added yet\"\n class=\"mn-b-semi\"\n >\n <CardOrderItem\n v-if=\"rents.state.current.product\"\n :key=\"rents.state.current.product._id\"\n :productId=\"rents.state.current.product._id\"\n :variantId=\"rents.state.current.product.variant\"\n :images=\"rents.state.current.product.images\"\n :name=\"rents.state.current.product.name\"\n :quantity=\"rents.state.current.product.quantity || 1\"\n :unit=\"rents.state.current.product.unit\"\n :dates=\"{\n start: rents.state.current.startDate,\n end: rents.state.current.endDate\n }\"\n :listing=\"rents.state.current.product.listing\"\n :price=\"rents.state.current.product.price\"\n :editable=\"false\"\n @click=\"() => rents.state.current.product = null\"\n class=\"mn-b-small radius-medium bg-white pd-small\"\n />\n </Block>\n\n <Block title=\"Comment\" class=\"mn-b-semi\">\n <Field v-model:field=\"rents.state.current.comment\" label=\"Comment\" type=\"textarea\" class=\"w-100 bg-white radius-small pd-medium\" /> \n </Block>\n\n <Block>\n <section class=\"gap-thin flex-v-center flex-nojustify flex\">\n <h3 class=\"mn-r-auto\">Total Days: {{ totalDays }}</h3>\n\n <Button\n :submit=\"onSubmit\"\n class=\"pd-small radius-medium bg-main t-black uppercase t-medium\"\n >\n Save\n </Button>\n\n <Button\n :submit=\"onReset\"\n class=\"pd-small radius-medium t-white bg-second uppercase t-medium\"\n >\n Reset\n </Button>\n\n <Button\n v-if=\"route.params._id\"\n :submit=\"onDelete\"\n class=\"pd-small radius-medium t-white bg-red uppercase t-medium\"\n >\n Delete\n </Button>\n </section>\n </Block>\n </div>\n</template>\n\n<script setup>\nimport Block from '@martyrs/src/components/Block/Block.vue';\nimport Button from '@martyrs/src/components/Button/Button.vue';\nimport Field from '@martyrs/src/components/Field/Field.vue';\nimport Feed from '@martyrs/src/components/Feed/Feed.vue';\nimport Popup from '@martyrs/src/components/Popup/Popup.vue';\nimport CardPosition from '@martyrs/src/modules/products/components/blocks/CardPosition.vue';\nimport CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue';\n\nimport { computed, onMounted, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\nimport { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\nimport * as rents from '@martyrs/src/modules/rents/views/store/rents.store';\nimport * as products from '@martyrs/src/modules/products/store/products.js';\nimport variants from '@martyrs/src/modules/products/store/variants.store.js';\n\nconst route = useRoute();\nconst router = useRouter();\nconst { formatPrice } = useGlobalMixins();\n\nconst Products = ref(products.state.all);\nconst isOpenProductsPopup = ref(false);\nconst isVariantsPopupOpen = ref(false);\nconst selectedProduct = ref({});\n\nconst totalDays = computed(() => {\n const start = new Date(rents.state.current.startDate);\n const end = new Date(rents.state.current.endDate);\n if (!start || !end) return 0;\n const diffTime = Math.abs(end - start);\n return Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n});\n\nfunction openProductsPopup() {\n isOpenProductsPopup.value = true;\n}\n\nfunction closeProductsPopup() {\n isOpenProductsPopup.value = false;\n}\n\nfunction closeVariantsPopup() {\n isVariantsPopupOpen.value = false;\n selectedProduct.value = {};\n}\n\nfunction 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 addVariantToRent(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\nfunction 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 if (attrs?.length) {\n return `${product.name} / ${attrs.join(' / ')}`;\n }\n\n // Если variant.name уже содержит product.name, не дублируем\n return variant.name || product.name;\n}\n\nfunction addVariantToRent(variant) {\n // Create product object with variant information\n rents.state.current.product = {\n _id: selectedProduct.value._id,\n variant: variant._id,\n name: formatProductName(selectedProduct.value, variant),\n images: variant.images || selectedProduct.value.images || [],\n price: variant.price || variant.cost || 0,\n unit: variant.unit || 'pcs',\n quantity: 1,\n listing: 'rent'\n };\n\n closeVariantsPopup();\n}\n\nfunction updateItem(index, updatedItem) {\n rents.state.current.items[index] = { product: updatedItem.product._id || updatedItem.product, quantity: updatedItem.quantity || 1 };\n}\n\nfunction deleteItem(index) {\n try {\n rents.state.current.items.splice(index, 1);\n } catch (error) {\n console.error('Ошибка при удалении элемента:', error);\n }\n}\n\nonMounted(async () => {\n try {\n if (route.params.rent) {\n await rents.actions.read({ _id: route.params.rent });\n } else {\n rents.mutations.clean();\n }\n\n await products.actions.read({ owner: route.params._id, listing: 'rent', limit: 100 });\n Products.value = products.state.all;\n } catch (error) {\n console.error('Ошибка при загрузке данных:', error);\n }\n});\n\nasync function onSubmit() {\n try {\n if (route.params.rent) {\n // Update existing rent\n const rentData = {\n _id: rents.state.current._id,\n product: rents.state.current.product._id,\n variant: rents.state.current.product.variant,\n startDate: new Date(rents.state.current.startDate),\n endDate: new Date(rents.state.current.endDate),\n comment: rents.state.current.comment,\n status: rents.state.current.status\n };\n await rents.actions.update(rentData);\n } else {\n // Create new rent - БЕЗ _id!\n const rentData = {\n product: rents.state.current.product._id,\n variant: rents.state.current.product.variant,\n startDate: new Date(rents.state.current.startDate),\n endDate: new Date(rents.state.current.endDate),\n comment: rents.state.current.comment || '',\n status: rents.state.current.status || 'active',\n creator: { type: 'user', target: auth.state.user._id },\n owner: { type: 'organization', target: route.params._id }\n };\n await rents.actions.create(rentData);\n }\n router.push({ name: 'Rents', params: { _id: route.params._id } });\n } catch (error) {\n console.error('Ошибка при отправке данных:', error);\n }\n}\n\nasync function onReset() {\n try {\n if (route.params._id) {\n await rents.actions.read({ _id: route.params._id });\n } else {\n rents.mutations.clean();\n }\n } catch (error) {\n console.error('Ошибка при сбросе данных:', error);\n }\n}\n\nasync function onDelete() {\n try {\n await rents.actions.delete(route.params._id);\n router.push({ name: 'Rents', params: { _id: route.params._id } });\n } catch (error) {\n console.error('Ошибка при удалении:', error);\n }\n}\n\n</script>\n\n<style lang=\"scss\">\n.round-stat {\n padding: 1rem;\n border-radius: 5rem;\n width: 3rem;\n height: 3rem;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid rgba(0,0,0,0.1);\n}\n</style>"],"names":["products.state","rents.state","rents.actions","rents.mutations","products.actions","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8LA,UAAM,QAAQ,SAAQ;AACtB,UAAM,SAAS,UAAS;AACxB,UAAM,EAAE,YAAW,IAAK,gBAAe;AAEvC,UAAM,WAAW,IAAIA,MAAe,GAAG;AACvC,UAAM,sBAAsB,IAAI,KAAK;AACrC,UAAM,sBAAsB,IAAI,KAAK;AACrC,UAAM,kBAAkB,IAAI,EAAE;AAE9B,UAAM,YAAY,SAAS,MAAM;AAC/B,YAAM,QAAQ,IAAI,KAAKC,QAAY,QAAQ,SAAS;AACpD,YAAM,MAAM,IAAI,KAAKA,QAAY,QAAQ,OAAO;AAChD,UAAI,CAAC,SAAS,CAAC,IAAK,QAAO;AAC3B,YAAM,WAAW,KAAK,IAAI,MAAM,KAAK;AACrC,aAAO,KAAK,KAAK,YAAY,MAAO,KAAK,KAAK,GAAG;AAAA,IACnD,CAAC;AAED,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC9B;AAEA,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC9B;AAEA,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAC5B,sBAAgB,QAAQ,CAAA;AAAA,IAC1B;AAEA,aAAS,cAAc,SAAS;AAC9B,sBAAgB,QAAQ;AACxB,yBAAkB;AAGlB,UAAI,QAAQ,YAAY,Q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A,MAClD;AAAA,IACF;AAEA,mBAAe,WAAW;AACxB,UAAI;AACF,cAAMD,QAAc,OAAO,MAAM,OAAO,GAAG;AAC3C,eAAO,KAAK,EAAE,MAAM,SAAS,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAE,CAAE;AAAA,MAClE,SAAS,OAAO;AACd,gBAAQ,MAAM,wBAAwB,KAAK;AAAA,MAC7C;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { reactive, ref, createElementBlock, openBlock, renderSlot, createVNode, withCtx, createElementVNode, createTextVNode } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
|
3
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
-
import Select from "../../../../components/Select/Select.
|
|
3
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
4
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
5
5
|
import { actions } from "../../store/reports.js";
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
__name: "FormReport",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, computed, resolveComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, createBlock, toDisplayString } from "vue";
|
|
2
|
-
/* empty css
|
|
2
|
+
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
/* empty css
|
|
4
|
+
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
const _hoisted_1 = { class: "br-grey-transp-25 radius-small mn-b-small" };
|
|
7
7
|
const _hoisted_2 = {
|
|
@@ -2,7 +2,7 @@ import { ref, onMounted, watch, resolveComponent, createElementBlock, openBlock,
|
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
4
|
/* empty css */
|
|
5
|
-
/* empty css
|
|
5
|
+
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { useStore } from "../../../core/views/store/core.store.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, onMounted, createElementBlock, openBlock, createElementVNode, createVNode, withCtx, createTextVNode } from "vue";
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
3
|
import { Loader } from "../../../../../../node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js";
|
|
4
|
-
import _sfc_main$1 from "../../../../components/Button/Button.
|
|
4
|
+
import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
|
|
5
5
|
import { actions, state as state$1 } from "../../../organizations/store/organizations.js";
|
|
6
6
|
import { useStore } from "../../../core/views/store/core.store.js";
|
|
7
7
|
import { state } from "../../../marketplace/views/store/marketplace.js";
|
|
@@ -432,7 +432,7 @@ const _sfc_main = {
|
|
|
432
432
|
}
|
|
433
433
|
});
|
|
434
434
|
marker.addListener("click", () => {
|
|
435
|
-
router.push(
|
|
435
|
+
router.push("/organizations/" + org._id);
|
|
436
436
|
});
|
|
437
437
|
return marker;
|
|
438
438
|
}
|
|
@@ -494,7 +494,7 @@ const _sfc_main = {
|
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
496
|
marker.addListener("click", () => {
|
|
497
|
-
router.push(
|
|
497
|
+
router.push("/organizations/" + org._id);
|
|
498
498
|
});
|
|
499
499
|
return marker;
|
|
500
500
|
}
|
|
@@ -525,7 +525,7 @@ const _sfc_main = {
|
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
|
-
const Map = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
528
|
+
const Map = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e9370e2c"]]);
|
|
529
529
|
export {
|
|
530
530
|
Map as default
|
|
531
531
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@martyrs/src/components/Button/Button.vue'\n\nimport { state, actions } from '@martyrs/src/modules/organizations/store/organizations.js'\n\nimport { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\nimport * as marketplace from '@martyrs/src/modules/marketplace/views/store/marketplace.js';\n\nconst store = useStore();\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\n location: {\n type: Object,\n default: () => ({ lat: 15.8700, lng: 100.9925 })\n },\n address: {\n type: String,\n default: null\n },\n apiKey: String,\n locale: {\n type: String,\n default: 'en'\n }\n})\n\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || store.core.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || store.core.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || store.core.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || store.core.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || store.core.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || store.core.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["error","GMLoader","marketplace.state","state","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,QAAQ,SAAQ;AAEtB,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,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,MACrC,SAASF,QAAO;AACd,gBAAQ,MAAM,iCAAiCA,MAAK;AAAA,MACtD;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Map.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@martyrs/src/components/Button/Button.vue'\n\nimport { state, actions } from '@martyrs/src/modules/organizations/store/organizations.js'\n\nimport { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\nimport * as marketplace from '@martyrs/src/modules/marketplace/views/store/marketplace.js';\n\nconst store = useStore();\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\n location: {\n type: Object,\n default: () => ({ lat: 15.8700, lng: 100.9925 })\n },\n address: {\n type: String,\n default: null\n },\n apiKey: String,\n locale: {\n type: String,\n default: 'en'\n }\n})\n\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || store.core.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || store.core.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || store.core.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || store.core.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || store.core.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || store.core.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push('/organizations/' + org._id);\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push('/organizations/' + org._id);\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["error","GMLoader","marketplace.state","state","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,QAAQ,SAAQ;AAEtB,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAM,IAAI,IAAI;AAClB,QAAI,UAAU,IAAI,EAAE;AAEpB,QAAI,OAAO,IAAI,CAAC;AAChB,QAAI,QAAQ,IAAI,EAAE;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