@ozdao/martyrs 0.2.564 → 0.2.565
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/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/Client.vue.js +2 -2
- 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/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 +1 -1
- 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/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/cards/AlbumCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +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/pages/Album.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +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/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 +11 -12
- 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 +38 -23
- 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/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/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/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/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/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/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/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/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
|
@@ -4,30 +4,102 @@
|
|
|
4
4
|
<h2>{{ route.params._id ? 'Edit' : 'Add' }} Rent</h2>
|
|
5
5
|
</header>
|
|
6
6
|
|
|
7
|
-
<Popup
|
|
8
|
-
title="Add Product to Rent"
|
|
9
|
-
@close-popup="closeProductsPopup"
|
|
7
|
+
<Popup
|
|
8
|
+
title="Add Product to Rent"
|
|
9
|
+
@close-popup="closeProductsPopup"
|
|
10
10
|
:isPopupOpen="isOpenProductsPopup"
|
|
11
|
-
class="bg-white w-
|
|
11
|
+
class="bg-white w-100 w-max-30r radius-medium pd-medium"
|
|
12
12
|
>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
<Feed
|
|
14
|
+
:search="{
|
|
15
|
+
class: 'bg-light radius-small'
|
|
16
|
+
}"
|
|
17
|
+
:states="{
|
|
18
|
+
empty: {
|
|
19
|
+
title: 'No Products Found',
|
|
20
|
+
description: 'No products available for rent.'
|
|
21
|
+
}
|
|
22
|
+
}"
|
|
23
|
+
:store="{
|
|
24
|
+
read: (options) => products.actions.read(options),
|
|
25
|
+
state: null
|
|
26
|
+
}"
|
|
27
|
+
:options="{
|
|
28
|
+
owner: route.params._id,
|
|
29
|
+
listing: 'rent'
|
|
30
|
+
}"
|
|
31
|
+
v-slot="{ items }"
|
|
32
|
+
class="flex-column flex gap-thin h-max-20r o-scroll"
|
|
33
|
+
>
|
|
34
|
+
<CardOrderItem
|
|
35
|
+
v-for="(product, index) in items"
|
|
36
|
+
:key="`${product._id}_${product.variant || 'no-variant'}_${index}`"
|
|
37
|
+
:editable="false"
|
|
38
|
+
:productId="product._id"
|
|
39
|
+
:variantId="product.variant"
|
|
40
|
+
:images="product.images"
|
|
41
|
+
:name="product.name"
|
|
42
|
+
:quantity="product.quantity || 1"
|
|
43
|
+
:unit="product.unit"
|
|
44
|
+
:dates="product.date"
|
|
45
|
+
:listing="product.listing"
|
|
46
|
+
:price="product.price"
|
|
47
|
+
@click="() => selectProduct(product)"
|
|
48
|
+
class="bg-light pd-small radius-small w-100"
|
|
49
|
+
/>
|
|
50
|
+
</Feed>
|
|
51
|
+
</Popup>
|
|
52
|
+
|
|
53
|
+
<!-- Popup for selecting variant of the product -->
|
|
54
|
+
<Popup
|
|
55
|
+
title="Select variant"
|
|
56
|
+
@close-popup="closeVariantsPopup"
|
|
57
|
+
:isPopupOpen="isVariantsPopupOpen"
|
|
58
|
+
class="bg-white w-100 w-max-30r radius-medium pd-medium"
|
|
59
|
+
>
|
|
60
|
+
<Feed
|
|
61
|
+
:store="variants"
|
|
62
|
+
:options="{
|
|
63
|
+
product: selectedProduct._id,
|
|
64
|
+
}"
|
|
65
|
+
:skeleton="{
|
|
66
|
+
structure: [
|
|
67
|
+
{ block: 'text', size: 'small' },
|
|
68
|
+
{ block: 'text', size: 'medium' },
|
|
69
|
+
{ block: 'text', size: 'small' }
|
|
70
|
+
]
|
|
71
|
+
}"
|
|
72
|
+
:states="{
|
|
73
|
+
empty: {
|
|
74
|
+
title: 'No variants',
|
|
75
|
+
description: 'Create your first variant'
|
|
76
|
+
}
|
|
77
|
+
}"
|
|
78
|
+
v-slot="{ items }"
|
|
79
|
+
>
|
|
80
|
+
<div class="gap-thin flex flex-column">
|
|
81
|
+
<div
|
|
82
|
+
v-for="(variant, index) in items"
|
|
83
|
+
:key="index"
|
|
84
|
+
@click="addVariantToRent(variant)"
|
|
85
|
+
class="w-100 cursor-pointer hover-scale-1 bg-light pd-small radius-small flex-v-center flex-nowrap flex gap-thin"
|
|
86
|
+
>
|
|
87
|
+
<div v-if="variant.images && variant.images.length" class="aspect-1x1 h-3r radius-small o-hidden">
|
|
88
|
+
<img
|
|
89
|
+
:src="(FILE_SERVER_URL || '') + variant.images[0]"
|
|
90
|
+
class="w-100 h-100 object-fit-cover"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
<div>
|
|
94
|
+
<p class="t-medium">{{ variant.name || 'Default variant' }}</p>
|
|
95
|
+
<p v-if="variant.attributes && variant.attributes.length" class="t-small t-transp">
|
|
96
|
+
{{ variant.attributes.map(attr => `${attr.name}: ${attr.value}`).join(', ') }}
|
|
97
|
+
</p>
|
|
98
|
+
</div>
|
|
99
|
+
<p class="mn-l-auto">{{ formatPrice(variant.price || variant.cost) }}</p>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</Feed>
|
|
31
103
|
</Popup>
|
|
32
104
|
|
|
33
105
|
<Block title="Rent Period" class="mn-b-semi">
|
|
@@ -38,24 +110,27 @@
|
|
|
38
110
|
</Block>
|
|
39
111
|
|
|
40
112
|
<Block
|
|
41
|
-
title="Rented
|
|
42
|
-
:actions="[{ label: '+', function: openProductsPopup }]"
|
|
113
|
+
title="Rented Product"
|
|
114
|
+
:actions="rents.state.current.product ? [] : [{ label: '+', function: openProductsPopup }]"
|
|
43
115
|
placeholder="No products added yet"
|
|
44
116
|
class="mn-b-semi"
|
|
45
117
|
>
|
|
46
118
|
<CardOrderItem
|
|
47
119
|
v-if="rents.state.current.product"
|
|
48
|
-
:key="rents.state.current.product._id"
|
|
120
|
+
:key="rents.state.current.product._id"
|
|
49
121
|
:productId="rents.state.current.product._id"
|
|
50
122
|
:variantId="rents.state.current.product.variant"
|
|
51
123
|
:images="rents.state.current.product.images"
|
|
52
124
|
:name="rents.state.current.product.name"
|
|
53
125
|
:quantity="rents.state.current.product.quantity || 1"
|
|
54
126
|
:unit="rents.state.current.product.unit"
|
|
55
|
-
:dates="
|
|
127
|
+
:dates="{
|
|
128
|
+
start: rents.state.current.startDate,
|
|
129
|
+
end: rents.state.current.endDate
|
|
130
|
+
}"
|
|
56
131
|
:listing="rents.state.current.product.listing"
|
|
57
132
|
:price="rents.state.current.product.price"
|
|
58
|
-
:editable="false"
|
|
133
|
+
:editable="false"
|
|
59
134
|
@click="() => rents.state.current.product = null"
|
|
60
135
|
class="mn-b-small radius-medium bg-white pd-small"
|
|
61
136
|
/>
|
|
@@ -68,9 +143,28 @@
|
|
|
68
143
|
<Block>
|
|
69
144
|
<section class="gap-thin flex-v-center flex-nojustify flex">
|
|
70
145
|
<h3 class="mn-r-auto">Total Days: {{ totalDays }}</h3>
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
|
|
146
|
+
|
|
147
|
+
<Button
|
|
148
|
+
:submit="onSubmit"
|
|
149
|
+
class="pd-small radius-medium bg-main t-black uppercase t-medium"
|
|
150
|
+
>
|
|
151
|
+
Save
|
|
152
|
+
</Button>
|
|
153
|
+
|
|
154
|
+
<Button
|
|
155
|
+
:submit="onReset"
|
|
156
|
+
class="pd-small radius-medium t-white bg-second uppercase t-medium"
|
|
157
|
+
>
|
|
158
|
+
Reset
|
|
159
|
+
</Button>
|
|
160
|
+
|
|
161
|
+
<Button
|
|
162
|
+
v-if="route.params._id"
|
|
163
|
+
:submit="onDelete"
|
|
164
|
+
class="pd-small radius-medium t-white bg-red uppercase t-medium"
|
|
165
|
+
>
|
|
166
|
+
Delete
|
|
167
|
+
</Button>
|
|
74
168
|
</section>
|
|
75
169
|
</Block>
|
|
76
170
|
</div>
|
|
@@ -78,6 +172,7 @@
|
|
|
78
172
|
|
|
79
173
|
<script setup>
|
|
80
174
|
import Block from '@martyrs/src/components/Block/Block.vue';
|
|
175
|
+
import Button from '@martyrs/src/components/Button/Button.vue';
|
|
81
176
|
import Field from '@martyrs/src/components/Field/Field.vue';
|
|
82
177
|
import Feed from '@martyrs/src/components/Feed/Feed.vue';
|
|
83
178
|
import Popup from '@martyrs/src/components/Popup/Popup.vue';
|
|
@@ -86,15 +181,21 @@ import CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrd
|
|
|
86
181
|
|
|
87
182
|
import { computed, onMounted, ref } from 'vue';
|
|
88
183
|
import { useRoute, useRouter } from 'vue-router';
|
|
184
|
+
import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';
|
|
185
|
+
|
|
89
186
|
import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';
|
|
90
187
|
import * as rents from '@martyrs/src/modules/rents/views/store/rents.store';
|
|
91
188
|
import * as products from '@martyrs/src/modules/products/store/products.js';
|
|
189
|
+
import variants from '@martyrs/src/modules/products/store/variants.store.js';
|
|
92
190
|
|
|
93
191
|
const route = useRoute();
|
|
94
192
|
const router = useRouter();
|
|
193
|
+
const { formatPrice } = useGlobalMixins();
|
|
95
194
|
|
|
96
195
|
const Products = ref(products.state.all);
|
|
97
196
|
const isOpenProductsPopup = ref(false);
|
|
197
|
+
const isVariantsPopupOpen = ref(false);
|
|
198
|
+
const selectedProduct = ref({});
|
|
98
199
|
|
|
99
200
|
const totalDays = computed(() => {
|
|
100
201
|
const start = new Date(rents.state.current.startDate);
|
|
@@ -104,12 +205,60 @@ const totalDays = computed(() => {
|
|
|
104
205
|
return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
105
206
|
});
|
|
106
207
|
|
|
107
|
-
function openProductsPopup() {
|
|
108
|
-
|
|
208
|
+
function openProductsPopup() {
|
|
209
|
+
isOpenProductsPopup.value = true;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function closeProductsPopup() {
|
|
213
|
+
isOpenProductsPopup.value = false;
|
|
214
|
+
}
|
|
109
215
|
|
|
110
|
-
function
|
|
111
|
-
|
|
216
|
+
function closeVariantsPopup() {
|
|
217
|
+
isVariantsPopupOpen.value = false;
|
|
218
|
+
selectedProduct.value = {};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function selectProduct(product) {
|
|
222
|
+
selectedProduct.value = product;
|
|
112
223
|
closeProductsPopup();
|
|
224
|
+
|
|
225
|
+
// If product has only one variant, add it directly without showing popup
|
|
226
|
+
if (product.variants && product.variants.length === 1) {
|
|
227
|
+
addVariantToRent(product.variants[0]);
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// If product has multiple variants or no variants defined, show popup
|
|
232
|
+
isVariantsPopupOpen.value = true;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function formatProductName(product, variant) {
|
|
236
|
+
if (!variant || product.variants?.length === 1 && !(variant.attributes?.length))
|
|
237
|
+
return product.name;
|
|
238
|
+
|
|
239
|
+
const attrs = variant.attributes?.map(a => a.value).filter(Boolean);
|
|
240
|
+
if (attrs?.length) {
|
|
241
|
+
return `${product.name} / ${attrs.join(' / ')}`;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Если variant.name уже содержит product.name, не дублируем
|
|
245
|
+
return variant.name || product.name;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function addVariantToRent(variant) {
|
|
249
|
+
// Create product object with variant information
|
|
250
|
+
rents.state.current.product = {
|
|
251
|
+
_id: selectedProduct.value._id,
|
|
252
|
+
variant: variant._id,
|
|
253
|
+
name: formatProductName(selectedProduct.value, variant),
|
|
254
|
+
images: variant.images || selectedProduct.value.images || [],
|
|
255
|
+
price: variant.price || variant.cost || 0,
|
|
256
|
+
unit: variant.unit || 'pcs',
|
|
257
|
+
quantity: 1,
|
|
258
|
+
listing: 'rent'
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
closeVariantsPopup();
|
|
113
262
|
}
|
|
114
263
|
|
|
115
264
|
function updateItem(index, updatedItem) {
|
|
@@ -132,7 +281,7 @@ onMounted(async () => {
|
|
|
132
281
|
rents.mutations.clean();
|
|
133
282
|
}
|
|
134
283
|
|
|
135
|
-
await products.actions.read({
|
|
284
|
+
await products.actions.read({ owner: route.params._id, listing: 'rent', limit: 100 });
|
|
136
285
|
Products.value = products.state.all;
|
|
137
286
|
} catch (error) {
|
|
138
287
|
console.error('Ошибка при загрузке данных:', error);
|
|
@@ -142,22 +291,32 @@ onMounted(async () => {
|
|
|
142
291
|
async function onSubmit() {
|
|
143
292
|
try {
|
|
144
293
|
if (route.params.rent) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
294
|
+
// Update existing rent
|
|
295
|
+
const rentData = {
|
|
296
|
+
_id: rents.state.current._id,
|
|
297
|
+
product: rents.state.current.product._id,
|
|
298
|
+
variant: rents.state.current.product.variant,
|
|
299
|
+
startDate: new Date(rents.state.current.startDate),
|
|
300
|
+
endDate: new Date(rents.state.current.endDate),
|
|
301
|
+
comment: rents.state.current.comment,
|
|
302
|
+
status: rents.state.current.status
|
|
303
|
+
};
|
|
304
|
+
await rents.actions.update(rentData);
|
|
150
305
|
} else {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
306
|
+
// Create new rent - БЕЗ _id!
|
|
307
|
+
const rentData = {
|
|
308
|
+
product: rents.state.current.product._id,
|
|
309
|
+
variant: rents.state.current.product.variant,
|
|
310
|
+
startDate: new Date(rents.state.current.startDate),
|
|
311
|
+
endDate: new Date(rents.state.current.endDate),
|
|
312
|
+
comment: rents.state.current.comment || '',
|
|
313
|
+
status: rents.state.current.status || 'active',
|
|
314
|
+
creator: { type: 'user', target: auth.state.user._id },
|
|
315
|
+
owner: { type: 'organization', target: route.params._id }
|
|
316
|
+
};
|
|
317
|
+
await rents.actions.create(rentData);
|
|
159
318
|
}
|
|
160
|
-
|
|
319
|
+
router.push({ name: 'Rents', params: { _id: route.params._id } });
|
|
161
320
|
} catch (error) {
|
|
162
321
|
console.error('Ошибка при отправке данных:', error);
|
|
163
322
|
}
|
|
@@ -495,7 +495,7 @@ onMounted(async () => {
|
|
|
495
495
|
|
|
496
496
|
// Add click listener to the marker
|
|
497
497
|
marker.addListener('click', () => {
|
|
498
|
-
router.push(
|
|
498
|
+
router.push('/organizations/' + org._id);
|
|
499
499
|
});
|
|
500
500
|
|
|
501
501
|
return marker;
|
|
@@ -568,7 +568,7 @@ const searchInCurrentLocation = async () => {
|
|
|
568
568
|
|
|
569
569
|
// Add click listener to the marker
|
|
570
570
|
marker.addListener('click', () => {
|
|
571
|
-
router.push(
|
|
571
|
+
router.push('/organizations/' + org._id);
|
|
572
572
|
});
|
|
573
573
|
|
|
574
574
|
return marker;
|