@ozdao/martyrs 0.2.470 → 0.2.472
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/{Media-CR0V1zvB.js → Media-DW8RLbfM.js} +1 -1
- package/dist/{Media-C4Ges_Sd.mjs → Media-y_TX6us_.mjs} +1 -1
- package/dist/_virtual/index.cjs +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/chats.server.js +1 -1
- package/dist/chats.server.mjs +1 -1
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/{index-DQqZReAr.js → index-CVXl1rB5.js} +0 -1
- package/dist/{index-DICZTQ-1.mjs → index-Df8vtZx7.mjs} +0 -1
- package/dist/{main-CsZAG5Wz.js → main-CCfQH-Dd.js} +2 -2
- package/dist/{main-CTcal9qN.mjs → main-CgmHzhq5.mjs} +74 -74
- package/dist/{node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_ → martyrs}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +1 -1
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
- package/dist/{node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_ → martyrs}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +1 -1
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs +5 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/{node_modules/.pnpm/uuid@11.1.0 → martyrs}/node_modules/uuid/dist/esm-browser/rng.cjs +4 -4
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js +15 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs +17 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js +17 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs +13 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js +13 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs +8 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
- 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/Skeleton/Skeleton.vue.cjs +5 -5
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.js +5 -5
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.js.map +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue2.cjs → Tab.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Tab/{Tab.vue2.js.map → Tab.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue2.js → Tab.vue.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tree/Tree.vue.cjs +3 -1
- package/dist/martyrs/src/components/Tree/Tree.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Tree/Tree.vue.js +3 -1
- package/dist/martyrs/src/components/Tree/Tree.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs +1 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +1 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs +107 -21
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.js +107 -21
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +10 -14
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +12 -16
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs +7 -13
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js +7 -13
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +6 -7
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +7 -8
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs +11 -5
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +12 -6
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +34 -13
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +35 -14
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +20 -9
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +21 -10
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/notifications.server.js +35 -2
- package/dist/notifications.server.mjs +35 -2
- package/dist/orders.server.js +3 -3
- package/dist/orders.server.mjs +3 -3
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/products.server.js +78 -53
- package/dist/products.server.mjs +78 -53
- package/dist/rents.server.js +1 -1
- package/dist/rents.server.mjs +1 -1
- package/dist/style.css +37 -38
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/package.json +2 -1
- package/src/components/Feed/Feed.vue +2 -7
- package/src/components/Skeleton/Skeleton.vue +4 -5
- package/src/components/Tree/Tree.vue +5 -2
- package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
- package/src/modules/auth/views/store/auth.js +2 -1
- package/src/modules/globals/controllers/classes/globals.crud.js +2 -2
- package/src/modules/globals/views/classes/globals.store.js +119 -31
- package/src/modules/globals/views/components/partials/Navigation.vue +11 -10
- package/src/modules/globals/views/utils/vue-app-renderer.js +7 -16
- package/src/modules/icons/entities/IconMusic.vue +14 -0
- package/src/modules/icons/navigation/IconCheck.vue +31 -0
- package/src/modules/icons/navigation/IconHeart.vue +26 -0
- package/src/modules/icons/navigation/IconPause.vue +31 -0
- package/src/modules/icons/navigation/IconPlay.vue +17 -0
- package/src/modules/icons/navigation/IconRefresh.vue +31 -0
- package/src/modules/icons/navigation/IconShuffle.vue +31 -0
- package/src/modules/icons/navigation/IconVolume.vue +31 -0
- package/src/modules/music/components/SidebarMusic.vue +156 -0
- package/src/modules/music/components/cards/AlbumCard.vue +107 -0
- package/src/modules/music/components/cards/ArtistCard.vue +37 -0
- package/src/modules/music/components/cards/PlaylistCard.vue +100 -0
- package/src/modules/music/components/cards/TrackCard.vue +86 -0
- package/src/modules/music/components/forms/PlaylistForm.vue +156 -0
- package/src/modules/music/components/forms/SearchForm.vue +82 -0
- package/src/modules/music/components/forms/UploadForm.vue +313 -0
- package/src/modules/music/components/layouts/MusicLayout.vue +137 -0
- package/src/modules/music/components/lists/AlbumList.vue +25 -0
- package/src/modules/music/components/lists/ArtistList.vue +25 -0
- package/src/modules/music/components/lists/PlaylistList.vue +25 -0
- package/src/modules/music/components/lists/TrackList.vue +175 -0
- package/src/modules/music/components/pages/AlbumDetail.vue +265 -0
- package/src/modules/music/components/pages/ArtistDetail.vue +247 -0
- package/src/modules/music/components/pages/MusicHome.vue +177 -0
- package/src/modules/music/components/pages/MusicLibrary.vue +192 -0
- package/src/modules/music/components/pages/MusicUpload.vue +44 -0
- package/src/modules/music/components/pages/PlaylistDetail.vue +504 -0
- package/src/modules/music/components/pages/SearchResults.vue +397 -0
- package/src/modules/music/components/pages/TrackDetail.vue +143 -0
- package/src/modules/music/components/player/MusicPlayer.vue +202 -0
- package/src/modules/music/components/player/TrackProgress.vue +110 -0
- package/src/modules/music/components/player/VolumeControl.vue +98 -0
- package/src/modules/music/controllers/album.controller.js +98 -0
- package/src/modules/music/controllers/artist.controller.js +111 -0
- package/src/modules/music/controllers/genre.controller.js +71 -0
- package/src/modules/music/controllers/music.controller.js +174 -0
- package/src/modules/music/controllers/playlist.controller.js +182 -0
- package/src/modules/music/controllers/search.controller.js +103 -0
- package/src/modules/music/controllers/stream.controller.js +106 -0
- package/src/modules/music/models/album.model.js +61 -0
- package/src/modules/music/models/artist.model.js +67 -0
- package/src/modules/music/models/genre.model.js +42 -0
- package/src/modules/music/models/play-history.model.js +51 -0
- package/src/modules/music/models/playlist.model.js +69 -0
- package/src/modules/music/models/track.model.js +94 -0
- package/src/modules/music/music.client.js +186 -0
- package/src/modules/music/music.server.js +114 -0
- package/src/modules/music/policies/music.policies.js +84 -0
- package/src/modules/music/router/music.js +77 -0
- package/src/modules/music/routes/album.routes.js +62 -0
- package/src/modules/music/routes/artist.routes.js +67 -0
- package/src/modules/music/routes/genre.routes.js +60 -0
- package/src/modules/music/routes/music.routes.js +145 -0
- package/src/modules/music/routes/playlist.routes.js +99 -0
- package/src/modules/music/routes/search.routes.js +10 -0
- package/src/modules/music/routes/stream.routes.js +38 -0
- package/src/modules/music/store/albums.js +200 -0
- package/src/modules/music/store/artists.js +180 -0
- package/src/modules/music/store/player.js +397 -0
- package/src/modules/music/store/playlists.js +211 -0
- package/src/modules/music/store/search.js +126 -0
- package/src/modules/music/store/tracks.js +230 -0
- package/src/modules/music/websocket/streaming.handler.js +151 -0
- package/src/modules/notifications/controllers/notifications.controller.js +44 -1
- package/src/modules/notifications/notifications.server.js +0 -1
- package/src/modules/notifications/routes/notifications.routes.js +3 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +0 -2
- package/src/modules/products/components/blocks/CardCategory.vue +5 -4
- package/src/modules/products/components/pages/Categories.vue +38 -20
- package/src/modules/products/components/pages/CategoryEdit.vue +16 -7
- package/src/modules/products/components/pages/ProductEdit.vue +1 -0
- package/src/modules/products/controllers/categories.controller.js +155 -103
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +0 -1
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs +0 -6
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +0 -6
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +0 -15
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs +0 -11
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +0 -11
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs +0 -21
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +0 -21
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js.map +0 -1
- /package/dist/{node_modules/.pnpm/@vue_shared@3.5.13 → martyrs}/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +0 -0
- /package/dist/{node_modules/.pnpm/@vue_shared@3.5.13 → martyrs}/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.cjs +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.cjs.map +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.js +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.store.js","sources":["../../../../../../../src/modules/globals/views/classes/globals.store.js"],"sourcesContent":["import { reactive } from 'vue';\n\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n\nclass Store {\n constructor(apiUrl) {\n this.state = reactive({\n items: [],\n current: {}\n });\n this.apiUrl = apiUrl;\n }\n\n // Simplified request method to avoid repetition and enhance maintainability\n async request(endpoint, options = {}) {\n const url = endpoint.startsWith('http') ? endpoint : `${this.apiUrl}${endpoint}`;\n\n const defaultOptions = {\n credentials: 'include', // Assumes credentials needed for each request\n headers: {}\n };\n const finalOptions = {\n ...defaultOptions,\n ...options\n };\n\n // Set default headers if content type is not explicitly set\n if (!finalOptions.headers['Content-Type'] && options.body) {\n finalOptions.headers['Content-Type'] = 'application/json';\n finalOptions.body = JSON.stringify(options.body);\n }\n\n try {\n const response = await fetch(url, finalOptions);\n\n if (!response.ok) {\n const errorData = await response.json();\n const error = new Error(errorData.message || 'Unknown error');\n error.errorCode = errorData.errorCode || 'UNKNOWN_ERROR';\n throw error;\n }\n\n return await response.json();\n\n } catch (error) {\n console.error(error);\n setError(error);\n throw error;\n }\n }\n\n async create(item) {\n return await this.request('/create', {\n method: 'POST',\n body: item\n });\n }\n\n async read(options = {}) {\n const queryParams = new URLSearchParams(options).toString();\n \n return await this.request(`/read?${queryParams}`);\n }\n\n async update(item) {\n return await this.request('/update', {\n method: 'PUT',\n body: item\n });\n }\n\n async delete(item) {\n return await this.request(`/delete`, {\n method: 'DELETE',\n body: item\n });\n }\n\n // Enhanced Mutations utilizing Vue reactivity system efficiently \n setItems(items, state) {\n const targetState = state || this.state.items;\n\n state.splice(0, state.length, ...items);\n }\n\n addItem(item, state, property = '_id') {\n const targetState = state || this.state.items;\n const existingItemIndex = targetState.findIndex(i => i[property] === item[property]);\n \n if (existingItemIndex === -1) {\n targetState.splice(0, 0, item);\n } else {\n Object.assign(targetState[existingItemIndex], item);\n }\n }\n\n updateItem(item, state, property = '_id') {\n const targetState = state || this.state.items;\n const index = targetState.findIndex(i => i[property] === item[property]);\n if (index !== -1) {\n targetState.splice(index, 1, item);\n }\n }\n\n removeItem(item, state, property = '_id') {\n const targetState = state || this.state.items;\n // Поиск и удаление элемента по указанному ключу\n const index = targetState.findIndex(i => i[property] === item[property]);\n if (index !== -1) {\n targetState.splice(index, 1);\n }\n }\n}\n\nexport default Store;"],"names":[],"mappings":";;AAKA,MAAM,MAAM;AAAA,EACV,YAAY,QAAQ;AAClB,SAAK,QAAQ,SAAS;AAAA,MACpB,OAAO,CAAE;AAAA,MACT,SAAS,CAAA;AAAA,IACf,CAAK;AACD,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA,EAGE,MAAM,QAAQ,UAAU,UAAU,IAAI;AACpC,UAAM,MAAM,SAAS,WAAW,MAAM,IAAI,WAAW,GAAG,KAAK,MAAM,GAAG,QAAQ;AAE9E,UAAM,iBAAiB;AAAA,MACrB,aAAa;AAAA;AAAA,MACb,SAAS,CAAA;AAAA,IACV;AACD,UAAM,eAAe;AAAA,MACnB,GAAG;AAAA,MACH,GAAG;AAAA,IACJ;AAGD,QAAI,CAAC,aAAa,QAAQ,cAAc,KAAK,QAAQ,MAAM;AACzD,mBAAa,QA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M,KAAK,QAAQ,CAAC;AAEnF,QAAI,sBAAsB,IAAI;AAC5B,kBAAY,OAAO,GAAG,GAAG,IAAI;AAAA,IACnC,OAAW;AACL,aAAO,OAAO,YAAY,iBAAiB,GAAG,IAAI;AAAA,IACxD;AAAA,EACA;AAAA,EAEE,WAAW,MAAM,OAAO,WAAW,OAAO;AACtC,UAAM,cAAc,SAAS,KAAK,MAAM;AACxC,UAAM,QAAQ,YAAY,UAAU,OAAK,EAAE,QAAQ,MAAM,KAAK,QAAQ,CAAC;AACvE,QAAI,UAAU,IAAI;AAChB,kBAAY,OAAO,OAAO,GAAG,IAAI;AAAA,IACzC;AAAA,EACA;AAAA,EAEE,WAAW,MAAM,OAAO,WAAW,OAAO;AACxC,UAAM,cAAc,SAAS,KAAK,MAAM;AAExC,UAAM,QAAQ,YAAY,UAAU,OAAK,EAAE,QAAQ,MAAM,KAAK,QAAQ,CAAC;AACvE,QAAI,UAAU,IAAI;AAChB,kBAAY,OAAO,OAAO,CAAC;AAAA,IACjC;AAAA,EACA;AACA;"}
|
|
1
|
+
{"version":3,"file":"globals.store.js","sources":["../../../../../../../src/modules/globals/views/classes/globals.store.js"],"sourcesContent":["import { reactive } from 'vue';\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals';\n\nclass Store {\n constructor(apiUrl) {\n this.state = reactive({\n items: [],\n current: {}\n });\n this.apiUrl = apiUrl;\n console.log(`Store initialized with API URL: ${apiUrl}`);\n }\n\n // Simplified request method with enhanced debugging\n async request(endpoint, options = {}) {\n const url = endpoint.startsWith('http') ? endpoint : `${this.apiUrl}${endpoint}`;\n console.log(`Making request to: ${url}`, { method: options.method || 'GET' });\n \n const defaultOptions = {\n credentials: 'include', // Assumes credentials needed for each request\n headers: {}\n };\n const finalOptions = {\n ...defaultOptions,\n ...options\n };\n\n // Set default headers if content type is not explicitly set\n if (!finalOptions.headers['Content-Type'] && options.body) {\n finalOptions.headers['Content-Type'] = 'application/json';\n finalOptions.body = JSON.stringify(options.body);\n }\n\n try {\n console.log('Request options:', JSON.stringify({\n method: finalOptions.method,\n headers: finalOptions.headers,\n bodyLength: finalOptions.body ? JSON.stringify(finalOptions.body).length : 0\n }));\n \n const response = await fetch(url, finalOptions);\n console.log(`Response status: ${response.status}`);\n \n // Log response headers for debugging\n const responseHeaders = {};\n response.headers.forEach((value, key) => {\n responseHeaders[key] = value;\n });\n console.log('Response headers:', responseHeaders);\n\n if (!response.ok) {\n let errorData;\n try {\n errorData = await response.json();\n } catch (jsonError) {\n console.error('Failed to parse error response as JSON:', jsonError);\n errorData = { message: 'Failed to parse server response' };\n }\n \n console.error('Server returned error:', errorData);\n const error = new Error(errorData.message || `Server returned ${response.status}`);\n error.status = response.status;\n error.errorCode = errorData.errorCode || 'UNKNOWN_ERROR';\n error.responseText = await response.text().catch(() => 'Unable to get response text');\n throw error;\n }\n\n const data = await response.json();\n console.log('Response data received successfully');\n return data;\n } catch (error) {\n console.error('Request failed:', error);\n if (error.name === 'TypeError' && error.message.includes('Failed to fetch')) {\n console.error('Network error detected. This might indicate a CORS issue, network connectivity problem, or the server is down.');\n const enhancedError = new Error('Network error: Unable to connect to the server');\n enhancedError.originalError = error;\n setError(enhancedError);\n throw enhancedError;\n }\n \n setError(error);\n throw error;\n }\n }\n\n async create(item) {\n console.log('Creating item:', item);\n try {\n const result = await this.request('/create', {\n method: 'POST',\n body: item\n });\n console.log('Create operation succeeded:', result);\n return result;\n } catch (error) {\n console.error('Create operation failed:', error);\n // Log specific error details\n if (error.status) {\n console.error(`HTTP Status: ${error.status}`);\n }\n if (error.errorCode) {\n console.error(`Error Code: ${error.errorCode}`);\n }\n setError(error);\n throw error;\n }\n }\n\n async read(options = {}) {\n console.log('Reading items with options:', options);\n try {\n const queryParams = new URLSearchParams(options).toString();\n const result = await this.request(`/read?${queryParams}`);\n console.log(`Read operation returned ${result.length || 0} items`);\n return result;\n } catch (error) {\n console.error('Read operation failed:', error);\n setError(error);\n throw error;\n }\n }\n\n async update(item) {\n console.log('Updating item:', item);\n try {\n const result = await this.request('/update', {\n method: 'PUT',\n body: item\n });\n console.log('Update operation succeeded:', result);\n return result;\n } catch (error) {\n console.error('Update operation failed:', error);\n setError(error);\n throw error;\n }\n }\n\n async delete(item) {\n console.log('Deleting item:', item);\n try {\n const result = await this.request(`/delete`, {\n method: 'DELETE',\n body: item\n });\n console.log('Delete operation succeeded');\n return result;\n } catch (error) {\n console.error('Delete operation failed:', error);\n setError(error);\n throw error;\n }\n }\n\n // Enhanced Mutations utilizing Vue reactivity system efficiently \n setItems(items, state) {\n console.log(`Setting ${items.length} items in state`);\n const targetState = state || this.state.items;\n if (Array.isArray(targetState)) {\n targetState.splice(0, targetState.length, ...items);\n } else {\n console.error('Target state is not an array in setItems');\n }\n }\n\n addItem(item, state, property = '_id') {\n const targetState = state || this.state.items;\n const existingItemIndex = targetState.findIndex(i => i[property] === item[property]);\n \n if (existingItemIndex === -1) {\n console.log('Adding new item to state');\n targetState.splice(0, 0, item);\n } else {\n console.log('Updating existing item in state');\n Object.assign(targetState[existingItemIndex], item);\n }\n }\n\n updateItem(item, state, property = '_id') {\n const targetState = state || this.state.items;\n const index = targetState.findIndex(i => i[property] === item[property]);\n if (index !== -1) {\n console.log('Replacing item in state');\n targetState.splice(index, 1, item);\n } else {\n console.log('Item not found for update in state');\n }\n }\n\n removeItem(item, state, property = '_id') {\n const targetState = state || this.state.items;\n // Поиск и удаление элемента по указанному ключу\n const index = targetState.findIndex(i => i[property] === item[property]);\n if (index !== -1) {\n console.log('Removing item from state');\n targetState.splice(index, 1);\n } else {\n console.log('Item not found for removal from state');\n }\n }\n}\n\nexport default Store;"],"names":[],"mappings":";;AAIA,MAAM,MAAM;AAAA,EACV,YAAY,QAAQ;AAClB,SAAK,QAAQ,SAAS;AAAA,MACpB,OAAO,CAAE;AAAA,MACT,SAAS,CAAA;AAAA,IACf,CAAK;AACD,SAAK,SAAS;AACd,YAAQ,IAAI,mCAAmC,MAAM,EAAE;AAAA,EAC3D;AAAA;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AAC5B,cAAQ,IAAI,0BAA0B;AACtC,kBAAY,OAAO,GAAG,GAAG,IAAI;AAAA,IACnC,OAAW;AACL,cAAQ,IAAI,iCAAiC;AAC7C,aAAO,OAAO,YAAY,iBAAiB,GAAG,IAAI;AAAA,IACxD;AAAA,EACA;AAAA,EAEE,WAAW,MAAM,OAAO,WAAW,OAAO;AACxC,UAAM,cAAc,SAAS,KAAK,MAAM;AACxC,UAAM,QAAQ,YAAY,UAAU,OAAK,EAAE,QAAQ,MAAM,KAAK,QAAQ,CAAC;AACvE,QAAI,UAAU,IAAI;AAChB,cAAQ,IAAI,yBAAyB;AACrC,kBAAY,OAAO,OAAO,GAAG,IAAI;AAAA,IACvC,OAAW;AACL,cAAQ,IAAI,oCAAoC;AAAA,IACtD;AAAA,EACA;AAAA,EAEE,WAAW,MAAM,OAAO,WAAW,OAAO;AACxC,UAAM,cAAc,SAAS,KAAK,MAAM;AAExC,UAAM,QAAQ,YAAY,UAAU,OAAK,EAAE,QAAQ,MAAM,KAAK,QAAQ,CAAC;AACvE,QAAI,UAAU,IAAI;AAChB,cAAQ,IAAI,0BAA0B;AACtC,kBAAY,OAAO,OAAO,CAAC;AAAA,IACjC,OAAW;AACL,cAAQ,IAAI,uCAAuC;AAAA,IACzD;AAAA,EACA;AACA;"}
|
|
@@ -51,6 +51,7 @@ const _sfc_main = {
|
|
|
51
51
|
],
|
|
52
52
|
setup(__props, { emit: __emit }) {
|
|
53
53
|
const router = vueRouter.useRouter();
|
|
54
|
+
const route = vueRouter.useRoute();
|
|
54
55
|
const props = __props;
|
|
55
56
|
const emits = __emit;
|
|
56
57
|
const expandedSections = vue.ref([]);
|
|
@@ -74,16 +75,11 @@ const _sfc_main = {
|
|
|
74
75
|
const isSectionExpanded = (title) => {
|
|
75
76
|
return expandedSections.value.includes(title);
|
|
76
77
|
};
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
|
|
78
|
+
const processRoute = (route2) => {
|
|
79
|
+
if (typeof route2 === "function") {
|
|
80
|
+
return route2(globals.state, auth.state);
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
-
const processRoute = (route) => {
|
|
83
|
-
if (typeof route === "function") {
|
|
84
|
-
return route(globals.state, auth.state);
|
|
85
|
-
}
|
|
86
|
-
return route;
|
|
82
|
+
return route2;
|
|
87
83
|
};
|
|
88
84
|
return (_ctx, _cache) => {
|
|
89
85
|
return vue.openBlock(), vue.createElementBlock("nav", {
|
|
@@ -121,10 +117,10 @@ const _sfc_main = {
|
|
|
121
117
|
vue.createElementVNode("button", {
|
|
122
118
|
class: vue.normalizeClass(["transition-quint-out w-100 flex radius-small flex-nowrap cursor-pointer flex-v-center", [
|
|
123
119
|
__props.horizontal ? "pd-thin" : "",
|
|
124
|
-
item.route &&
|
|
120
|
+
item.route && vue.unref(route).path === processRoute(item.route) ? __props.theme === "light" ? "bg-light" : "bg-dark" : "",
|
|
125
121
|
__props.theme === "light" ? "hover-bg-light" : "hover-bg-dark"
|
|
126
122
|
]]),
|
|
127
|
-
onClick: ($event) => item.route ? (_ctx.isPhone ? __props.stateSidebar = false : null,
|
|
123
|
+
onClick: ($event) => item.route ? (_ctx.isPhone ? __props.stateSidebar = false : null, vue.unref(route).path !== processRoute(item.route) ? vue.unref(router).push(processRoute(item.route)) : null) : null
|
|
128
124
|
}, [
|
|
129
125
|
!__props.horizontal ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
130
126
|
item.iconComponent ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.iconComponent), {
|
|
@@ -163,10 +159,10 @@ const _sfc_main = {
|
|
|
163
159
|
key: subItem.title
|
|
164
160
|
}, [
|
|
165
161
|
vue.createElementVNode("a", {
|
|
166
|
-
onClick: ($event) => subItem.route ? (_ctx.isPhone ? __props.stateSidebar = false : null,
|
|
162
|
+
onClick: ($event) => subItem.route ? (_ctx.isPhone ? __props.stateSidebar = false : null, vue.unref(route).path !== processRoute(subItem.route) ? vue.unref(router).push(processRoute(subItem.route)) : null) : null,
|
|
167
163
|
href: "#",
|
|
168
164
|
class: vue.normalizeClass(["transition-quint-out flex flex-v-center flex-nowrap gap-thin pd-thin radius-small", [
|
|
169
|
-
subItem.route &&
|
|
165
|
+
subItem.route && vue.unref(route).path === processRoute(subItem.route) ? __props.theme === "light" ? "bg-light" : "bg-dark" : "",
|
|
170
166
|
__props.theme === "light" ? "hover-bg-light" : "hover-bg-dark"
|
|
171
167
|
]])
|
|
172
168
|
}, [
|
|
@@ -196,6 +192,6 @@ const _sfc_main = {
|
|
|
196
192
|
};
|
|
197
193
|
}
|
|
198
194
|
};
|
|
199
|
-
const Navigation = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
195
|
+
const Navigation = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f45211ee"]]);
|
|
200
196
|
exports.default = Navigation;
|
|
201
197
|
//# sourceMappingURL=Navigation.vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/partials/Navigation.vue"],"sourcesContent":["<script setup>\nimport { ref, watch, computed } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'\n\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\nconst router = useRouter()\n\nimport Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'\nimport Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue'\n\nconst props = defineProps({\n navigationItems: Array, // Fixed property name typo\n theme: {\n type: String,\n default: \"light\"\n },\n stateSidebar: {\n type: Boolean,\n default: false\n },\n horizontal: {\n type: Boolean,\n default: false\n }\n})\n\nconst emits = defineEmits([\n 'closeSidebar'\n])\n\nconst expandedSections = ref([])\n\n// Use navigationItems from props instead of nagigationItems\n\nconst toggleSection = (title) => {\n if (!props.stateSidebar) {\n if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {\n emits('closeSidebar')\n setTimeout(() => {\n expandedSections.value.push(title)\n }, 50)\n }\n return\n }\n \n const index = expandedSections.value.indexOf(title)\n\n if (index === -1) {\n expandedSections.value.push(title)\n } else {\n expandedSections.value.splice(index, 1)\n }\n}\n\nconst isSectionExpanded = (title) => {\n return expandedSections.value.includes(title)\n}\n\
|
|
1
|
+
{"version":3,"file":"Navigation.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/partials/Navigation.vue"],"sourcesContent":["<script setup>\nimport { ref, watch, computed } from 'vue'\nimport { useRouter, useRoute } from 'vue-router'\n\nimport IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'\n\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\nconst router = useRouter()\nconst route = useRoute()\n\nimport Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'\nimport Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue'\n\nconst props = defineProps({\n navigationItems: Array, // Fixed property name typo\n theme: {\n type: String,\n default: \"light\"\n },\n stateSidebar: {\n type: Boolean,\n default: false\n },\n horizontal: {\n type: Boolean,\n default: false\n }\n})\n\nconst emits = defineEmits([\n 'closeSidebar'\n])\n\nconst expandedSections = ref([])\n\n// Use navigationItems from props instead of nagigationItems\n\nconst toggleSection = (title) => {\n if (!props.stateSidebar) {\n if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {\n emits('closeSidebar')\n setTimeout(() => {\n expandedSections.value.push(title)\n }, 50)\n }\n return\n }\n \n const index = expandedSections.value.indexOf(title)\n\n if (index === -1) {\n expandedSections.value.push(title)\n } else {\n expandedSections.value.splice(index, 1)\n }\n}\n\nconst isSectionExpanded = (title) => {\n return expandedSections.value.includes(title)\n}\n\n// watch(() => props.stateSidebar, (newValue) => {\n// if (!newValue) {\n// expandedSections.value = []\n// }\n// })\n\n// Process route functions with globals and auth data\nconst processRoute = (route) => {\n if (typeof route === 'function') {\n return route(globals.state, auth.state)\n }\n return route\n}\n</script>\n\n<template>\n <nav\n class=\"transition-quint-out o-x-hidden h-100\"\n :class=\"[\n stateSidebar ? 'pd-small' : 'pd-micro',\n horizontal ? 'w-100 desktop-only flex flex-center flex-nowrap o-y-hidden' : 'o-y-scroll rows-1',\n ]\"\n >\n <div \n v-for=\"section in props.navigationItems\" \n v-show=\"!section.visible || (typeof section.visible === 'function' ? section.visible(auth.state) : true)\"\n :key=\"section.category\" \n class=\"transition-quint-out\"\n :class=\"[\n horizontal ? 'w-max flex-child-default flex flex-nowrap' : '',\n stateSidebar && !horizontal ? 'mn-t-medium' : '',\n ]\"\n >\n <div \n class=\"uppercase t-medium t-transp p-small\"\n :class=\"{ \n 'hidden': !stateSidebar || horizontal, \n 'visible': stateSidebar && !horizontal,\n 't-black': theme === 'light',\n 't-white': theme === 'dark'\n }\"\n >\n {{ section.category }}\n </div>\n\n <ul \n :class=\"[\n horizontal ? 'w-100 gap-micro flex flex-nowrap' : 'flex flex-column gap-thin',\n ]\"\n >\n <li \n v-for=\"item in section.items\" \n v-show=\"!item.visible || (typeof item.visible === 'function' ? item.visible(auth.state) : true)\"\n class=\"w-100 pos-relative\"\n :key=\"item.title\"\n \n >\n <button\n class=\"transition-quint-out w-100 flex radius-small flex-nowrap cursor-pointer flex-v-center\"\n @click=\"item.route ? (isPhone ? (stateSidebar = false) : null, route.path !== processRoute(item.route) ? router.push(processRoute(item.route)) : null) : null\"\n :class=\"[\n horizontal ? 'pd-thin' : '',\n item.route && route.path === processRoute(item.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <div v-if=\"!horizontal\" class=\"w-100 flex-child-default w-max-big flex flex-center aspect-1x1\">\n <component \n v-if=\"item.iconComponent\" \n :is=\"item.iconComponent\" \n class=\"i-medium flex-child-default\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span \n v-if=\"!item.iconComponent \" \n class=\"i-medium sidebar-item-icon t-lh-1 flex-child-default\"\n >\n {{ item.icon }}\n </span>\n </div>\n \n <span\n class=\"transition-quint-out w-100 t-left t-medium\"\n :class=\"{ 'hidden': !stateSidebar && !horizontal, 'visible': stateSidebar || horizontal }\"\n >\n {{ item.title }}\n </span>\n \n <span\n v-if=\"item.subItems && stateSidebar && !horizontal\"\n class=\"mn-l-auto mn-r-small sidebar-dropdown-icon\"\n :class=\"{ 'rotate-180': isSectionExpanded(item.title) }\"\n @click.stop=\"toggleSection(item.title)\" \n >\n <IconChevronBottom :class=\"{ 'rotate-180 mn-t-micro-negative': isOpen }\" :fill=\" theme === 'dark' ? 'rgb(var(--white))': 'rgb(var(--black))'\" class=\"i-small\"/>\n </span>\n </button>\n <transition\n enter-active-class=\"dropdown-enter\"\n leave-active-class=\"dropdown-leave\"\n enter-from-class=\"dropdown-enter-from\"\n enter-to-class=\"dropdown-enter-to\"\n leave-from-class=\"dropdown-leave-from\"\n leave-to-class=\"dropdown-leave-to\"\n >\n <ul\n v-if=\"item.subItems && isSectionExpanded(item.title) && stateSidebar && !horizontal\"\n class=\"mn-l-small mn-t-thin\"\n >\n <li v-for=\"subItem in item.subItems\" :key=\"subItem.title\">\n \n <a \n @click=\"subItem.route ? (isPhone ? (stateSidebar = false) : null, route.path !== processRoute(subItem.route) ? router.push(processRoute(subItem.route)) : null) : null\"\n href=\"#\" \n class=\"transition-quint-out flex flex-v-center flex-nowrap gap-thin pd-thin radius-small\"\n :class=\"[\n subItem.route && route.path === processRoute(subItem.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <component \n v-if=\"subItem.iconComponent\" \n :is=\"subItem.iconComponent\" \n class=\"i-medium\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-else class=\"\">{{ subItem.icon }}</span>\n <span class=\"w-100\">{{ subItem.title }}</span>\n </a>\n </li>\n </ul>\n </transition> \n </li>\n </ul>\n </div>\n </nav>\n</template>\n\n<style scoped>\n\n.rotate-180 {\n transform: rotate(180deg);\n}\n\n.hidden {\n/* opacity: 0;*/\n width: 0;\n display: none;\n}\n\n.visible {\n/* opacity: 1;*/\n display: block;\n}\n\n/* Dropdown animations */\n.dropdown-enter, .dropdown-leave {\n transition: all 0.3s ease-in-out;\n}\n\n.dropdown-enter-from, .dropdown-leave-to {\n opacity: 0;\n transform: translateY(-0.5rem);\n}\n\n.dropdown-enter-to, .dropdown-leave-from {\n opacity: 1;\n transform: translateY(0);\n}\n</style>"],"names":["useRouter","useRoute","ref","route","globals.state","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAKtB,UAAM,QAAQ;AAgBd,UAAM,QAAQ;AAId,UAAM,mBAAmBC,IAAG,IAAC,CAAE,CAAA;AAI/B,UAAM,gBAAgB,CAAC,UAAU;AAC/B,UAAI,CAAC,MAAM,cAAc;AACvB,YAAI,UAAU,MAAM,QAAQ,aAAW,QAAQ,KAAK,EAAE,KAAK,UAAQ,KAAK,UAAU,SAAS,KAAK,QAAQ,GAAG;AACzG,gBAAM,cAAc;AACpB,qBAAW,MAAM;AACf,6BAAiB,MAAM,KAAK,KAAK;AAAA,UACzC,GAAS,EAAE;AAAA,QACX;AACI;AAAA,MACJ;AAEE,YAAM,QAAQ,iBAAiB,MAAM,QAAQ,KAAK;AAElD,UAAI,UAAU,IAAI;AAChB,yBAAiB,MAAM,KAAK,KAAK;AAAA,MACrC,OAAS;AACL,yBAAiB,MAAM,OAAO,OAAO,CAAC;AAAA,MAC1C;AAAA,IACA;AAEA,UAAM,oBAAoB,CAAC,UAAU;AACnC,aAAO,iBAAiB,MAAM,SAAS,KAAK;AAAA,IAC9C;AASA,UAAM,eAAe,CAACC,WAAU;AAC9B,UAAI,OAAOA,WAAU,YAAY;AAC/B,eAAOA,OAAMC,QAAAA,OAAeC,KAAU,KAAA;AAAA,MAC1C;AACE,aAAOF;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref,
|
|
2
|
-
import { useRouter } from "vue-router";
|
|
1
|
+
import { ref, createElementBlock, openBlock, normalizeClass, Fragment, renderList, withDirectives, createElementVNode, toDisplayString, createVNode, unref, createCommentVNode, createBlock, resolveDynamicComponent, withModifiers, Transition, withCtx, vShow } from "vue";
|
|
2
|
+
import { useRouter, useRoute } from "vue-router";
|
|
3
3
|
import IconChevronBottom from "../../../../icons/navigation/IconChevronBottom.vue.js";
|
|
4
4
|
import { state } from "../../store/globals.js";
|
|
5
5
|
import { state as state$1 } from "../../../../auth/views/store/auth.js";
|
|
@@ -49,6 +49,7 @@ const _sfc_main = {
|
|
|
49
49
|
],
|
|
50
50
|
setup(__props, { emit: __emit }) {
|
|
51
51
|
const router = useRouter();
|
|
52
|
+
const route = useRoute();
|
|
52
53
|
const props = __props;
|
|
53
54
|
const emits = __emit;
|
|
54
55
|
const expandedSections = ref([]);
|
|
@@ -72,16 +73,11 @@ const _sfc_main = {
|
|
|
72
73
|
const isSectionExpanded = (title) => {
|
|
73
74
|
return expandedSections.value.includes(title);
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
-
if (
|
|
77
|
-
|
|
76
|
+
const processRoute = (route2) => {
|
|
77
|
+
if (typeof route2 === "function") {
|
|
78
|
+
return route2(state, state$1);
|
|
78
79
|
}
|
|
79
|
-
|
|
80
|
-
const processRoute = (route) => {
|
|
81
|
-
if (typeof route === "function") {
|
|
82
|
-
return route(state, state$1);
|
|
83
|
-
}
|
|
84
|
-
return route;
|
|
80
|
+
return route2;
|
|
85
81
|
};
|
|
86
82
|
return (_ctx, _cache) => {
|
|
87
83
|
return openBlock(), createElementBlock("nav", {
|
|
@@ -119,10 +115,10 @@ const _sfc_main = {
|
|
|
119
115
|
createElementVNode("button", {
|
|
120
116
|
class: normalizeClass(["transition-quint-out w-100 flex radius-small flex-nowrap cursor-pointer flex-v-center", [
|
|
121
117
|
__props.horizontal ? "pd-thin" : "",
|
|
122
|
-
item.route &&
|
|
118
|
+
item.route && unref(route).path === processRoute(item.route) ? __props.theme === "light" ? "bg-light" : "bg-dark" : "",
|
|
123
119
|
__props.theme === "light" ? "hover-bg-light" : "hover-bg-dark"
|
|
124
120
|
]]),
|
|
125
|
-
onClick: ($event) => item.route ? (_ctx.isPhone ? __props.stateSidebar = false : null,
|
|
121
|
+
onClick: ($event) => item.route ? (_ctx.isPhone ? __props.stateSidebar = false : null, unref(route).path !== processRoute(item.route) ? unref(router).push(processRoute(item.route)) : null) : null
|
|
126
122
|
}, [
|
|
127
123
|
!__props.horizontal ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
128
124
|
item.iconComponent ? (openBlock(), createBlock(resolveDynamicComponent(item.iconComponent), {
|
|
@@ -161,10 +157,10 @@ const _sfc_main = {
|
|
|
161
157
|
key: subItem.title
|
|
162
158
|
}, [
|
|
163
159
|
createElementVNode("a", {
|
|
164
|
-
onClick: ($event) => subItem.route ? (_ctx.isPhone ? __props.stateSidebar = false : null,
|
|
160
|
+
onClick: ($event) => subItem.route ? (_ctx.isPhone ? __props.stateSidebar = false : null, unref(route).path !== processRoute(subItem.route) ? unref(router).push(processRoute(subItem.route)) : null) : null,
|
|
165
161
|
href: "#",
|
|
166
162
|
class: normalizeClass(["transition-quint-out flex flex-v-center flex-nowrap gap-thin pd-thin radius-small", [
|
|
167
|
-
subItem.route &&
|
|
163
|
+
subItem.route && unref(route).path === processRoute(subItem.route) ? __props.theme === "light" ? "bg-light" : "bg-dark" : "",
|
|
168
164
|
__props.theme === "light" ? "hover-bg-light" : "hover-bg-dark"
|
|
169
165
|
]])
|
|
170
166
|
}, [
|
|
@@ -194,7 +190,7 @@ const _sfc_main = {
|
|
|
194
190
|
};
|
|
195
191
|
}
|
|
196
192
|
};
|
|
197
|
-
const Navigation = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
193
|
+
const Navigation = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f45211ee"]]);
|
|
198
194
|
export {
|
|
199
195
|
Navigation as default
|
|
200
196
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/partials/Navigation.vue"],"sourcesContent":["<script setup>\nimport { ref, watch, computed } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'\n\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\nconst router = useRouter()\n\nimport Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'\nimport Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue'\n\nconst props = defineProps({\n navigationItems: Array, // Fixed property name typo\n theme: {\n type: String,\n default: \"light\"\n },\n stateSidebar: {\n type: Boolean,\n default: false\n },\n horizontal: {\n type: Boolean,\n default: false\n }\n})\n\nconst emits = defineEmits([\n 'closeSidebar'\n])\n\nconst expandedSections = ref([])\n\n// Use navigationItems from props instead of nagigationItems\n\nconst toggleSection = (title) => {\n if (!props.stateSidebar) {\n if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {\n emits('closeSidebar')\n setTimeout(() => {\n expandedSections.value.push(title)\n }, 50)\n }\n return\n }\n \n const index = expandedSections.value.indexOf(title)\n\n if (index === -1) {\n expandedSections.value.push(title)\n } else {\n expandedSections.value.splice(index, 1)\n }\n}\n\nconst isSectionExpanded = (title) => {\n return expandedSections.value.includes(title)\n}\n\
|
|
1
|
+
{"version":3,"file":"Navigation.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/partials/Navigation.vue"],"sourcesContent":["<script setup>\nimport { ref, watch, computed } from 'vue'\nimport { useRouter, useRoute } from 'vue-router'\n\nimport IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'\n\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\nconst router = useRouter()\nconst route = useRoute()\n\nimport Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'\nimport Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue'\n\nconst props = defineProps({\n navigationItems: Array, // Fixed property name typo\n theme: {\n type: String,\n default: \"light\"\n },\n stateSidebar: {\n type: Boolean,\n default: false\n },\n horizontal: {\n type: Boolean,\n default: false\n }\n})\n\nconst emits = defineEmits([\n 'closeSidebar'\n])\n\nconst expandedSections = ref([])\n\n// Use navigationItems from props instead of nagigationItems\n\nconst toggleSection = (title) => {\n if (!props.stateSidebar) {\n if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {\n emits('closeSidebar')\n setTimeout(() => {\n expandedSections.value.push(title)\n }, 50)\n }\n return\n }\n \n const index = expandedSections.value.indexOf(title)\n\n if (index === -1) {\n expandedSections.value.push(title)\n } else {\n expandedSections.value.splice(index, 1)\n }\n}\n\nconst isSectionExpanded = (title) => {\n return expandedSections.value.includes(title)\n}\n\n// watch(() => props.stateSidebar, (newValue) => {\n// if (!newValue) {\n// expandedSections.value = []\n// }\n// })\n\n// Process route functions with globals and auth data\nconst processRoute = (route) => {\n if (typeof route === 'function') {\n return route(globals.state, auth.state)\n }\n return route\n}\n</script>\n\n<template>\n <nav\n class=\"transition-quint-out o-x-hidden h-100\"\n :class=\"[\n stateSidebar ? 'pd-small' : 'pd-micro',\n horizontal ? 'w-100 desktop-only flex flex-center flex-nowrap o-y-hidden' : 'o-y-scroll rows-1',\n ]\"\n >\n <div \n v-for=\"section in props.navigationItems\" \n v-show=\"!section.visible || (typeof section.visible === 'function' ? section.visible(auth.state) : true)\"\n :key=\"section.category\" \n class=\"transition-quint-out\"\n :class=\"[\n horizontal ? 'w-max flex-child-default flex flex-nowrap' : '',\n stateSidebar && !horizontal ? 'mn-t-medium' : '',\n ]\"\n >\n <div \n class=\"uppercase t-medium t-transp p-small\"\n :class=\"{ \n 'hidden': !stateSidebar || horizontal, \n 'visible': stateSidebar && !horizontal,\n 't-black': theme === 'light',\n 't-white': theme === 'dark'\n }\"\n >\n {{ section.category }}\n </div>\n\n <ul \n :class=\"[\n horizontal ? 'w-100 gap-micro flex flex-nowrap' : 'flex flex-column gap-thin',\n ]\"\n >\n <li \n v-for=\"item in section.items\" \n v-show=\"!item.visible || (typeof item.visible === 'function' ? item.visible(auth.state) : true)\"\n class=\"w-100 pos-relative\"\n :key=\"item.title\"\n \n >\n <button\n class=\"transition-quint-out w-100 flex radius-small flex-nowrap cursor-pointer flex-v-center\"\n @click=\"item.route ? (isPhone ? (stateSidebar = false) : null, route.path !== processRoute(item.route) ? router.push(processRoute(item.route)) : null) : null\"\n :class=\"[\n horizontal ? 'pd-thin' : '',\n item.route && route.path === processRoute(item.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <div v-if=\"!horizontal\" class=\"w-100 flex-child-default w-max-big flex flex-center aspect-1x1\">\n <component \n v-if=\"item.iconComponent\" \n :is=\"item.iconComponent\" \n class=\"i-medium flex-child-default\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span \n v-if=\"!item.iconComponent \" \n class=\"i-medium sidebar-item-icon t-lh-1 flex-child-default\"\n >\n {{ item.icon }}\n </span>\n </div>\n \n <span\n class=\"transition-quint-out w-100 t-left t-medium\"\n :class=\"{ 'hidden': !stateSidebar && !horizontal, 'visible': stateSidebar || horizontal }\"\n >\n {{ item.title }}\n </span>\n \n <span\n v-if=\"item.subItems && stateSidebar && !horizontal\"\n class=\"mn-l-auto mn-r-small sidebar-dropdown-icon\"\n :class=\"{ 'rotate-180': isSectionExpanded(item.title) }\"\n @click.stop=\"toggleSection(item.title)\" \n >\n <IconChevronBottom :class=\"{ 'rotate-180 mn-t-micro-negative': isOpen }\" :fill=\" theme === 'dark' ? 'rgb(var(--white))': 'rgb(var(--black))'\" class=\"i-small\"/>\n </span>\n </button>\n <transition\n enter-active-class=\"dropdown-enter\"\n leave-active-class=\"dropdown-leave\"\n enter-from-class=\"dropdown-enter-from\"\n enter-to-class=\"dropdown-enter-to\"\n leave-from-class=\"dropdown-leave-from\"\n leave-to-class=\"dropdown-leave-to\"\n >\n <ul\n v-if=\"item.subItems && isSectionExpanded(item.title) && stateSidebar && !horizontal\"\n class=\"mn-l-small mn-t-thin\"\n >\n <li v-for=\"subItem in item.subItems\" :key=\"subItem.title\">\n \n <a \n @click=\"subItem.route ? (isPhone ? (stateSidebar = false) : null, route.path !== processRoute(subItem.route) ? router.push(processRoute(subItem.route)) : null) : null\"\n href=\"#\" \n class=\"transition-quint-out flex flex-v-center flex-nowrap gap-thin pd-thin radius-small\"\n :class=\"[\n subItem.route && route.path === processRoute(subItem.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <component \n v-if=\"subItem.iconComponent\" \n :is=\"subItem.iconComponent\" \n class=\"i-medium\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-else class=\"\">{{ subItem.icon }}</span>\n <span class=\"w-100\">{{ subItem.title }}</span>\n </a>\n </li>\n </ul>\n </transition> \n </li>\n </ul>\n </div>\n </nav>\n</template>\n\n<style scoped>\n\n.rotate-180 {\n transform: rotate(180deg);\n}\n\n.hidden {\n/* opacity: 0;*/\n width: 0;\n display: none;\n}\n\n.visible {\n/* opacity: 1;*/\n display: block;\n}\n\n/* Dropdown animations */\n.dropdown-enter, .dropdown-leave {\n transition: all 0.3s ease-in-out;\n}\n\n.dropdown-enter-from, .dropdown-leave-to {\n opacity: 0;\n transform: translateY(-0.5rem);\n}\n\n.dropdown-enter-to, .dropdown-leave-from {\n opacity: 1;\n transform: translateY(0);\n}\n</style>"],"names":["route","globals.state","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAKtB,UAAM,QAAQ;AAgBd,UAAM,QAAQ;AAId,UAAM,mBAAmB,IAAI,CAAE,CAAA;AAI/B,UAAM,gBAAgB,CAAC,UAAU;AAC/B,UAAI,CAAC,MAAM,cAAc;AACvB,YAAI,UAAU,MAAM,QAAQ,aAAW,QAAQ,KAAK,EAAE,KAAK,UAAQ,KAAK,UAAU,SAAS,KAAK,QAAQ,GAAG;AACzG,gBAAM,cAAc;AACpB,qBAAW,MAAM;AACf,6BAAiB,MAAM,KAAK,KAAK;AAAA,UACzC,GAAS,EAAE;AAAA,QACX;AACI;AAAA,MACJ;AAEE,YAAM,QAAQ,iBAAiB,MAAM,QAAQ,KAAK;AAElD,UAAI,UAAU,IAAI;AAChB,yBAAiB,MAAM,KAAK,KAAK;AAAA,MACrC,OAAS;AACL,yBAAiB,MAAM,OAAO,OAAO,CAAC;AAAA,MAC1C;AAAA,IACA;AAEA,UAAM,oBAAoB,CAAC,UAAU;AACnC,aAAO,iBAAiB,MAAM,SAAS,KAAK;AAAA,IAC9C;AASA,UAAM,eAAe,CAACA,WAAU;AAC9B,UAAI,OAAOA,WAAU,YAAY;AAC/B,eAAOA,OAAMC,OAAeC,OAAU;AAAA,MAC1C;AACE,aAAOF;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const Tab = require("../../../../../components/Tab/Tab.
|
|
4
|
+
const Tab = require("../../../../../components/Tab/Tab.vue.cjs");
|
|
5
5
|
const _hoisted_1 = { class: "flex-v-center flex-nowrap flex" };
|
|
6
6
|
const _hoisted_2 = { class: "h2 mn-r-auto" };
|
|
7
7
|
const _hoisted_3 = ["onClick"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, toDisplayString, Fragment, renderList, normalizeClass, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import _sfc_main$1 from "../../../../../components/Tab/Tab.
|
|
2
|
+
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue.js";
|
|
3
3
|
const _hoisted_1 = { class: "flex-v-center flex-nowrap flex" };
|
|
4
4
|
const _hoisted_2 = { class: "h2 mn-r-auto" };
|
|
5
5
|
const _hoisted_3 = ["onClick"];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const serverRenderer_esmBundler = require("
|
|
3
|
+
const serverRenderer_esmBundler = require("../../../../../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs");
|
|
4
4
|
const index = require("../../../../../../node_modules/.pnpm/@unhead_ssr@1.11.20/node_modules/@unhead/ssr/dist/index.cjs");
|
|
5
5
|
const axiosInstance = require("./axios-instance.cjs");
|
|
6
6
|
function renderAndMountApp({ createApp }) {
|
|
7
7
|
const start = async () => {
|
|
8
|
+
var _a, _b;
|
|
8
9
|
const { app, router, store } = createApp();
|
|
9
10
|
let initialState;
|
|
10
11
|
try {
|
|
@@ -18,9 +19,11 @@ function renderAndMountApp({ createApp }) {
|
|
|
18
19
|
if (initialState) {
|
|
19
20
|
store.setInitialState(initialState);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
console.log("auth", initialState.auth);
|
|
23
|
+
if ((_b = (_a = initialState == null ? void 0 : initialState.auth) == null ? void 0 : _a.access) == null ? void 0 : _b.token) {
|
|
24
|
+
axiosInstance.setAuthToken(initialState.auth.access.token);
|
|
23
25
|
} else {
|
|
26
|
+
store.auth.actions.resetState();
|
|
24
27
|
await store.auth.actions.logout();
|
|
25
28
|
}
|
|
26
29
|
await router.isReady();
|
|
@@ -44,16 +47,7 @@ async function render({ url, cookies, createApp }) {
|
|
|
44
47
|
if (user) {
|
|
45
48
|
await store.auth.actions.initialize(user);
|
|
46
49
|
} else {
|
|
47
|
-
store.auth.
|
|
48
|
-
_id: void 0,
|
|
49
|
-
username: "",
|
|
50
|
-
email: "",
|
|
51
|
-
phone: "",
|
|
52
|
-
password: "1",
|
|
53
|
-
passwordRepeat: ""
|
|
54
|
-
};
|
|
55
|
-
store.auth.state.access = { roles: null, token: null, status: false };
|
|
56
|
-
store.auth.state.accesses = [];
|
|
50
|
+
store.auth.actions.resetState();
|
|
57
51
|
}
|
|
58
52
|
const html = await serverRenderer_esmBundler.renderToString(app, sharedContext);
|
|
59
53
|
const payload = await index.renderSSRHead(meta, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-app-renderer.cjs","sources":["../../../../../../../src/modules/globals/views/utils/vue-app-renderer.js"],"sourcesContent":["import { renderToString } from \"@vue/server-renderer\";\nimport { renderSSRHead } from '@unhead/ssr'\nimport { setAuthToken } from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\n\nimport getBrowserLocale from \"@martyrs/src/modules/globals/views/localization/get-browser-locale.js\"\n\nexport function renderAndMountApp({ createApp }) {\n const start = async () => {\n const { app, router, store } = createApp();\n\n let initialState;\n\n try {\n const initialStateElement = document.querySelector(\"[data-state]\");\n\n if (initialStateElement && initialStateElement.innerHTML.trim() !== \"\") {\n initialState = JSON.parse(initialStateElement.innerHTML.trim());\n }\n } catch (error) {\n console.error(\"Failed to parse user state\", error);\n }\n \n if (initialState) {\n // Применяем начальное состояние ко всем модулям\n store.setInitialState(initialState);\n }\n\n
|
|
1
|
+
{"version":3,"file":"vue-app-renderer.cjs","sources":["../../../../../../../src/modules/globals/views/utils/vue-app-renderer.js"],"sourcesContent":["import { renderToString } from \"@vue/server-renderer\";\nimport { renderSSRHead } from '@unhead/ssr'\nimport { setAuthToken } from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\n\nimport getBrowserLocale from \"@martyrs/src/modules/globals/views/localization/get-browser-locale.js\"\n\nexport function renderAndMountApp({ createApp }) {\n const start = async () => {\n const { app, router, store } = createApp();\n\n let initialState;\n\n try {\n const initialStateElement = document.querySelector(\"[data-state]\");\n\n if (initialStateElement && initialStateElement.innerHTML.trim() !== \"\") {\n initialState = JSON.parse(initialStateElement.innerHTML.trim());\n }\n } catch (error) {\n console.error(\"Failed to parse user state\", error);\n }\n \n if (initialState) {\n // Применяем начальное состояние ко всем модулям\n store.setInitialState(initialState);\n }\n\n console.log('auth', initialState.auth)\n if (initialState?.auth?.access?.token) {\n setAuthToken(initialState.auth.access.token);\n } else {\n store.auth.actions.resetState();\n // await store.auth.removeCookie('user');\n await store.auth.actions.logout()\n }\n\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n // If user browser locae supported then change locale\n // if (i18n.global.availableLocales.includes(browserLocale)) {\n // app.config.globalProperties.$i18n.locale = browserLocale;\n // }\n\n await router.isReady();\n app.mount(\"#app\");\n };\n start();\n}\n\nexport async function render({ url, cookies, createApp }) {\n const { app, router, store, meta } = createApp();\n\n await router.push(url);\n await router.isReady();\n\n \n // If user's language is supported, change the locale\n // if (language === 'en' || language === 'ru') {\n // app.config.globalProperties.$i18n.locale = language\n // }\n\n // console.log(router.currentRoute.value.params.locale)\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n \n const sharedContext = {};\n\n if (router.currentRoute.value.name?.toLowerCase() === 'notfound') {\n sharedContext.notFound = true;\n }\n \n let user = null;\n\n if (cookies.user) { \n user = JSON.parse(cookies.user)\n }\n\n if (user) {\n await store.auth.actions.initialize(user)\n } else {\n store.auth.actions.resetState();\n }\n\n const html = await renderToString(app, sharedContext);\n const payload = await renderSSRHead(meta, {})\n const initialState = await store.getInitialState();\n\n return { \n html, \n meta: payload, \n state: initialState, \n statusCode: router.currentRoute?.value?.name?.toLowerCase() === 'notfound' ? 404 : 200 \n };\n}"],"names":["setAuthToken","renderToString","renderSSRHead"],"mappings":";;;;;AAMO,SAAS,kBAAkB,EAAE,aAAa;AAC/C,QAAM,QAAQ,YAAY;;AACxB,UAAM,EAAE,KAAK,QAAQ,MAAK,IAAK,UAAW;AAE1C,QAAI;AAEJ,QAAI;AACF,YAAM,sBAAsB,SAAS,cAAc,cAAc;AAEjE,UAAI,uBAAuB,oBAAoB,UAAU,KAAI,MAAO,IAAI;AACtE,uBAAe,KAAK,MAAM,oBAAoB,UAAU,KAAI,CAAE;AAAA,MACtE;AAAA,IACK,SAAQ,OAAO;AACd,cAAQ,MAAM,8BAA8B,KAAK;AAAA,IACvD;AAEI,QAAI,cAAc;AAEhB,YAAM,gBAAgB,YAAY;AAAA,IACxC;AAEI,YAAQ,IAAI,QAAQ,aAAa,IAAI;AACrC,SAAI,wDAAc,SAAd,mBAAoB,WAApB,mBAA4B,OAAO;AACrCA,oBAAAA,aAAa,aAAa,KAAK,OAAO,KAAK;AAAA,IACjD,OAAW;AACL,YAAM,KAAK,QAAQ,WAAY;AAE/B,YAAM,MAAM,KAAK,QAAQ,OAAM;AAAA,IACrC;AASI,UAAM,OAAO,QAAS;AACtB,QAAI,MAAM,MAAM;AAAA,EACjB;AACD,QAAO;AACT;AAEO,eAAe,OAAO,EAAE,KAAK,SAAS,UAAS,GAAI;;AACxD,QAAM,EAAE,KAAK,QAAQ,OAAO,KAAI,IAAK,UAAW;AAEhD,QAAM,OAAO,KAAK,GAAG;AACrB,QAAM,OAAO,QAAS;AAWtB,QAAM,gBAAgB,CAAE;AAExB,QAAI,YAAO,aAAa,MAAM,SAA1B,mBAAgC,mBAAkB,YAAY;AAChE,kBAAc,WAAW;AAAA,EAC7B;AAEE,MAAI,OAAO;AAEX,MAAI,QAAQ,MAAM;AAChB,WAAO,KAAK,MAAM,QAAQ,IAAI;AAAA,EAClC;AAEE,MAAI,MAAM;AACR,UAAM,MAAM,KAAK,QAAQ,WAAW,IAAI;AAAA,EAC5C,OAAS;AACL,UAAM,KAAK,QAAQ,WAAY;AAAA,EACnC;AAEE,QAAM,OAAO,MAAMC,yCAAe,KAAK,aAAa;AACpD,QAAM,UAAU,MAAMC,oBAAc,MAAM,CAAE,CAAA;AAC5C,QAAM,eAAe,MAAM,MAAM,gBAAiB;AAElD,SAAO;AAAA,IACL;AAAA,IACA,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAY,wBAAO,iBAAP,mBAAqB,UAArB,mBAA4B,SAA5B,mBAAkC,mBAAkB,aAAa,MAAM;AAAA,EACpF;AACH;;;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { renderToString } from "
|
|
1
|
+
import { renderToString } from "../../../../../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js";
|
|
2
2
|
import { renderSSRHead } from "../../../../../../node_modules/.pnpm/@unhead_ssr@1.11.20/node_modules/@unhead/ssr/dist/index.js";
|
|
3
3
|
import { setAuthToken } from "./axios-instance.js";
|
|
4
4
|
function renderAndMountApp({ createApp }) {
|
|
5
5
|
const start = async () => {
|
|
6
|
+
var _a, _b;
|
|
6
7
|
const { app, router, store } = createApp();
|
|
7
8
|
let initialState;
|
|
8
9
|
try {
|
|
@@ -16,9 +17,11 @@ function renderAndMountApp({ createApp }) {
|
|
|
16
17
|
if (initialState) {
|
|
17
18
|
store.setInitialState(initialState);
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
console.log("auth", initialState.auth);
|
|
21
|
+
if ((_b = (_a = initialState == null ? void 0 : initialState.auth) == null ? void 0 : _a.access) == null ? void 0 : _b.token) {
|
|
22
|
+
setAuthToken(initialState.auth.access.token);
|
|
21
23
|
} else {
|
|
24
|
+
store.auth.actions.resetState();
|
|
22
25
|
await store.auth.actions.logout();
|
|
23
26
|
}
|
|
24
27
|
await router.isReady();
|
|
@@ -42,16 +45,7 @@ async function render({ url, cookies, createApp }) {
|
|
|
42
45
|
if (user) {
|
|
43
46
|
await store.auth.actions.initialize(user);
|
|
44
47
|
} else {
|
|
45
|
-
store.auth.
|
|
46
|
-
_id: void 0,
|
|
47
|
-
username: "",
|
|
48
|
-
email: "",
|
|
49
|
-
phone: "",
|
|
50
|
-
password: "1",
|
|
51
|
-
passwordRepeat: ""
|
|
52
|
-
};
|
|
53
|
-
store.auth.state.access = { roles: null, token: null, status: false };
|
|
54
|
-
store.auth.state.accesses = [];
|
|
48
|
+
store.auth.actions.resetState();
|
|
55
49
|
}
|
|
56
50
|
const html = await renderToString(app, sharedContext);
|
|
57
51
|
const payload = await renderSSRHead(meta, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-app-renderer.js","sources":["../../../../../../../src/modules/globals/views/utils/vue-app-renderer.js"],"sourcesContent":["import { renderToString } from \"@vue/server-renderer\";\nimport { renderSSRHead } from '@unhead/ssr'\nimport { setAuthToken } from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\n\nimport getBrowserLocale from \"@martyrs/src/modules/globals/views/localization/get-browser-locale.js\"\n\nexport function renderAndMountApp({ createApp }) {\n const start = async () => {\n const { app, router, store } = createApp();\n\n let initialState;\n\n try {\n const initialStateElement = document.querySelector(\"[data-state]\");\n\n if (initialStateElement && initialStateElement.innerHTML.trim() !== \"\") {\n initialState = JSON.parse(initialStateElement.innerHTML.trim());\n }\n } catch (error) {\n console.error(\"Failed to parse user state\", error);\n }\n \n if (initialState) {\n // Применяем начальное состояние ко всем модулям\n store.setInitialState(initialState);\n }\n\n
|
|
1
|
+
{"version":3,"file":"vue-app-renderer.js","sources":["../../../../../../../src/modules/globals/views/utils/vue-app-renderer.js"],"sourcesContent":["import { renderToString } from \"@vue/server-renderer\";\nimport { renderSSRHead } from '@unhead/ssr'\nimport { setAuthToken } from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\n\nimport getBrowserLocale from \"@martyrs/src/modules/globals/views/localization/get-browser-locale.js\"\n\nexport function renderAndMountApp({ createApp }) {\n const start = async () => {\n const { app, router, store } = createApp();\n\n let initialState;\n\n try {\n const initialStateElement = document.querySelector(\"[data-state]\");\n\n if (initialStateElement && initialStateElement.innerHTML.trim() !== \"\") {\n initialState = JSON.parse(initialStateElement.innerHTML.trim());\n }\n } catch (error) {\n console.error(\"Failed to parse user state\", error);\n }\n \n if (initialState) {\n // Применяем начальное состояние ко всем модулям\n store.setInitialState(initialState);\n }\n\n console.log('auth', initialState.auth)\n if (initialState?.auth?.access?.token) {\n setAuthToken(initialState.auth.access.token);\n } else {\n store.auth.actions.resetState();\n // await store.auth.removeCookie('user');\n await store.auth.actions.logout()\n }\n\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n // If user browser locae supported then change locale\n // if (i18n.global.availableLocales.includes(browserLocale)) {\n // app.config.globalProperties.$i18n.locale = browserLocale;\n // }\n\n await router.isReady();\n app.mount(\"#app\");\n };\n start();\n}\n\nexport async function render({ url, cookies, createApp }) {\n const { app, router, store, meta } = createApp();\n\n await router.push(url);\n await router.isReady();\n\n \n // If user's language is supported, change the locale\n // if (language === 'en' || language === 'ru') {\n // app.config.globalProperties.$i18n.locale = language\n // }\n\n // console.log(router.currentRoute.value.params.locale)\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n \n const sharedContext = {};\n\n if (router.currentRoute.value.name?.toLowerCase() === 'notfound') {\n sharedContext.notFound = true;\n }\n \n let user = null;\n\n if (cookies.user) { \n user = JSON.parse(cookies.user)\n }\n\n if (user) {\n await store.auth.actions.initialize(user)\n } else {\n store.auth.actions.resetState();\n }\n\n const html = await renderToString(app, sharedContext);\n const payload = await renderSSRHead(meta, {})\n const initialState = await store.getInitialState();\n\n return { \n html, \n meta: payload, \n state: initialState, \n statusCode: router.currentRoute?.value?.name?.toLowerCase() === 'notfound' ? 404 : 200 \n };\n}"],"names":[],"mappings":";;;AAMO,SAAS,kBAAkB,EAAE,aAAa;AAC/C,QAAM,QAAQ,YAAY;;AACxB,UAAM,EAAE,KAAK,QAAQ,MAAK,IAAK,UAAW;AAE1C,QAAI;AAEJ,QAAI;AACF,YAAM,sBAAsB,SAAS,cAAc,cAAc;AAEjE,UAAI,uBAAuB,oBAAoB,UAAU,KAAI,MAAO,IAAI;AACtE,uBAAe,KAAK,MAAM,oBAAoB,UAAU,KAAI,CAAE;AAAA,MACtE;AAAA,IACK,SAAQ,OAAO;AACd,cAAQ,MAAM,8BAA8B,KAAK;AAAA,IACvD;AAEI,QAAI,cAAc;AAEhB,YAAM,gBAAgB,YAAY;AAAA,IACxC;AAEI,YAAQ,IAAI,QAAQ,aAAa,IAAI;AACrC,SAAI,wDAAc,SAAd,mBAAoB,WAApB,mBAA4B,OAAO;AACrC,mBAAa,aAAa,KAAK,OAAO,KAAK;AAAA,IACjD,OAAW;AACL,YAAM,KAAK,QAAQ,WAAY;AAE/B,YAAM,MAAM,KAAK,QAAQ,OAAM;AAAA,IACrC;AASI,UAAM,OAAO,QAAS;AACtB,QAAI,MAAM,MAAM;AAAA,EACjB;AACD,QAAO;AACT;AAEO,eAAe,OAAO,EAAE,KAAK,SAAS,UAAS,GAAI;;AACxD,QAAM,EAAE,KAAK,QAAQ,OAAO,KAAI,IAAK,UAAW;AAEhD,QAAM,OAAO,KAAK,GAAG;AACrB,QAAM,OAAO,QAAS;AAWtB,QAAM,gBAAgB,CAAE;AAExB,QAAI,YAAO,aAAa,MAAM,SAA1B,mBAAgC,mBAAkB,YAAY;AAChE,kBAAc,WAAW;AAAA,EAC7B;AAEE,MAAI,OAAO;AAEX,MAAI,QAAQ,MAAM;AAChB,WAAO,KAAK,MAAM,QAAQ,IAAI;AAAA,EAClC;AAEE,MAAI,MAAM;AACR,UAAM,MAAM,KAAK,QAAQ,WAAW,IAAI;AAAA,EAC5C,OAAS;AACL,UAAM,KAAK,QAAQ,WAAY;AAAA,EACnC;AAEE,QAAM,OAAO,MAAM,eAAe,KAAK,aAAa;AACpD,QAAM,UAAU,MAAM,cAAc,MAAM,CAAE,CAAA;AAC5C,QAAM,eAAe,MAAM,MAAM,gBAAiB;AAElD,SAAO;AAAA,IACL;AAAA,IACA,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAY,wBAAO,iBAAP,mBAAqB,UAArB,mBAA4B,SAA5B,mBAAkC,mBAAkB,aAAa,MAAM;AAAA,EACpF;AACH;"}
|
|
@@ -213,13 +213,12 @@ const _sfc_main = {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
return (_ctx, _cache) => {
|
|
216
|
-
var _a, _b, _c, _d, _e
|
|
216
|
+
var _a, _b, _c, _d, _e;
|
|
217
217
|
return vue.openBlock(), vue.createElementBlock("section", _hoisted_1, [
|
|
218
218
|
auth.state.access.status === false ? (vue.openBlock(), vue.createBlock(AskToLogin.default, {
|
|
219
219
|
key: 0,
|
|
220
220
|
class: "mn-b-thin"
|
|
221
221
|
})) : vue.createCommentVNode("", true),
|
|
222
|
-
vue.createTextVNode(" " + vue.toDisplayString(shopcart.state.organization) + " " + vue.toDisplayString((_a = orderOrganization.value.value) == null ? void 0 : _a._id) + " ", 1),
|
|
223
222
|
vue.createElementVNode("div", _hoisted_2, [
|
|
224
223
|
shopcart.state.positions < 1 ? (vue.openBlock(), vue.createBlock(EmptyState.default, { key: 0 })) : vue.createCommentVNode("", true),
|
|
225
224
|
order.value.status === true && shopcart.state.positions.length > 0 ? (vue.openBlock(), vue.createBlock(Succes.default, {
|
|
@@ -262,11 +261,11 @@ const _sfc_main = {
|
|
|
262
261
|
totalPrice: vue.unref(cartTotalPrice),
|
|
263
262
|
deliveryRate: deliveryCost.value,
|
|
264
263
|
currency: vue.unref(returnCurrency)(),
|
|
265
|
-
showFees: (
|
|
266
|
-
feesRate: ((
|
|
267
|
-
showVat: (
|
|
268
|
-
vatRate: ((
|
|
269
|
-
showDeliveryFee: (
|
|
264
|
+
showFees: (_a = globals.state.options) == null ? void 0 : _a.orders.showFees,
|
|
265
|
+
feesRate: ((_b = globals.state.options) == null ? void 0 : _b.orders.feesRate) || 0,
|
|
266
|
+
showVat: (_c = globals.state.options) == null ? void 0 : _c.orders.showVat,
|
|
267
|
+
vatRate: ((_d = globals.state.options) == null ? void 0 : _d.orders.vatRate) || 0,
|
|
268
|
+
showDeliveryFee: (_e = globals.state.options) == null ? void 0 : _e.orders.showDeliveryFee
|
|
270
269
|
}, null, 8, ["totalPrice", "deliveryRate", "currency", "showFees", "feesRate", "showVat", "vatRate", "showDeliveryFee"])
|
|
271
270
|
]),
|
|
272
271
|
orders.state.current.status !== true && shopcart.state.positions.length > 0 ? (vue.openBlock(), vue.createBlock(Button.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderCreate.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"bg-white pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\t{{shopcart.state.organization}}\n\t{{orderOrganization.value?._id}}\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"rows-1 gap-thin\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t\t:organization=\"orderOrganization[0]\" \n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t\t:organization=\"orderOrganization[0]\" \n\t\t\t/>\n\t\t\t\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-white br-solid br-light br-1px pd-medium radius-medium\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t\t\t\t\t@updateRentDates=\"(product, dates) => shopcart.actions.updateRentDates({ productId: product._id, dates })\"\n\t class=\"w-100 bg-white \"\n\t />\n\t\t\t</ul>\n\n\t\t\t\t<div \n\t\t\t\tclass=\"mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<PriceTotal \n :totalPrice=\"cartTotalPrice\"\n :deliveryRate=\"deliveryCost\"\n :currency=\"returnCurrency()\"\n :showFees=\"globals.state.options?.orders.showFees\"\n :feesRate=\"globals.state.options?.orders.feesRate || 0\"\n :showVat=\"globals.state.options?.orders.showVat\"\n :vatRate=\"globals.state.options?.orders.vatRate || 0\"\n :showDeliveryFee=\"globals.state.options?.orders.showDeliveryFee\"\n />\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <Button\n v-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n :submit=\"() => handleCreate()\"\n class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n :disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t || isLocationLoading\n\t\t \"\n >\n <span>Place an Order</span>\n </Button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport Button from '@martyrs/src/components/Button/Button.vue'\n// Block\nimport CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@martyrs/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@martyrs/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@martyrs/src/modules/orders/components/sections/EmptyState.vue'\n\nimport PriceTotal from '@martyrs/src/modules/orders/components/elements/PriceTotal.vue';\n\nimport FormCustomerDetails from '@martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@martyrs/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\nimport { useGlobalMixins } from \"@martyrs/src/modules/globals/views/mixins/mixins.js\"\n\n// Store\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals';\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\nimport * as shopcart from '@martyrs/src/modules/orders/store/shopcart';\nimport * as organizations from '@martyrs/src/modules/organizations/store/organizations';\nimport * as orders from '@martyrs/src/modules/orders/store/orders';\nimport * as users from '@martyrs/src/modules/auth/views/store/users';\n\nconst emits = defineEmits(['page-loading', 'page-loaded']);\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n//////////////////////////////////////////////////////////////////////////////////////////////////\nconst isLocationLoading = ref(false)\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\nconst { returnCurrency } = useGlobalMixins()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\n\nconst cartTotalPrice = shopcart.getters.cartTotalPrice\n\nconst deliveryCost = computed(() => {\n const type = orders.state.current.delivery.type\n const distance = orderOrganization.value[0]?.distance || 0\n const config = globals.state.options?.orders?.delivery_formula || {}\n\n return orders.getters.getDeliveryPrice(type, distance, config)\n})\n\n// Organization\nconst orderOrganization = ref({})\n\n\nif (!globals.state.options.orders.allowUnauthenticatedOrders && !auth.state.user._id) { \n\trouter.push({name: 'Sign In'})\t\n}\n\n\norders.mutations.resetOrder()\n\nonMounted(async()=> {\n\temits('page-loading');\n\n\tisLocationLoading.value = true\n\n\tif (auth.state.user._id) {\n\t\tlet data = await users.actions.read({ _id:auth.state.user._id, user: auth.state.user._id });\n\n\t\torders.state.current.customer.profile.name = users.state.current.profile.name\n\t\torders.state.current.customer.phone = users.state.current.phone\n\t\torders.state.current.customer.phone = users.state.current.phone\n\t}\n\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t lookup: ['spots']\n\t})\n\t\n \tisLocationLoading.value = false\n emits('page-loaded');\n\n if (typeof gtag === 'function') {\n gtag('event', 'begin_checkout', {\n currency: returnCurrency(), // Замените на вашу валюту\n value: cartTotalPrice || 0,\n items: shopcart.state.positions.map(item => ({\n item_id: item.product?._id,\n item_name: item.product?.name,\n price: item.price || 0,\n quantity: item.quantity || 1,\n item_category: item.product?.category || '',\n item_brand: orderOrganization.value.profile?.name || ''\n })),\n organization: orderOrganization.value.profile?.name || '',\n location: globals.state.position?.location || 'unknown'\n });\n }\n})\n\n\nwatch(\n () => orders.state.current.delivery,\n async (newVal) => {\n if (newVal?.location) {\n \tisLocationLoading.value = true\n\n orderOrganization.value = await organizations.actions.read({\n _id: shopcart.state.organization,\n location: newVal.location,\n lookup: ['spots']\n })\n\n isLocationLoading.value = false\n }\n },\n { deep: true }\n)\n\n\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n const type = orders.state.current.delivery.type;\n if (type === \"pickup\") {\n return !orders.state.current.delivery.spot;\n } else if (type === \"courier\" || type === \"mail\") {\n const address = orders.state.current.delivery.address;\n return !address || typeof address !== 'string' || address.length < 2;\n }\n return false;\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: orderOrganization.value[0]._id,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'user'\n\t\t}\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.customer = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'user'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n\t if (typeof gtag === 'function') {\n\t gtag('event', 'purchase', {\n\t transaction_id: order._id,\n\t value: cartTotalPrice || 0,\n\t currency: returnCurrency(), // Замените на вашу валюту\n\t tax: 0, // Если есть данные о налоге\n\t shipping: deliveryCost.value, // Если есть данные о доставке\n\t items: shopcart.state.positions.map(item => ({\n\t item_id: item.product?._id,\n\t item_name: item.product?.name ,\n\t price: item.price || 0,\n\t quantity: item.quantity || 1,\n\t item_category: item.product?.category || ''\n\t })),\n\t organization: orderOrganization.value?.profile?.name,\n\t location: globals.state.position?.location || 'unknown',\n\t referral_code: referralCode || null,\n\t user_id: auth.state.user._id || 'anonymous'\n\t });\n\t }\n\t}\n\n if (order) {\n \tawait router.push({\n \t\tname: 'Order',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n \t\t\n \tshopcart.actions.resetShopcart()\n\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["ref","useRoute","useRouter","useGlobalMixins","computed","orders.state","users.state","shopcart.getters","globals.state","orders.getters","auth.state","orders.mutations","onMounted","users.actions","organizations.actions","shopcart.state","_a","_b","_c","watch","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8IA,UAAM,QAAQ;AAKd,UAAM,oBAAoBA,IAAG,IAAC,KAAK;AAErBC,cAAQ,SAAA;AACtB,UAAM,SAASC,UAAS,UAAA;AACxB,UAAM,EAAE,eAAgB,IAAGC,OAAe,gBAAA;AAE1C,UAAM,QAAQC,IAAAA,SAAS,MAAMC,OAAAA,MAAa,OAAO;AACpCD,QAAAA,SAAS,MAAME,MAAW,MAAC,OAAO;AAE/C,UAAM,iBAAiBC,SAAAA,QAAiB;AAExC,UAAM,eAAeH,IAAQ,SAAC,MAAM;;AAClC,YAAM,OAAOC,OAAAA,MAAa,QAAQ,SAAS;AAC3C,YAAM,aAAW,uBAAkB,MAAM,CAAC,MAAzB,mBAA4B,aAAY;AACzD,YAAM,WAASG,mBAAa,MAAC,YAAdA,mBAAuB,WAAvBA,mBAA+B,qBAAoB,CAAA;AAElE,aAAOC,eAAe,iBAAiB,MAAM,UAAU,MAAM;AAAA,IAC/D,CAAC;AAGD,UAAM,oBAAoBT,IAAG,IAAC,CAAE,CAAA;AAGhC,QAAI,CAACQ,QAAAA,MAAc,QAAQ,OAAO,8BAA8B,CAACE,KAAU,MAAC,KAAK,KAAK;AACrF,aAAO,KAAK,EAAC,MAAM,UAAS,CAAC;AA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OAAOL,SAAc,MAAC,UAAU,IAAI,UAAS;;AAAA;AAAA,gBAC3C,UAASC,MAAA,KAAK,YAAL,gBAAAA,IAAc;AAAA,gBACvB,YAAWC,MAAA,KAAK,YAAL,gBAAAA,IAAc;AAAA,gBACzB,OAAO,KAAK,SAAS;AAAA,gBACrB,UAAU,KAAK,YAAY;AAAA,gBAC3B,iBAAeC,MAAA,KAAK,YAAL,gBAAAA,IAAc,aAAY;AAAA,cAClD;AAAA,aAAS;AAAA,YACF,eAAc,6BAAkB,UAAlB,mBAAyB,YAAzB,mBAAkC;AAAA,YAChD,YAAUV,aAAa,MAAC,aAAdA,mBAAwB,aAAY;AAAA,YAC9C,eAAe,gBAAgB;AAAA,YAC/B,SAASE,KAAAA,MAAW,KAAK,OAAO;AAAA,UACvC,CAAM;AAAA,QACN;AAAA,MACA;AAEE,UAAIU,QAAO;AACV,cAAM,OAAO,KAAK;AAAA,UACjB,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,OAAOA,OAAM;AAAA,UAClB;AAAA,QACI,CAAA;AAEDE,iBAAAA,QAAiB,cAAa;AAAA,MAEjC,OAAS;AACN,cAAM,iBAAiB;AAAA,MAC1B;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"OrderCreate.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"bg-white pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"rows-1 gap-thin\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t\t:organization=\"orderOrganization[0]\" \n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t\t:organization=\"orderOrganization[0]\" \n\t\t\t/>\n\t\t\t\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-white br-solid br-light br-1px pd-medium radius-medium\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t\t\t\t\t@updateRentDates=\"(product, dates) => shopcart.actions.updateRentDates({ productId: product._id, dates })\"\n\t class=\"w-100 bg-white \"\n\t />\n\t\t\t</ul>\n\n\t\t\t\t<div \n\t\t\t\tclass=\"mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<PriceTotal \n :totalPrice=\"cartTotalPrice\"\n :deliveryRate=\"deliveryCost\"\n :currency=\"returnCurrency()\"\n :showFees=\"globals.state.options?.orders.showFees\"\n :feesRate=\"globals.state.options?.orders.feesRate || 0\"\n :showVat=\"globals.state.options?.orders.showVat\"\n :vatRate=\"globals.state.options?.orders.vatRate || 0\"\n :showDeliveryFee=\"globals.state.options?.orders.showDeliveryFee\"\n />\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <Button\n v-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n :submit=\"() => handleCreate()\"\n class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n :disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t || isLocationLoading\n\t\t \"\n >\n <span>Place an Order</span>\n </Button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport Button from '@martyrs/src/components/Button/Button.vue'\n// Block\nimport CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@martyrs/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@martyrs/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@martyrs/src/modules/orders/components/sections/EmptyState.vue'\n\nimport PriceTotal from '@martyrs/src/modules/orders/components/elements/PriceTotal.vue';\n\nimport FormCustomerDetails from '@martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@martyrs/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\nimport { useGlobalMixins } from \"@martyrs/src/modules/globals/views/mixins/mixins.js\"\n\n// Store\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals';\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\nimport * as shopcart from '@martyrs/src/modules/orders/store/shopcart';\nimport * as organizations from '@martyrs/src/modules/organizations/store/organizations';\nimport * as orders from '@martyrs/src/modules/orders/store/orders';\nimport * as users from '@martyrs/src/modules/auth/views/store/users';\n\nconst emits = defineEmits(['page-loading', 'page-loaded']);\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n//////////////////////////////////////////////////////////////////////////////////////////////////\nconst isLocationLoading = ref(false)\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\nconst { returnCurrency } = useGlobalMixins()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\n\nconst cartTotalPrice = shopcart.getters.cartTotalPrice\n\nconst deliveryCost = computed(() => {\n const type = orders.state.current.delivery.type\n const distance = orderOrganization.value[0]?.distance || 0\n const config = globals.state.options?.orders?.delivery_formula || {}\n\n return orders.getters.getDeliveryPrice(type, distance, config)\n})\n\n// Organization\nconst orderOrganization = ref({})\n\n\nif (!globals.state.options.orders.allowUnauthenticatedOrders && !auth.state.user._id) { \n\trouter.push({name: 'Sign In'})\t\n}\n\n\norders.mutations.resetOrder()\n\nonMounted(async()=> {\n\temits('page-loading');\n\n\tisLocationLoading.value = true\n\n\tif (auth.state.user._id) {\n\t\tlet data = await users.actions.read({ _id:auth.state.user._id, user: auth.state.user._id });\n\n\t\torders.state.current.customer.profile.name = users.state.current.profile.name\n\t\torders.state.current.customer.phone = users.state.current.phone\n\t\torders.state.current.customer.phone = users.state.current.phone\n\t}\n\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t lookup: ['spots']\n\t})\n\t\n \tisLocationLoading.value = false\n emits('page-loaded');\n\n if (typeof gtag === 'function') {\n gtag('event', 'begin_checkout', {\n currency: returnCurrency(), // Замените на вашу валюту\n value: cartTotalPrice || 0,\n items: shopcart.state.positions.map(item => ({\n item_id: item.product?._id,\n item_name: item.product?.name,\n price: item.price || 0,\n quantity: item.quantity || 1,\n item_category: item.product?.category || '',\n item_brand: orderOrganization.value.profile?.name || ''\n })),\n organization: orderOrganization.value.profile?.name || '',\n location: globals.state.position?.location || 'unknown'\n });\n }\n})\n\n\nwatch(\n () => orders.state.current.delivery,\n async (newVal) => {\n if (newVal?.location) {\n \tisLocationLoading.value = true\n\n orderOrganization.value = await organizations.actions.read({\n _id: shopcart.state.organization,\n location: newVal.location,\n lookup: ['spots']\n })\n\n isLocationLoading.value = false\n }\n },\n { deep: true }\n)\n\n\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n const type = orders.state.current.delivery.type;\n if (type === \"pickup\") {\n return !orders.state.current.delivery.spot;\n } else if (type === \"courier\" || type === \"mail\") {\n const address = orders.state.current.delivery.address;\n return !address || typeof address !== 'string' || address.length < 2;\n }\n return false;\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: orderOrganization.value[0]._id,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'user'\n\t\t}\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.customer = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'user'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n\t if (typeof gtag === 'function') {\n\t gtag('event', 'purchase', {\n\t transaction_id: order._id,\n\t value: cartTotalPrice || 0,\n\t currency: returnCurrency(), // Замените на вашу валюту\n\t tax: 0, // Если есть данные о налоге\n\t shipping: deliveryCost.value, // Если есть данные о доставке\n\t items: shopcart.state.positions.map(item => ({\n\t item_id: item.product?._id,\n\t item_name: item.product?.name ,\n\t price: item.price || 0,\n\t quantity: item.quantity || 1,\n\t item_category: item.product?.category || ''\n\t })),\n\t organization: orderOrganization.value?.profile?.name,\n\t location: globals.state.position?.location || 'unknown',\n\t referral_code: referralCode || null,\n\t user_id: auth.state.user._id || 'anonymous'\n\t });\n\t }\n\t}\n\n if (order) {\n \tawait router.push({\n \t\tname: 'Order',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n \t\t\n \tshopcart.actions.resetShopcart()\n\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["ref","useRoute","useRouter","useGlobalMixins","computed","orders.state","users.state","shopcart.getters","globals.state","orders.getters","auth.state","orders.mutations","onMounted","users.actions","organizations.actions","shopcart.state","_a","_b","_c","watch","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4IA,UAAM,QAAQ;AAKd,UAAM,oBAAoBA,IAAG,IAAC,KAAK;AAErBC,cAAQ,SAAA;AACtB,UAAM,SAASC,UAAS,UAAA;AACxB,UAAM,EAAE,eAAgB,IAAGC,OAAe,gBAAA;AAE1C,UAAM,QAAQC,IAAAA,SAAS,MAAMC,OAAAA,MAAa,OAAO;AACpCD,QAAAA,SAAS,MAAME,MAAW,MAAC,OAAO;AAE/C,UAAM,iBAAiBC,SAAAA,QAAiB;AAExC,UAAM,eAAeH,IAAQ,SAAC,MAAM;;AAClC,YAAM,OAAOC,OAAAA,MAAa,QAAQ,SAAS;AAC3C,YAAM,aAAW,uBAAkB,MAAM,CAAC,MAAzB,mBAA4B,aAAY;AACzD,YAAM,WAASG,mBAAa,MAAC,YAAdA,mBAAuB,WAAvBA,mBAA+B,qBAAoB,CAAA;AAElE,aAAOC,eAAe,iBAAiB,MAAM,UAAU,MAAM;AAAA,IAC/D,CAAC;AAGD,UAAM,oBAAoBT,IAAG,IAAC,CAAE,CAAA;AAGhC,QAAI,CAACQ,QAAAA,MAAc,QAAQ,OAAO,8BAA8B,CAACE,KAAU,MAAC,KAAK,KAAK;AACrF,aAAO,KAAK,EAAC,MAAM,UAAS,CAAC;AAAA,IAC9B;AAGAC,WAAAA,UAAiB,WAAU;AAE3BC,QAAAA,UAAU,YAAU;;AACnB,YAAM,cAAc;AAEpB,wBAAkB,QAAQ;AAE1B,UAAIF,KAAU,MAAC,KAAK,KAAK;AACb,cAAMG,cAAc,KAAK,EAAE,KAA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