@ozdao/martyrs 0.2.474 → 0.2.476
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-sGk7Bp9b.mjs → Media-CecrG6g6.mjs} +1 -1
- package/dist/{Media-_vz04tII.js → Media-DmnrxIEI.js} +1 -1
- package/dist/_virtual/alignment-pattern.cjs +5 -0
- package/dist/_virtual/alignment-pattern.cjs.map +1 -0
- package/dist/_virtual/alignment-pattern.js +5 -0
- package/dist/_virtual/alignment-pattern.js.map +1 -0
- package/dist/_virtual/browser.cjs +8 -0
- package/dist/_virtual/browser.cjs.map +1 -0
- package/dist/_virtual/browser.js +8 -0
- package/dist/_virtual/browser.js.map +1 -0
- package/dist/_virtual/browser2.cjs +5 -0
- package/dist/_virtual/browser2.cjs.map +1 -0
- package/dist/_virtual/browser2.js +5 -0
- package/dist/_virtual/browser2.js.map +1 -0
- package/dist/_virtual/canvas.cjs +5 -0
- package/dist/_virtual/canvas.cjs.map +1 -0
- package/dist/_virtual/canvas.js +5 -0
- package/dist/_virtual/canvas.js.map +1 -0
- package/dist/_virtual/dijkstra.cjs +5 -0
- package/dist/_virtual/dijkstra.cjs.map +1 -0
- package/dist/_virtual/dijkstra.js +5 -0
- package/dist/_virtual/dijkstra.js.map +1 -0
- package/dist/_virtual/error-correction-code.cjs +5 -0
- package/dist/_virtual/error-correction-code.cjs.map +1 -0
- package/dist/_virtual/error-correction-code.js +5 -0
- package/dist/_virtual/error-correction-code.js.map +1 -0
- package/dist/_virtual/error-correction-level.cjs +5 -0
- package/dist/_virtual/error-correction-level.cjs.map +1 -0
- package/dist/_virtual/error-correction-level.js +5 -0
- package/dist/_virtual/error-correction-level.js.map +1 -0
- package/dist/_virtual/finder-pattern.cjs +5 -0
- package/dist/_virtual/finder-pattern.cjs.map +1 -0
- package/dist/_virtual/finder-pattern.js +5 -0
- package/dist/_virtual/finder-pattern.js.map +1 -0
- package/dist/_virtual/format-info.cjs +5 -0
- package/dist/_virtual/format-info.cjs.map +1 -0
- package/dist/_virtual/format-info.js +5 -0
- package/dist/_virtual/format-info.js.map +1 -0
- package/dist/_virtual/galois-field.cjs +5 -0
- package/dist/_virtual/galois-field.cjs.map +1 -0
- package/dist/_virtual/galois-field.js +5 -0
- package/dist/_virtual/galois-field.js.map +1 -0
- package/dist/_virtual/mask-pattern.cjs +5 -0
- package/dist/_virtual/mask-pattern.cjs.map +1 -0
- package/dist/_virtual/mask-pattern.js +5 -0
- package/dist/_virtual/mask-pattern.js.map +1 -0
- package/dist/_virtual/mode.cjs +5 -0
- package/dist/_virtual/mode.cjs.map +1 -0
- package/dist/_virtual/mode.js +5 -0
- package/dist/_virtual/mode.js.map +1 -0
- package/dist/_virtual/polynomial.cjs +5 -0
- package/dist/_virtual/polynomial.cjs.map +1 -0
- package/dist/_virtual/polynomial.js +5 -0
- package/dist/_virtual/polynomial.js.map +1 -0
- package/dist/_virtual/qrcode.cjs +5 -0
- package/dist/_virtual/qrcode.cjs.map +1 -0
- package/dist/_virtual/qrcode.js +5 -0
- package/dist/_virtual/qrcode.js.map +1 -0
- package/dist/_virtual/regex.cjs +5 -0
- package/dist/_virtual/regex.cjs.map +1 -0
- package/dist/_virtual/regex.js +5 -0
- package/dist/_virtual/regex.js.map +1 -0
- package/dist/_virtual/segments.cjs +5 -0
- package/dist/_virtual/segments.cjs.map +1 -0
- package/dist/_virtual/segments.js +5 -0
- package/dist/_virtual/segments.js.map +1 -0
- package/dist/_virtual/svg-tag.cjs +5 -0
- package/dist/_virtual/svg-tag.cjs.map +1 -0
- package/dist/_virtual/svg-tag.js +5 -0
- package/dist/_virtual/svg-tag.js.map +1 -0
- package/dist/_virtual/utils.cjs +5 -0
- package/dist/_virtual/utils.cjs.map +1 -0
- package/dist/_virtual/utils.js +5 -0
- package/dist/_virtual/utils.js.map +1 -0
- package/dist/_virtual/utils2.cjs +5 -0
- package/dist/_virtual/utils2.cjs.map +1 -0
- package/dist/_virtual/utils2.js +5 -0
- package/dist/_virtual/utils2.js.map +1 -0
- package/dist/_virtual/version-check.cjs +5 -0
- package/dist/_virtual/version-check.cjs.map +1 -0
- package/dist/_virtual/version-check.js +5 -0
- package/dist/_virtual/version-check.js.map +1 -0
- package/dist/_virtual/version.cjs +5 -0
- package/dist/_virtual/version.cjs.map +1 -0
- package/dist/_virtual/version.js +5 -0
- package/dist/_virtual/version.js.map +1 -0
- package/dist/globals.server.js +263 -55
- package/dist/globals.server.mjs +263 -55
- package/dist/{main-CqMtW7Hq.mjs → main-DmznvhMM.mjs} +267 -266
- package/dist/main-DxWqDgs1.js +11 -0
- package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.2.1/node_modules/bignumber.js/bignumber.cjs +1336 -0
- package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.2.1/node_modules/bignumber.js/bignumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.2.1/node_modules/bignumber.js/bignumber.js +1336 -0
- package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.2.1/node_modules/bignumber.js/bignumber.js.map +1 -0
- package/dist/martyrs/src/components/Button/{Button.vue2.cjs → Button.vue.cjs} +6 -4
- package/dist/martyrs/src/components/Button/{Button.vue2.js.map → Button.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +7 -5
- package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +93 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js +94 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +0 -93
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +1 -94
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/martyrs/src/components/EmptyState/EmptyState.vue.cjs +3 -3
- package/dist/martyrs/src/components/EmptyState/EmptyState.vue.js +3 -3
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +3 -2
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +3 -2
- package/dist/martyrs/src/components/FieldBig/FieldBig.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/Select/Select.vue.cjs +10 -12
- package/dist/martyrs/src/components/Select/Select.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Select/Select.vue.js +10 -12
- package/dist/martyrs/src/components/Select/Select.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/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- 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 +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.cjs +14 -0
- package/dist/martyrs/src/modules/auth/views/router/users.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.js +14 -0
- package/dist/martyrs/src/modules/auth/views/router/users.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +4 -4
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +4 -4
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +5 -5
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +5 -5
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +3 -3
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.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/events/components/sections/EventsHot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +90 -2
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +90 -2
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +4 -4
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +4 -4
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +3 -3
- 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 +3 -3
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +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/landing/components/sections/SectionFeatures.vue.cjs +13 -16
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +13 -16
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.cjs +32 -35
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js +32 -35
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs +2 -2
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +2 -2
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs +5 -3
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +5 -3
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +3 -3
- 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 +3 -3
- 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 +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- 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/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- 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 +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- 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/DetailsTabSection.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- 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 +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- 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/EditProductInfo.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
- 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/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +6 -6
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +6 -6
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.cjs +43 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +43 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +47 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +47 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.cjs +29 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +29 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +89 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +89 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.cjs +135 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +135 -0
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +242 -0
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +242 -0
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.cjs +9 -0
- package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.cjs.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js +9 -0
- package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/store/wallet.store.cjs +135 -0
- package/dist/martyrs/src/modules/wallet/views/store/wallet.store.cjs.map +1 -0
- package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js +135 -0
- package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js.map +1 -0
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.cjs +106 -0
- package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.cjs.map +1 -0
- package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +106 -0
- package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.cjs +79 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +79 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.cjs +14 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +14 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.cjs +43 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +43 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.cjs +85 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +85 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.cjs +40 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +40 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.cjs +34 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +34 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.cjs +36 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +36 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.cjs +367 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +367 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.cjs +52 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +52 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.cjs +25 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +25 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.cjs +24 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +24 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.cjs +38 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +38 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.cjs +46 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +46 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.cjs +149 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +149 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.cjs +90 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +90 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.cjs +41 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +41 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.cjs +44 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +44 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.cjs +279 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +279 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.cjs +38 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +38 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.cjs +33 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +33 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.cjs +201 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +201 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs +84 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +84 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.cjs +14 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +14 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.cjs +107 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +107 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.cjs +61 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +61 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.cjs +64 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +64 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs +87 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs.map +1 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +87 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js.map +1 -0
- package/dist/style.css +33 -28
- package/package.json +1 -1
- package/src/components/Button/Button.vue +1 -1
- package/src/components/EmptyState/EmptyState.vue +3 -3
- package/src/components/FieldBig/FieldBig.vue +2 -2
- package/src/components/Select/Select.vue +4 -7
- package/src/modules/auth/views/router/users.js +11 -11
- package/src/modules/community/components/blocks/CardBlogpost.vue +4 -4
- package/src/modules/community/components/layouts/Community.vue +5 -4
- package/src/modules/community/components/pages/CreateBlogPost.vue +2 -2
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/globals/controllers/classes/globals.websocket.js +336 -71
- package/src/modules/globals/controllers/classes/globals.websocket.ws.js +124 -0
- package/src/modules/globals/views/classes/globals.websocket.js +121 -5
- package/src/modules/globals/views/classes/globals.websocket.ws.js +212 -0
- package/src/modules/globals/views/components/blocks/CardHeader.vue +2 -2
- package/src/modules/globals/views/components/partials/Header.vue +1 -1
- package/src/modules/globals/views/components/partials/Navigation.vue +1 -1
- package/src/modules/icons/entities/IconFile.vue +14 -0
- package/src/modules/icons/navigation/IconAttach.vue +14 -0
- package/src/modules/icons/navigation/IconDoubleCheck.vue +31 -0
- package/src/modules/icons/navigation/IconSend.vue +17 -0
- package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
- package/src/modules/landing/components/sections/SectionMobileApp.vue +4 -6
- package/src/modules/marketplace/views/components/layouts/Marketplace.vue +1 -3
- package/src/modules/notifications/components/elements/NotificationBadge.vue +4 -4
- package/src/modules/orders/components/pages/OrderCreate.vue +2 -3
- package/src/modules/organizations/components/sections/Unit.vue +3 -3
- package/src/modules/spots/components/pages/SpotEdit.vue +0 -1
- package/src/modules/spots/components/sections/WorktimeEdit.vue +5 -5
- package/src/modules/wallet/views/components/pages/Wallet.vue +10 -7
- package/src/styles/reset.scss +1 -1
- package/src/styles/typography.scss +16 -2
- package/dist/main-CsGkbSyK.js +0 -11
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- 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/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Marketplace.vue.cjs","sources":["../../../../../../../../src/modules/marketplace/views/components/layouts/Marketplace.vue"],"sourcesContent":["<template>\n\t<div style=\"min-height: 100%;\" class=\"h-min-100\">\n\t\t\n\n\t\t <div class=\"cols-2-1_3 h-100 z-index-3 pos-relative radius-big\">\n\n\t\t\t<div class=\"o-y-scroll br-r br-solid br-light z-index-2 desktop-only h-100 pos-relative\">\n\t \t<BlockFilter\n v-model:filter=\"marketplace.state.filter\"\n :options=\"marketplace.state.filter.options\"\n class=\"h-100 w-100 pd-medium\"\n\t\t />\n\t\t </div>\n\n\t\t\t<!-- Catalog wrapper -->\n\t\t\t<div class=\"pd-thin\">\n\t\t\t\t<header class=\"pd-medium radius-medium bg-light mn-b-thin\">\n\t\t \t<h2 class=\"\">\n\t\t \t\t<span class=\"\">Weed Deliveries in </span>\n\n\t\t \t\t<span \n\t\t \t\t\tv-if=\"localPosition.city || localPosition.state || localPosition.country\"\n\t\t \t\t\t@click=\"a => { globals.state.isOpenLocationPopup = true }\" \n\t\t \t\t\tclass=\"t-main t-semi cursor-pointer \"\n\t\t \t\t>\n\t\t \t\t\t\t<template v-if=\"localPosition.city\">{{localPosition.city}}, </template>\n\t\t \t\t\t\t<template v-if=\"localPosition.state\">{{localPosition.state}}, </template>\n\t\t \t\t\t\t<template v-if=\"localPosition.country\">{{localPosition.country}}</template>\n\t\t \t\t</span>\n\n\t\t \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"h2 pd-l-small pd-r-small pd-t-micro pd-b-micro d-inline-block t-semi radius-extra bg-main t-black cursor-pointer\">\n\t\t\t\t\t\t\t\tThe World\n\t\t \t\t</span>\n\t\t \t</h2>\n\t\t\t\t</header>\n\n\t\t\t\t<div class=\"rows-1\">\n\t\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t\t<component ref=\"page\" :key=\"route\" :localPosition=\"localPosition\" :is=\"Component\" />\n\t\t\t\t\t</router-view>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals'\n import * as categories from '@martyrs/src/modules/products/store/categories';\n\n\n\timport * as marketplace from '../../store/marketplace';\n\n\t// Accessing router and store\n\tconst route = useRoute()\n\tconst router = useRouter()\n\n\tconst localPosition = ref({\n\t\tcity: null,\n\t\tstate: null,\n\t\tcountry: null\n\t});\n\n\tconst desktopFilters = ref(null)\n\n\tfunction denormalizeUrlParam(param) {\n\t return param\n\t .replace(/-/g, ' ') // Замена дефисов на пробелы\n\t .replace(/\\b\\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную\n\t}\n\n\tfunction normalizeUrlParam(param) {\n\t return param\n\t .toLowerCase()\n\t .replace(/ /g, '-')\n\t .replace(/[^a-z0-9-]/g, '');\n\t}\n\n\tif (route.params) {\n // Загружаем новые значения из параметров маршрута в состояние\n let newState = {\n country: denormalizeUrlParam(route.params.country),\n state: denormalizeUrlParam(route.params.state),\n city: denormalizeUrlParam(route.params.city),\n };\n\n\t // Обновляем глобальное состояние\n\t localPosition.value = newState;\n\t}\n\n\tif (route.query) {\n\t \tconst query = route.query;\n\n\t\tmarketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];\n\t\tmarketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];\n\t\tmarketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];\n\t}\n\n\tif (route.query.sortParam) marketplace.state.sort.param = route.query.sortParam\n\tif (route.query.sortOrder) marketplace.state.sort.order = route.query.sortOrder\n\n\tonMounted(async () => {\n\t let options = {\n status: 'published',\n rootOnly: true\n }\n\n let categoriesFilter = await categories.actions.read(options);\n\n categoriesFilter = categoriesFilter.map(category => ({\n value: category._id,\n label: category.name\n }));\n\n const index = marketplace.state.filter.options.findIndex(option => option.value === 'categories');\n\n const categoryOption = {\n title: 'Categories',\n value: 'categories',\n options: categoriesFilter\n };\n\n if (index !== -1) {\n marketplace.state.filter.options[index] = categoryOption;\n } else {\n marketplace.state.filter.options.unshift(categoryOption);\n }\n\t})\n\n\twatch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {\n\t\tlet query = { ...route.query}\n\t\t\n\t\tquery.sortParam = newSortValue.param\n\t\tquery.sortOrder = newSortValue.order\n\t \n\t // replace the current route\n\t router.replace({ query });\n\t}, { deep: true });\n\n\n\twatch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n\t // Переводим фильтр в формат query\n\t const query = { ...route.query };\n\n\t // Удаляем старые значения фильтра из query\n\t Object.keys(oldFilterValue).forEach(key => {\n\t if (query[key]) {\n\t delete query[key];\n\t }\n\t });\n\n\t // Добавляем новые значения фильтра в query\n\t const newQueryValues = Object.fromEntries(\n\t Object.entries(newFilterValue)\n\t .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n\t .map(([key, value]) => [key, value.join(',')])\n\t );\n\n\t delete query.options;\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.replace({ query });\n\t}, { deep: true })\n\n\twatch(() => globals.state.position, (newPosition) => {\n\t // get the current route\n\t const currentRoute = { ...router.currentRoute.value };\n\t \n\t // create new parameters based on globals state position\n\t let newParams = {\n\t country: normalizeUrlParam(newPosition.country),\n\t state: normalizeUrlParam(newPosition.state),\n\t city: normalizeUrlParam(newPosition.city),\n\t };\n\t \n\t // update route params\n\t currentRoute.params = newParams;\n\t \n\t // replace the current route\n\t router.replace(currentRoute);\n\t}, { deep: true });\n\n const text = {\n locale: 'en',\n messages: {\n en: {\n\t \tmeta: {\n title: \"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery\",\n description: \"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.\",\n }\n },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n }\n }\n }\n }\n\n \tconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","ref","marketplace.state","onMounted","categories.actions","watch","globals.state","useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8DC,UAAM,QAAQA,UAAQ,SAAA;AACtB,UAAM,SAASC,UAAS,UAAA;AAExB,UAAM,gBAAgBC,IAAAA,IAAI;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,IACX,CAAE;AAEsBA,QAAAA,IAAI,IAAI;AAE/B,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IAC3C;AAEC,aAAS,kBAAkB,OAAO;AAChC,aAAO,MACJ,YAAW,EACX,QAAQ,MAAM,GAAG,EACjB,QAAQ,eAAe,EAAE;AAAA,IAC/B;AAEC,QAAI,MAAM,QAAQ;AAEf,UAAI,WAAW;AAAA,QACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAAA,QACjD,OAAO,oBAAoB,MAAM,OAAO,KAAK;AAAA,QAC7C,MAAM,oBAAoB,MAAM,OAAO,IAAI;AAAA,MAC5C;AAGF,oBAAc,QAAQ;AAAA,IACzB;AAEC,QAAI,MAAM,OAAO;AACf,YAAM,QAAQ,MAAM;AAErBC,kBAAAA,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Marketplace.vue.cjs","sources":["../../../../../../../../src/modules/marketplace/views/components/layouts/Marketplace.vue"],"sourcesContent":["<template>\n\t<div style=\"min-height: 100%;\" class=\"h-min-100\">\n\t\t\n\n\t\t <div class=\"cols-2-1_3 h-100 z-index-3 pos-relative radius-big\">\n\n\t\t\t<div class=\"o-y-scroll br-r br-solid br-light z-index-2 desktop-only h-100 pos-relative\">\n\t \t<BlockFilter\n v-model:filter=\"marketplace.state.filter\"\n :options=\"marketplace.state.filter.options\"\n class=\"h-100 w-100 pd-medium\"\n\t\t />\n\t\t </div>\n\n\t\t\t<!-- Catalog wrapper -->\n\t\t\t<div class=\"pd-thin\">\n\t\t\t\t<header class=\"pd-medium radius-medium bg-light mn-b-thin\">\n\t\t \t<h2 class=\"\">\n\t\t \t\t<span class=\"\">Weed Deliveries in </span>\n\n\t\t \t\t<span \n\t\t \t\t\tv-if=\"localPosition.city || localPosition.state || localPosition.country\"\n\t\t \t\t\t@click=\"a => { globals.state.isOpenLocationPopup = true }\" \n\t\t \t\t\tclass=\"t-main t-semi cursor-pointer \"\n\t\t \t\t>\n\t\t \t\t\t\t<template v-if=\"localPosition.city\">{{localPosition.city}}, </template>\n\t\t \t\t\t\t<template v-if=\"localPosition.state\">{{localPosition.state}}, </template>\n\t\t \t\t\t\t<template v-if=\"localPosition.country\">{{localPosition.country}}</template>\n\t\t \t\t</span>\n\n\t\t \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"t-main t-semi cursor-pointer\">The World</span>\n\t\t \t</h2>\n\t\t\t\t</header>\n\n\t\t\t\t<div class=\"rows-1\">\n\t\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t\t<component ref=\"page\" :key=\"route\" :localPosition=\"localPosition\" :is=\"Component\" />\n\t\t\t\t\t</router-view>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals'\n import * as categories from '@martyrs/src/modules/products/store/categories';\n\n\n\timport * as marketplace from '../../store/marketplace';\n\n\t// Accessing router and store\n\tconst route = useRoute()\n\tconst router = useRouter()\n\n\tconst localPosition = ref({\n\t\tcity: null,\n\t\tstate: null,\n\t\tcountry: null\n\t});\n\n\tconst desktopFilters = ref(null)\n\n\tfunction denormalizeUrlParam(param) {\n\t return param\n\t .replace(/-/g, ' ') // Замена дефисов на пробелы\n\t .replace(/\\b\\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную\n\t}\n\n\tfunction normalizeUrlParam(param) {\n\t return param\n\t .toLowerCase()\n\t .replace(/ /g, '-')\n\t .replace(/[^a-z0-9-]/g, '');\n\t}\n\n\tif (route.params) {\n // Загружаем новые значения из параметров маршрута в состояние\n let newState = {\n country: denormalizeUrlParam(route.params.country),\n state: denormalizeUrlParam(route.params.state),\n city: denormalizeUrlParam(route.params.city),\n };\n\n\t // Обновляем глобальное состояние\n\t localPosition.value = newState;\n\t}\n\n\tif (route.query) {\n\t \tconst query = route.query;\n\n\t\tmarketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];\n\t\tmarketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];\n\t\tmarketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];\n\t}\n\n\tif (route.query.sortParam) marketplace.state.sort.param = route.query.sortParam\n\tif (route.query.sortOrder) marketplace.state.sort.order = route.query.sortOrder\n\n\tonMounted(async () => {\n\t let options = {\n status: 'published',\n rootOnly: true\n }\n\n let categoriesFilter = await categories.actions.read(options);\n\n categoriesFilter = categoriesFilter.map(category => ({\n value: category._id,\n label: category.name\n }));\n\n const index = marketplace.state.filter.options.findIndex(option => option.value === 'categories');\n\n const categoryOption = {\n title: 'Categories',\n value: 'categories',\n options: categoriesFilter\n };\n\n if (index !== -1) {\n marketplace.state.filter.options[index] = categoryOption;\n } else {\n marketplace.state.filter.options.unshift(categoryOption);\n }\n\t})\n\n\twatch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {\n\t\tlet query = { ...route.query}\n\t\t\n\t\tquery.sortParam = newSortValue.param\n\t\tquery.sortOrder = newSortValue.order\n\t \n\t // replace the current route\n\t router.replace({ query });\n\t}, { deep: true });\n\n\n\twatch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n\t // Переводим фильтр в формат query\n\t const query = { ...route.query };\n\n\t // Удаляем старые значения фильтра из query\n\t Object.keys(oldFilterValue).forEach(key => {\n\t if (query[key]) {\n\t delete query[key];\n\t }\n\t });\n\n\t // Добавляем новые значения фильтра в query\n\t const newQueryValues = Object.fromEntries(\n\t Object.entries(newFilterValue)\n\t .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n\t .map(([key, value]) => [key, value.join(',')])\n\t );\n\n\t delete query.options;\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.replace({ query });\n\t}, { deep: true })\n\n\twatch(() => globals.state.position, (newPosition) => {\n\t // get the current route\n\t const currentRoute = { ...router.currentRoute.value };\n\t \n\t // create new parameters based on globals state position\n\t let newParams = {\n\t country: normalizeUrlParam(newPosition.country),\n\t state: normalizeUrlParam(newPosition.state),\n\t city: normalizeUrlParam(newPosition.city),\n\t };\n\t \n\t // update route params\n\t currentRoute.params = newParams;\n\t \n\t // replace the current route\n\t router.replace(currentRoute);\n\t}, { deep: true });\n\n const text = {\n locale: 'en',\n messages: {\n en: {\n\t \tmeta: {\n title: \"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery\",\n description: \"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.\",\n }\n },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n }\n }\n }\n }\n\n \tconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","ref","marketplace.state","onMounted","categories.actions","watch","globals.state","useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4DC,UAAM,QAAQA,UAAQ,SAAA;AACtB,UAAM,SAASC,UAAS,UAAA;AAExB,UAAM,gBAAgBC,IAAAA,IAAI;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,IACX,CAAE;AAEsBA,QAAAA,IAAI,IAAI;AAE/B,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IAC3C;AAEC,aAAS,kBAAkB,OAAO;AAChC,aAAO,MACJ,YAAW,EACX,QAAQ,MAAM,GAAG,EACjB,QAAQ,eAAe,EAAE;AAAA,IAC/B;AAEC,QAAI,MAAM,QAAQ;AAEf,UAAI,WAAW;AAAA,QACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAAA,QACjD,OAAO,oBAAoB,MAAM,OAAO,KAAK;AAAA,QAC7C,MAAM,oBAAoB,MAAM,OAAO,IAAI;AAAA,MAC5C;AAGF,oBAAc,QAAQ;AAAA,IACzB;AAEC,QAAI,MAAM,OAAO;AACf,YAAM,QAAQ,MAAM;AAErBC,kBAAAA,MAAkB,OAAO,SAAS,aAAa,MAAM,aAAa,MAAM,WAAW,MAAM,GAAG,IAAI,CAAE;AAClGA,kBAAAA,MAAkB,OAAO,SAAS,SAA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|
155
155
|
onClick: _cache[2] || (_cache[2] = (a) => {
|
|
156
156
|
state$1.isOpenLocationPopup = true;
|
|
157
157
|
}),
|
|
158
|
-
class: "
|
|
159
|
-
}, "
|
|
158
|
+
class: "t-main t-semi cursor-pointer"
|
|
159
|
+
}, "The World"))
|
|
160
160
|
])
|
|
161
161
|
]),
|
|
162
162
|
createElementVNode("div", _hoisted_7, [
|
package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Marketplace.vue.js","sources":["../../../../../../../../src/modules/marketplace/views/components/layouts/Marketplace.vue"],"sourcesContent":["<template>\n\t<div style=\"min-height: 100%;\" class=\"h-min-100\">\n\t\t\n\n\t\t <div class=\"cols-2-1_3 h-100 z-index-3 pos-relative radius-big\">\n\n\t\t\t<div class=\"o-y-scroll br-r br-solid br-light z-index-2 desktop-only h-100 pos-relative\">\n\t \t<BlockFilter\n v-model:filter=\"marketplace.state.filter\"\n :options=\"marketplace.state.filter.options\"\n class=\"h-100 w-100 pd-medium\"\n\t\t />\n\t\t </div>\n\n\t\t\t<!-- Catalog wrapper -->\n\t\t\t<div class=\"pd-thin\">\n\t\t\t\t<header class=\"pd-medium radius-medium bg-light mn-b-thin\">\n\t\t \t<h2 class=\"\">\n\t\t \t\t<span class=\"\">Weed Deliveries in </span>\n\n\t\t \t\t<span \n\t\t \t\t\tv-if=\"localPosition.city || localPosition.state || localPosition.country\"\n\t\t \t\t\t@click=\"a => { globals.state.isOpenLocationPopup = true }\" \n\t\t \t\t\tclass=\"t-main t-semi cursor-pointer \"\n\t\t \t\t>\n\t\t \t\t\t\t<template v-if=\"localPosition.city\">{{localPosition.city}}, </template>\n\t\t \t\t\t\t<template v-if=\"localPosition.state\">{{localPosition.state}}, </template>\n\t\t \t\t\t\t<template v-if=\"localPosition.country\">{{localPosition.country}}</template>\n\t\t \t\t</span>\n\n\t\t \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"h2 pd-l-small pd-r-small pd-t-micro pd-b-micro d-inline-block t-semi radius-extra bg-main t-black cursor-pointer\">\n\t\t\t\t\t\t\t\tThe World\n\t\t \t\t</span>\n\t\t \t</h2>\n\t\t\t\t</header>\n\n\t\t\t\t<div class=\"rows-1\">\n\t\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t\t<component ref=\"page\" :key=\"route\" :localPosition=\"localPosition\" :is=\"Component\" />\n\t\t\t\t\t</router-view>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals'\n import * as categories from '@martyrs/src/modules/products/store/categories';\n\n\n\timport * as marketplace from '../../store/marketplace';\n\n\t// Accessing router and store\n\tconst route = useRoute()\n\tconst router = useRouter()\n\n\tconst localPosition = ref({\n\t\tcity: null,\n\t\tstate: null,\n\t\tcountry: null\n\t});\n\n\tconst desktopFilters = ref(null)\n\n\tfunction denormalizeUrlParam(param) {\n\t return param\n\t .replace(/-/g, ' ') // Замена дефисов на пробелы\n\t .replace(/\\b\\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную\n\t}\n\n\tfunction normalizeUrlParam(param) {\n\t return param\n\t .toLowerCase()\n\t .replace(/ /g, '-')\n\t .replace(/[^a-z0-9-]/g, '');\n\t}\n\n\tif (route.params) {\n // Загружаем новые значения из параметров маршрута в состояние\n let newState = {\n country: denormalizeUrlParam(route.params.country),\n state: denormalizeUrlParam(route.params.state),\n city: denormalizeUrlParam(route.params.city),\n };\n\n\t // Обновляем глобальное состояние\n\t localPosition.value = newState;\n\t}\n\n\tif (route.query) {\n\t \tconst query = route.query;\n\n\t\tmarketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];\n\t\tmarketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];\n\t\tmarketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];\n\t}\n\n\tif (route.query.sortParam) marketplace.state.sort.param = route.query.sortParam\n\tif (route.query.sortOrder) marketplace.state.sort.order = route.query.sortOrder\n\n\tonMounted(async () => {\n\t let options = {\n status: 'published',\n rootOnly: true\n }\n\n let categoriesFilter = await categories.actions.read(options);\n\n categoriesFilter = categoriesFilter.map(category => ({\n value: category._id,\n label: category.name\n }));\n\n const index = marketplace.state.filter.options.findIndex(option => option.value === 'categories');\n\n const categoryOption = {\n title: 'Categories',\n value: 'categories',\n options: categoriesFilter\n };\n\n if (index !== -1) {\n marketplace.state.filter.options[index] = categoryOption;\n } else {\n marketplace.state.filter.options.unshift(categoryOption);\n }\n\t})\n\n\twatch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {\n\t\tlet query = { ...route.query}\n\t\t\n\t\tquery.sortParam = newSortValue.param\n\t\tquery.sortOrder = newSortValue.order\n\t \n\t // replace the current route\n\t router.replace({ query });\n\t}, { deep: true });\n\n\n\twatch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n\t // Переводим фильтр в формат query\n\t const query = { ...route.query };\n\n\t // Удаляем старые значения фильтра из query\n\t Object.keys(oldFilterValue).forEach(key => {\n\t if (query[key]) {\n\t delete query[key];\n\t }\n\t });\n\n\t // Добавляем новые значения фильтра в query\n\t const newQueryValues = Object.fromEntries(\n\t Object.entries(newFilterValue)\n\t .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n\t .map(([key, value]) => [key, value.join(',')])\n\t );\n\n\t delete query.options;\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.replace({ query });\n\t}, { deep: true })\n\n\twatch(() => globals.state.position, (newPosition) => {\n\t // get the current route\n\t const currentRoute = { ...router.currentRoute.value };\n\t \n\t // create new parameters based on globals state position\n\t let newParams = {\n\t country: normalizeUrlParam(newPosition.country),\n\t state: normalizeUrlParam(newPosition.state),\n\t city: normalizeUrlParam(newPosition.city),\n\t };\n\t \n\t // update route params\n\t currentRoute.params = newParams;\n\t \n\t // replace the current route\n\t router.replace(currentRoute);\n\t}, { deep: true });\n\n const text = {\n locale: 'en',\n messages: {\n en: {\n\t \tmeta: {\n title: \"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery\",\n description: \"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.\",\n }\n },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n }\n }\n }\n }\n\n \tconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["marketplace.state","categories.actions","globals.state"],"mappings":";;;;;;;;;;;;;;;;;;;;AA8DC,UAAM,QAAQ,SAAQ;AACtB,UAAM,SAAS,UAAS;AAExB,UAAM,gBAAgB,IAAI;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,IACX,CAAE;AAEsB,QAAI,IAAI;AAE/B,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IAC3C;AAEC,aAAS,kBAAkB,OAAO;AAChC,aAAO,MACJ,YAAW,EACX,QAAQ,MAAM,GAAG,EACjB,QAAQ,eAAe,EAAE;AAAA,IAC/B;AAEC,QAAI,MAAM,QAAQ;AAEf,UAAI,WAAW;AAAA,QACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAAA,QACjD,OAAO,oBAAoB,MAAM,O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;AAEE,UAAM,EAAE,MAAM,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Marketplace.vue.js","sources":["../../../../../../../../src/modules/marketplace/views/components/layouts/Marketplace.vue"],"sourcesContent":["<template>\n\t<div style=\"min-height: 100%;\" class=\"h-min-100\">\n\t\t\n\n\t\t <div class=\"cols-2-1_3 h-100 z-index-3 pos-relative radius-big\">\n\n\t\t\t<div class=\"o-y-scroll br-r br-solid br-light z-index-2 desktop-only h-100 pos-relative\">\n\t \t<BlockFilter\n v-model:filter=\"marketplace.state.filter\"\n :options=\"marketplace.state.filter.options\"\n class=\"h-100 w-100 pd-medium\"\n\t\t />\n\t\t </div>\n\n\t\t\t<!-- Catalog wrapper -->\n\t\t\t<div class=\"pd-thin\">\n\t\t\t\t<header class=\"pd-medium radius-medium bg-light mn-b-thin\">\n\t\t \t<h2 class=\"\">\n\t\t \t\t<span class=\"\">Weed Deliveries in </span>\n\n\t\t \t\t<span \n\t\t \t\t\tv-if=\"localPosition.city || localPosition.state || localPosition.country\"\n\t\t \t\t\t@click=\"a => { globals.state.isOpenLocationPopup = true }\" \n\t\t \t\t\tclass=\"t-main t-semi cursor-pointer \"\n\t\t \t\t>\n\t\t \t\t\t\t<template v-if=\"localPosition.city\">{{localPosition.city}}, </template>\n\t\t \t\t\t\t<template v-if=\"localPosition.state\">{{localPosition.state}}, </template>\n\t\t \t\t\t\t<template v-if=\"localPosition.country\">{{localPosition.country}}</template>\n\t\t \t\t</span>\n\n\t\t \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"t-main t-semi cursor-pointer\">The World</span>\n\t\t \t</h2>\n\t\t\t\t</header>\n\n\t\t\t\t<div class=\"rows-1\">\n\t\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t\t<component ref=\"page\" :key=\"route\" :localPosition=\"localPosition\" :is=\"Component\" />\n\t\t\t\t\t</router-view>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals'\n import * as categories from '@martyrs/src/modules/products/store/categories';\n\n\n\timport * as marketplace from '../../store/marketplace';\n\n\t// Accessing router and store\n\tconst route = useRoute()\n\tconst router = useRouter()\n\n\tconst localPosition = ref({\n\t\tcity: null,\n\t\tstate: null,\n\t\tcountry: null\n\t});\n\n\tconst desktopFilters = ref(null)\n\n\tfunction denormalizeUrlParam(param) {\n\t return param\n\t .replace(/-/g, ' ') // Замена дефисов на пробелы\n\t .replace(/\\b\\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную\n\t}\n\n\tfunction normalizeUrlParam(param) {\n\t return param\n\t .toLowerCase()\n\t .replace(/ /g, '-')\n\t .replace(/[^a-z0-9-]/g, '');\n\t}\n\n\tif (route.params) {\n // Загружаем новые значения из параметров маршрута в состояние\n let newState = {\n country: denormalizeUrlParam(route.params.country),\n state: denormalizeUrlParam(route.params.state),\n city: denormalizeUrlParam(route.params.city),\n };\n\n\t // Обновляем глобальное состояние\n\t localPosition.value = newState;\n\t}\n\n\tif (route.query) {\n\t \tconst query = route.query;\n\n\t\tmarketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];\n\t\tmarketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];\n\t\tmarketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];\n\t}\n\n\tif (route.query.sortParam) marketplace.state.sort.param = route.query.sortParam\n\tif (route.query.sortOrder) marketplace.state.sort.order = route.query.sortOrder\n\n\tonMounted(async () => {\n\t let options = {\n status: 'published',\n rootOnly: true\n }\n\n let categoriesFilter = await categories.actions.read(options);\n\n categoriesFilter = categoriesFilter.map(category => ({\n value: category._id,\n label: category.name\n }));\n\n const index = marketplace.state.filter.options.findIndex(option => option.value === 'categories');\n\n const categoryOption = {\n title: 'Categories',\n value: 'categories',\n options: categoriesFilter\n };\n\n if (index !== -1) {\n marketplace.state.filter.options[index] = categoryOption;\n } else {\n marketplace.state.filter.options.unshift(categoryOption);\n }\n\t})\n\n\twatch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {\n\t\tlet query = { ...route.query}\n\t\t\n\t\tquery.sortParam = newSortValue.param\n\t\tquery.sortOrder = newSortValue.order\n\t \n\t // replace the current route\n\t router.replace({ query });\n\t}, { deep: true });\n\n\n\twatch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n\t // Переводим фильтр в формат query\n\t const query = { ...route.query };\n\n\t // Удаляем старые значения фильтра из query\n\t Object.keys(oldFilterValue).forEach(key => {\n\t if (query[key]) {\n\t delete query[key];\n\t }\n\t });\n\n\t // Добавляем новые значения фильтра в query\n\t const newQueryValues = Object.fromEntries(\n\t Object.entries(newFilterValue)\n\t .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n\t .map(([key, value]) => [key, value.join(',')])\n\t );\n\n\t delete query.options;\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.replace({ query });\n\t}, { deep: true })\n\n\twatch(() => globals.state.position, (newPosition) => {\n\t // get the current route\n\t const currentRoute = { ...router.currentRoute.value };\n\t \n\t // create new parameters based on globals state position\n\t let newParams = {\n\t country: normalizeUrlParam(newPosition.country),\n\t state: normalizeUrlParam(newPosition.state),\n\t city: normalizeUrlParam(newPosition.city),\n\t };\n\t \n\t // update route params\n\t currentRoute.params = newParams;\n\t \n\t // replace the current route\n\t router.replace(currentRoute);\n\t}, { deep: true });\n\n const text = {\n locale: 'en',\n messages: {\n en: {\n\t \tmeta: {\n title: \"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery\",\n description: \"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.\",\n }\n },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n }\n }\n }\n }\n\n \tconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["marketplace.state","categories.actions","globals.state"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4DC,UAAM,QAAQ,SAAQ;AACtB,UAAM,SAAS,UAAS;AAExB,UAAM,gBAAgB,IAAI;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,IACX,CAAE;AAEsB,QAAI,IAAI;AAE/B,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IAC3C;AAEC,aAAS,kBAAkB,OAAO;AAChC,aAAO,MACJ,YAAW,EACX,QAAQ,MAAM,GAAG,EACjB,QAAQ,eAAe,EAAE;AAAA,IAC/B;AAEC,QAAI,MAAM,QAAQ;AAEf,UAAI,WAAW;AAAA,QACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAAA,QACjD,OAAO,oBAAoB,MAAM,OAAO,KAAK;AAAA,QAC7C,MAAM,oBAAoB,MAAM,OAAO,IAAI;AAAA,MAC5C;AAGF,oBAAc,QAAQ;AAAA,IACzB;AAEC,QAAI,MAAM,OAAO;AACf,YAAM,QAAQ,MAAM;AAErBA,YAAkB,OAAO,SAAS,aAAa,MAAM,aAAa,MAAM,WAAW,MAAM,GAAG,IAAI,CAAE;AAClGA,YAAkB,OAAO,SAAS,SAAS,MAAM,SAAS,MAAM,OAAO,MAAM,GAA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M,iBAAiB,OAAO;AAAA,QAC5B,OAAO,QAAQ,cAAc,EAC1B,OAAO,CAAC,CAAC,KAAK,KAAK,MAAM,MAAM,QAAQ,KAAK,KAAK,MAAM,SAAS,CAAC,EACjE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,GAAG,CAAC,CAAC;AAAA,MAChD;AAED,aAAO,MAAM;AACb,aAAO,OAAO,OAAO,cAAc;AAGnC,aAAO,QAAQ,EAAE,OAAO;AAAA,IAC3B,GAAI,EAAE,MAAM,KAAM,CAAA;AAEjB,UAAM,MAAME,QAAc,UAAU,CAAC,gBAAgB;AAEnD,YAAM,eAAe,EAAE,GAAG,OAAO,aAAa,MAAO;AAGrD,UAAI,YAAY;AAAA,QACd,SAAS,kBAAkB,YAAY,OAAO;AAAA,QAC9C,OAAO,kBAAkB,YAAY,KAAK;AAAA,QAC1C,MAAM,kBAAkB,YAAY,IAAI;AAAA,MACzC;AAGD,mBAAa,SAAS;AAGtB,aAAO,QAAQ,YAAY;AAAA,IAC9B,GAAI,EAAE,MAAM,MAAM;AAEhB,UAAM,OAAO;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,QACR,IAAI;AAAA,UACH,MAAM;AAAA,YACH,OAAO;AAAA,YACP,aAAa;AAAA,UACvB;AAAA,QACO;AAAA,QACD,IAAI;AAAA,UACH,MAAM;AAAA,YACH,OAAO;AAAA,YACP,aAAa;AAAA,UACvB;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAEE,UAAM,EAAE,MAAM,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs
CHANGED
|
@@ -10,7 +10,7 @@ const _hoisted_1 = { class: "notification-badge-container" };
|
|
|
10
10
|
const _hoisted_2 = ["aria-label"];
|
|
11
11
|
const _hoisted_3 = {
|
|
12
12
|
key: 0,
|
|
13
|
-
class: "button-counter"
|
|
13
|
+
class: "button-counter flex-center"
|
|
14
14
|
};
|
|
15
15
|
const _hoisted_4 = {
|
|
16
16
|
key: 0,
|
|
@@ -90,7 +90,9 @@ const _sfc_main = {
|
|
|
90
90
|
class: "notification-icon i-medium",
|
|
91
91
|
fill: __props.fill
|
|
92
92
|
}, null, 8, ["fill"]),
|
|
93
|
-
vue.unref(unreadCount) > 0 ? (vue.openBlock(), vue.createElementBlock("
|
|
93
|
+
vue.unref(unreadCount) > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
94
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(unreadCount) > 99 ? "99+" : vue.unref(unreadCount)), 1)
|
|
95
|
+
])) : vue.createCommentVNode("", true)
|
|
94
96
|
], 8, _hoisted_2),
|
|
95
97
|
isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
96
98
|
vue.createElementVNode("div", _hoisted_5, [
|
|
@@ -126,6 +128,6 @@ const _sfc_main = {
|
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
};
|
|
129
|
-
const NotificationBadge = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
131
|
+
const NotificationBadge = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-818b7989"]]);
|
|
130
132
|
exports.default = NotificationBadge;
|
|
131
133
|
//# sourceMappingURL=NotificationBadge.vue.cjs.map
|
package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationBadge.vue.cjs","sources":["../../../../../../../src/modules/notifications/components/elements/NotificationBadge.vue"],"sourcesContent":["<template>\n <div class=\"notification-badge-container\">\n <button \n class=\"i-semi notification-button\"\n @click=\"toggleNotifications\"\n :aria-label=\"unreadCount > 0 ? `${unreadCount} unread notifications` : 'No unread notifications'\"\n >\n <IconBell class=\"notification-icon i-medium\" :fill=\"fill\"/>\n <
|
|
1
|
+
{"version":3,"file":"NotificationBadge.vue.cjs","sources":["../../../../../../../src/modules/notifications/components/elements/NotificationBadge.vue"],"sourcesContent":["<template>\n <div class=\"notification-badge-container\">\n <button \n class=\"i-semi notification-button\"\n @click=\"toggleNotifications\"\n :aria-label=\"unreadCount > 0 ? `${unreadCount} unread notifications` : 'No unread notifications'\"\n >\n <IconBell class=\"notification-icon i-medium\" :fill=\"fill\"/>\n <div \n v-if=\"unreadCount > 0\" \n class=\"button-counter flex-center\"\n >\n <span>{{ unreadCount > 99 ? '99+' : unreadCount }}</span>\n </div>\n </button>\n <div v-if=\"isOpen\" class=\"notifications-dropdown\">\n <div class=\"notifications-header\">\n <h3>Notifications</h3>\n <button \n v-if=\"unreadCount > 0\" \n class=\"mark-all-read-btn\" \n @click=\"markAllAsRead\"\n >\n Mark all read\n </button>\n </div>\n <div v-if=\"loading\" class=\"notifications-loading\">\n Loading...\n </div>\n <div v-else-if=\"notifications.length === 0\" class=\"notifications-empty\">\n No notifications\n </div>\n <div v-else class=\"notifications-list\">\n <notification-item \n v-for=\"notification in recentNotifications\" \n :key=\"notification._id\" \n :notification=\"notification\"\n @click=\"handleNotificationClick(notification)\"\n />\n </div>\n <div class=\"notifications-footer\">\n <router-link to=\"/notifications\" @click=\"isOpen = false\">\n View all notifications\n </router-link>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, inject } from 'vue';\nimport { useRouter } from 'vue-router';\nimport NotificationItem from '../blocks/NotificationItem.vue';\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n\nimport IconBell from '@martyrs/src/modules/icons/entities/IconBell.vue';\n\nconst props = defineProps({\n maxNotifications: {\n type: Number,\n default: 5\n },\n fill: {\n type: String,\n default: 'rgb(var(--white))'\n }\n});\n\n// Get router and notification functionality\nconst router = useRouter();\nconst { notifications, unreadCount, loading, markAllAsRead, getNotifications } = inject('useNotifications')();\n\n// Local state\nconst isOpen = ref(false);\n\n// Computed properties\nconst recentNotifications = computed(() => {\n return notifications.value\n .slice()\n .sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt))\n .slice(0, props.maxNotifications);\n});\n\n// Methods\nconst toggleNotifications = () => {\n isOpen.value = !isOpen.value;\n};\n\nconst handleNotificationClick = (notification) => {\n isOpen.value = false;\n \n if (notification._id) {\n // Handle in store\n actions.handleNotificationAction({\n notificationId: notification._id,\n ...notification.metadata\n });\n }\n};\n\n// Close dropdown when clicking outside\nconst handleClickOutside = (event) => {\n const container = document.querySelector('.notification-badge-container');\n if (container && !container.contains(event.target)) {\n isOpen.value = false;\n }\n};\n\n// Lifecycle hooks\nonMounted(() => {\n document.addEventListener('click', handleClickOutside);\n\n // Load notifications when component mounts\n const userId = auth.state.user._id;\n if (userId) {\n getNotifications(userId);\n }\n});\n\nonUnmounted(() => {\n document.removeEventListener('click', handleClickOutside);\n});\n</script>\n\n<style scoped>\n.notification-badge-container {\n position: relative;\n display: inline-block;\n}\n\n.notification-button {\n background: none;\n border: none;\n cursor: pointer;\n position: relative;\n font-size: 1.2rem;\n}\n\n.notification-icon {\n font-size: 1.4rem;\n}\n.button-counter {\n position: absolute;\n right: -8px;\n bottom: -8px;\n background: rgb(var(--fourth));\n color: rgb(var(--white));\n height: 16px;\n border-radius: 16px;\n width: 16px;\n font-weight: 500;\n text-align: center;\n line-height: 16px;\n font-size: 10px;\n}\n.notifications-dropdown {\n position: absolute;\n top: 100%;\n right: 0;\n width: 320px;\n max-height: 400px;\n overflow-y: auto;\n background-color: white;\n border-radius: 4px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n}\n\n.notifications-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n border-bottom: 1px solid #eee;\n}\n\n.notifications-header h3 {\n margin: 0;\n font-size: 1rem;\n}\n\n.mark-all-read-btn {\n background: none;\n border: none;\n color: #2196f3;\n font-size: 0.8rem;\n cursor: pointer;\n}\n\n.notifications-loading,\n.notifications-empty {\n padding: 24px;\n text-align: center;\n color: #666;\n}\n\n.notifications-list {\n max-height: 300px;\n overflow-y: auto;\n}\n\n.notifications-footer {\n padding: 12px 16px;\n text-align: center;\n border-top: 1px solid #eee;\n}\n\n.notifications-footer a {\n color: #2196f3;\n text-decoration: none;\n font-size: 0.9rem;\n}\n</style>"],"names":["useRouter","inject","ref","computed","onMounted","auth.state","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,UAAM,QAAQ;AAYCA,cAAS,UAAA;AACxB,UAAM,EAAE,eAAe,aAAa,SAAS,eAAe,qBAAqBC,IAAAA,OAAO,kBAAkB,EAAG;AAG7G,UAAM,SAASC,IAAG,IAAC,KAAK;AAGxB,UAAM,sBAAsBC,IAAQ,SAAC,MAAM;AACzC,aAAO,cAAc,MAClB,MAAK,EACL,KAAK,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,SAAS,IAAI,IAAI,KAAK,EAAE,SAAS,CAAC,EAC5D,MAAM,GAAG,MAAM,gBAAgB;AAAA,IACpC,CAAC;AAGD,UAAM,sBAAsB,MAAM;AAChC,aAAO,QAAQ,CAAC,OAAO;AAAA,IACzB;AAEA,UAAM,0BAA0B,CAAC,iBAAiB;AAChD,aAAO,QAAQ;AAEf,UAAI,aAAa,KAAK;AAEpB,gBAAQ,yBAAyB;AAAA,UAC/B,gBAAgB,aAAa;AAAA,UAC7B,GAAG,aAAa;AAAA,QACtB,CAAK;AAAA,MACL;AAAA,IACA;AAGA,UAAM,qBAAqB,CAAC,UAAU;AACpC,YAAM,YAAY,SAAS,cAAc,+BAA+B;AACxE,UAAI,aAAa,CAAC,UAAU,SAAS,MAAM,MAAM,GAAG;AAClD,eAAO,QAAQ;AAAA,MACnB;AAAA,IACA;AAGAC,QAAAA,UAAU,MAAM;AACd,eAAS,iBAAiB,SAAS,kBAAkB;AAGrD,YAAM,SAASC,WAAW,KAAK;AAC/B,UAAI,QAAQ;AACV,yBAAiB,MAAM;AAAA,MAC3B;AAAA,IACA,CAAC;AAEDC,QAAAA,YAAY,MAAM;AAChB,eAAS,oBAAoB,SAAS,kBAAkB;AAAA,IAC1D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,7 +8,7 @@ const _hoisted_1 = { class: "notification-badge-container" };
|
|
|
8
8
|
const _hoisted_2 = ["aria-label"];
|
|
9
9
|
const _hoisted_3 = {
|
|
10
10
|
key: 0,
|
|
11
|
-
class: "button-counter"
|
|
11
|
+
class: "button-counter flex-center"
|
|
12
12
|
};
|
|
13
13
|
const _hoisted_4 = {
|
|
14
14
|
key: 0,
|
|
@@ -88,7 +88,9 @@ const _sfc_main = {
|
|
|
88
88
|
class: "notification-icon i-medium",
|
|
89
89
|
fill: __props.fill
|
|
90
90
|
}, null, 8, ["fill"]),
|
|
91
|
-
unref(unreadCount) > 0 ? (openBlock(), createElementBlock("
|
|
91
|
+
unref(unreadCount) > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
92
|
+
createElementVNode("span", null, toDisplayString(unref(unreadCount) > 99 ? "99+" : unref(unreadCount)), 1)
|
|
93
|
+
])) : createCommentVNode("", true)
|
|
92
94
|
], 8, _hoisted_2),
|
|
93
95
|
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
94
96
|
createElementVNode("div", _hoisted_5, [
|
|
@@ -124,7 +126,7 @@ const _sfc_main = {
|
|
|
124
126
|
};
|
|
125
127
|
}
|
|
126
128
|
};
|
|
127
|
-
const NotificationBadge = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
129
|
+
const NotificationBadge = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-818b7989"]]);
|
|
128
130
|
export {
|
|
129
131
|
NotificationBadge as default
|
|
130
132
|
};
|
package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationBadge.vue.js","sources":["../../../../../../../src/modules/notifications/components/elements/NotificationBadge.vue"],"sourcesContent":["<template>\n <div class=\"notification-badge-container\">\n <button \n class=\"i-semi notification-button\"\n @click=\"toggleNotifications\"\n :aria-label=\"unreadCount > 0 ? `${unreadCount} unread notifications` : 'No unread notifications'\"\n >\n <IconBell class=\"notification-icon i-medium\" :fill=\"fill\"/>\n <
|
|
1
|
+
{"version":3,"file":"NotificationBadge.vue.js","sources":["../../../../../../../src/modules/notifications/components/elements/NotificationBadge.vue"],"sourcesContent":["<template>\n <div class=\"notification-badge-container\">\n <button \n class=\"i-semi notification-button\"\n @click=\"toggleNotifications\"\n :aria-label=\"unreadCount > 0 ? `${unreadCount} unread notifications` : 'No unread notifications'\"\n >\n <IconBell class=\"notification-icon i-medium\" :fill=\"fill\"/>\n <div \n v-if=\"unreadCount > 0\" \n class=\"button-counter flex-center\"\n >\n <span>{{ unreadCount > 99 ? '99+' : unreadCount }}</span>\n </div>\n </button>\n <div v-if=\"isOpen\" class=\"notifications-dropdown\">\n <div class=\"notifications-header\">\n <h3>Notifications</h3>\n <button \n v-if=\"unreadCount > 0\" \n class=\"mark-all-read-btn\" \n @click=\"markAllAsRead\"\n >\n Mark all read\n </button>\n </div>\n <div v-if=\"loading\" class=\"notifications-loading\">\n Loading...\n </div>\n <div v-else-if=\"notifications.length === 0\" class=\"notifications-empty\">\n No notifications\n </div>\n <div v-else class=\"notifications-list\">\n <notification-item \n v-for=\"notification in recentNotifications\" \n :key=\"notification._id\" \n :notification=\"notification\"\n @click=\"handleNotificationClick(notification)\"\n />\n </div>\n <div class=\"notifications-footer\">\n <router-link to=\"/notifications\" @click=\"isOpen = false\">\n View all notifications\n </router-link>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, inject } from 'vue';\nimport { useRouter } from 'vue-router';\nimport NotificationItem from '../blocks/NotificationItem.vue';\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n\nimport IconBell from '@martyrs/src/modules/icons/entities/IconBell.vue';\n\nconst props = defineProps({\n maxNotifications: {\n type: Number,\n default: 5\n },\n fill: {\n type: String,\n default: 'rgb(var(--white))'\n }\n});\n\n// Get router and notification functionality\nconst router = useRouter();\nconst { notifications, unreadCount, loading, markAllAsRead, getNotifications } = inject('useNotifications')();\n\n// Local state\nconst isOpen = ref(false);\n\n// Computed properties\nconst recentNotifications = computed(() => {\n return notifications.value\n .slice()\n .sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt))\n .slice(0, props.maxNotifications);\n});\n\n// Methods\nconst toggleNotifications = () => {\n isOpen.value = !isOpen.value;\n};\n\nconst handleNotificationClick = (notification) => {\n isOpen.value = false;\n \n if (notification._id) {\n // Handle in store\n actions.handleNotificationAction({\n notificationId: notification._id,\n ...notification.metadata\n });\n }\n};\n\n// Close dropdown when clicking outside\nconst handleClickOutside = (event) => {\n const container = document.querySelector('.notification-badge-container');\n if (container && !container.contains(event.target)) {\n isOpen.value = false;\n }\n};\n\n// Lifecycle hooks\nonMounted(() => {\n document.addEventListener('click', handleClickOutside);\n\n // Load notifications when component mounts\n const userId = auth.state.user._id;\n if (userId) {\n getNotifications(userId);\n }\n});\n\nonUnmounted(() => {\n document.removeEventListener('click', handleClickOutside);\n});\n</script>\n\n<style scoped>\n.notification-badge-container {\n position: relative;\n display: inline-block;\n}\n\n.notification-button {\n background: none;\n border: none;\n cursor: pointer;\n position: relative;\n font-size: 1.2rem;\n}\n\n.notification-icon {\n font-size: 1.4rem;\n}\n.button-counter {\n position: absolute;\n right: -8px;\n bottom: -8px;\n background: rgb(var(--fourth));\n color: rgb(var(--white));\n height: 16px;\n border-radius: 16px;\n width: 16px;\n font-weight: 500;\n text-align: center;\n line-height: 16px;\n font-size: 10px;\n}\n.notifications-dropdown {\n position: absolute;\n top: 100%;\n right: 0;\n width: 320px;\n max-height: 400px;\n overflow-y: auto;\n background-color: white;\n border-radius: 4px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n}\n\n.notifications-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n border-bottom: 1px solid #eee;\n}\n\n.notifications-header h3 {\n margin: 0;\n font-size: 1rem;\n}\n\n.mark-all-read-btn {\n background: none;\n border: none;\n color: #2196f3;\n font-size: 0.8rem;\n cursor: pointer;\n}\n\n.notifications-loading,\n.notifications-empty {\n padding: 24px;\n text-align: center;\n color: #666;\n}\n\n.notifications-list {\n max-height: 300px;\n overflow-y: auto;\n}\n\n.notifications-footer {\n padding: 12px 16px;\n text-align: center;\n border-top: 1px solid #eee;\n}\n\n.notifications-footer a {\n color: #2196f3;\n text-decoration: none;\n font-size: 0.9rem;\n}\n</style>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,UAAM,QAAQ;AAYC,cAAS;AACxB,UAAM,EAAE,eAAe,aAAa,SAAS,eAAe,qBAAqB,OAAO,kBAAkB,EAAG;AAG7G,UAAM,SAAS,IAAI,KAAK;AAGxB,UAAM,sBAAsB,SAAS,MAAM;AACzC,aAAO,cAAc,MAClB,MAAK,EACL,KAAK,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,SAAS,IAAI,IAAI,KAAK,EAAE,SAAS,CAAC,EAC5D,MAAM,GAAG,MAAM,gBAAgB;AAAA,IACpC,CAAC;AAGD,UAAM,sBAAsB,MAAM;AAChC,aAAO,QAAQ,CAAC,OAAO;AAAA,IACzB;AAEA,UAAM,0BAA0B,CAAC,iBAAiB;AAChD,aAAO,QAAQ;AAEf,UAAI,aAAa,KAAK;AAEpB,gBAAQ,yBAAyB;AAAA,UAC/B,gBAAgB,aAAa;AAAA,UAC7B,GAAG,aAAa;AAAA,QACtB,CAAK;AAAA,MACL;AAAA,IACA;AAGA,UAAM,qBAAqB,CAAC,UAAU;AACpC,YAAM,YAAY,SAAS,cAAc,+BAA+B;AACxE,UAAI,aAAa,CAAC,UAAU,SAAS,MAAM,MAAM,GAAG;AAClD,eAAO,QAAQ;AAAA,MACnB;AAAA,IACA;AAGA,cAAU,MAAM;AACd,eAAS,iBAAiB,SAAS,kBAAkB;AAGrD,YAAM,SAASA,MAAW,KAAK;AAC/B,UAAI,QAAQ;AACV,yBAAiB,MAAM;AAAA,MAC3B;AAAA,IACA,CAAC;AAED,gBAAY,MAAM;AAChB,eAAS,oBAAoB,SAAS,kBAAkB;AAAA,IAC1D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
|
-
const Button = require("../../../../components/Button/Button.
|
|
5
|
+
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
6
6
|
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
7
7
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
8
8
|
const IconTime = require("../../../icons/entities/IconTime.vue.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, computed, createElementBlock, createCommentVNode, openBlock, createVNode, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, normalizeClass, withCtx, createBlock, unref } from "vue";
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
3
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
|
|
4
4
|
import Select from "../../../../components/Select/Select.vue.js";
|
|
5
5
|
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
|
6
6
|
import IconTime from "../../../icons/entities/IconTime.vue.js";
|
|
@@ -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 Button = require("../../../../components/Button/Button.
|
|
4
|
+
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
5
5
|
const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
|
|
6
6
|
const AskToLogin = require("../sections/AskToLogin.vue.cjs");
|
|
7
7
|
const Succes = require("../sections/Succes.vue.cjs");
|
|
@@ -121,7 +121,7 @@ const _sfc_main = {
|
|
|
121
121
|
spotOrganization.value = orderOrganization.value[0].spots[0];
|
|
122
122
|
isOpen.value = checkIsOpenNow(spotOrganization.value.worktime);
|
|
123
123
|
console.log(spotOrganization.value);
|
|
124
|
-
minOrderAmount.value = spotOrganization.value || 0;
|
|
124
|
+
minOrderAmount.value = spotOrganization.value.minorder || 0;
|
|
125
125
|
}
|
|
126
126
|
isLocationLoading.value = false;
|
|
127
127
|
emits("page-loaded");
|
|
@@ -277,7 +277,7 @@ const _sfc_main = {
|
|
|
277
277
|
key: 2,
|
|
278
278
|
order: order.value
|
|
279
279
|
}, null, 8, ["order"])) : vue.createCommentVNode("", true),
|
|
280
|
-
shopcart.state.positions.length > 0
|
|
280
|
+
shopcart.state.positions.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
281
281
|
!isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, _cache[0] || (_cache[0] = [
|
|
282
282
|
vue.createElementVNode("p", { class: "t-fourth" }, "⚠️ This spot is currently closed. You can place an order, but it will be processed when the spot opens.", -1)
|
|
283
283
|
]))) : vue.createCommentVNode("", true),
|
|
@@ -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\n\t<!-- Empty State -->\n\t<EmptyState \n\t\tv-if=\"shopcart.state.positions < 1\" \n\t/>\t\n\t<Succes \n\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t:order=\"order\" \n\t/>\n\t<!-- Уведомления о минимальной сумме заказа и времени работы -->\n\t<div v-if=\"shopcart.state.positions.length > 0 && orders.state.current.status !== true\" class=\"w-100 gap-thin cols-1 mn-b-thin\">\n\t\t<div v-if=\"!isOpen\" class=\"bg-fifth-nano pd-small radius-medium t-center\">\n\t\t\t<p class=\"t-fourth\">⚠️ This spot is currently closed. You can place an order, but it will be processed when the spot opens.</p>\n\t\t</div>\n\t\t<div v-if=\"cartTotalPrice < minOrderAmount\" class=\"bg-fourth-nano pd-small radius-medium t-center\">\n\t\t\t<p class=\"t-fourth\">⚠️ Minimum order amount is {{ formatPrice(minOrderAmount) }}. Your current total is {{ formatPrice(cartTotalPrice) }}.</p>\n\t\t</div>\n\t</div>\n\t\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\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 || cartTotalPrice < minOrderAmount\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, formatPrice } = 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({})\nconst spotOrganization = ref({})\nconst isOpen = ref(true)\n\n// Новые переменные для проверки минимальной суммы заказа и времени работы\nconst minOrderAmount = ref(0)\n\nfunction checkIsOpenNow(worktime) {\n try {\n console.log('[checkIsOpenNow] worktime:', worktime);\n\n if (\n !worktime ||\n typeof worktime !== 'object' ||\n Array.isArray(worktime) ||\n !worktime.regular\n ) {\n console.log('[checkIsOpenNow] invalid, returning true');\n return true;\n }\n\n const now = new Date();\n const currentDay = now.getDay();\n const currentTime = `${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;\n const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n\n console.log('[checkIsOpenNow] currentDay:', currentDay);\n console.log('[checkIsOpenNow] currentTime:', currentTime);\n\n const specialDay = worktime.special?.find(s => {\n const d = new Date(s.date);\n return (\n d.getFullYear() === today.getFullYear() &&\n d.getMonth() === today.getMonth() &&\n d.getDate() === today.getDate()\n );\n });\n\n if (specialDay) {\n console.log('[checkIsOpenNow] specialDay:', specialDay);\n if (!specialDay.isOpen) return false;\n return specialDay.periods?.some(p => p.open <= currentTime && p.close > currentTime);\n }\n\n const regularDay = worktime.regular.find(d => d.dayOfWeek === currentDay);\n if (!regularDay || !regularDay.isOpen) return false;\n\n return regularDay.periods?.some(p => p.open <= currentTime && p.close > currentTime);\n } catch (err) {\n console.error('[checkIsOpenNow] error:', err);\n return true;\n }\n}\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\t\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\t// Получаем информацию о минимальной сумме заказа и времени работы из spot\n\tif (orderOrganization.value && orderOrganization.value[0]?.spots?.length > 0) {\n\t spotOrganization.value = orderOrganization.value[0].spots[0];\n\t\tisOpen.value = checkIsOpenNow(spotOrganization.value.worktime);\n\t console.log(spotOrganization.value)\n\t minOrderAmount.value = spotOrganization.value || 0;\n\t}\n\n\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","_d","watch","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJA,UAAM,QAAQ;AAKd,UAAM,oBAAoBA,IAAG,IAAC,KAAK;AAErBC,cAAQ,SAAA;AACtB,UAAM,SAASC,UAAS,UAAA;AACxB,UAAM,EAAE,gBAAgB,YAAW,IAAKC,OAAe,gBAAA;AAEvD,UAAM,QAAQC,IAAAA,SAAS,MAAMC,OAAAA,MAAa,OAAO;AACpCD,QAAAA,SAAS,MAAME,MAAW,MAAC,OAAO;AAE/C,UAAM,iBAAiBC,SAAAA,QAAiB;AAExC,UAAM,eAAeH,IA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AA,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,UAAIW,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\n\t<!-- Empty State -->\n\t<EmptyState \n\t\tv-if=\"shopcart.state.positions < 1\" \n\t/>\t\n\t<Succes \n\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t:order=\"order\" \n\t/>\n\t<!-- Уведомления о минимальной сумме заказа и времени работы -->\n\t<div v-if=\"shopcart.state.positions.length > 0\" class=\"w-100 gap-thin cols-1 mn-b-thin\">\n\t\t<div v-if=\"!isOpen\" class=\"bg-fifth-nano pd-small radius-medium t-center\">\n\t\t\t<p class=\"t-fourth\">⚠️ This spot is currently closed. You can place an order, but it will be processed when the spot opens.</p>\n\t\t</div>\n\t\t<div v-if=\"cartTotalPrice < minOrderAmount\" class=\"bg-fourth-nano pd-small radius-medium t-center\">\n\t\t\t<p class=\"t-fourth\">⚠️ Minimum order amount is {{ formatPrice(minOrderAmount) }}. Your current total is {{ formatPrice(cartTotalPrice) }}.</p>\n\t\t</div>\n\t</div>\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\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 || cartTotalPrice < minOrderAmount\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, formatPrice } = 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({})\nconst spotOrganization = ref({})\nconst isOpen = ref(true)\n\n// Новые переменные для проверки минимальной суммы заказа и времени работы\nconst minOrderAmount = ref(0)\n\nfunction checkIsOpenNow(worktime) {\n try {\n console.log('[checkIsOpenNow] worktime:', worktime);\n\n if (\n !worktime ||\n typeof worktime !== 'object' ||\n Array.isArray(worktime) ||\n !worktime.regular\n ) {\n console.log('[checkIsOpenNow] invalid, returning true');\n return true;\n }\n\n const now = new Date();\n const currentDay = now.getDay();\n const currentTime = `${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;\n const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n\n console.log('[checkIsOpenNow] currentDay:', currentDay);\n console.log('[checkIsOpenNow] currentTime:', currentTime);\n\n const specialDay = worktime.special?.find(s => {\n const d = new Date(s.date);\n return (\n d.getFullYear() === today.getFullYear() &&\n d.getMonth() === today.getMonth() &&\n d.getDate() === today.getDate()\n );\n });\n\n if (specialDay) {\n console.log('[checkIsOpenNow] specialDay:', specialDay);\n if (!specialDay.isOpen) return false;\n return specialDay.periods?.some(p => p.open <= currentTime && p.close > currentTime);\n }\n\n const regularDay = worktime.regular.find(d => d.dayOfWeek === currentDay);\n if (!regularDay || !regularDay.isOpen) return false;\n\n return regularDay.periods?.some(p => p.open <= currentTime && p.close > currentTime);\n } catch (err) {\n console.error('[checkIsOpenNow] error:', err);\n return true;\n }\n}\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\t\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\t// Получаем информацию о минимальной сумме заказа и времени работы из spot\n\tif (orderOrganization.value && orderOrganization.value[0]?.spots?.length > 0) {\n\t spotOrganization.value = orderOrganization.value[0].spots[0];\n\t\tisOpen.value = checkIsOpenNow(spotOrganization.value.worktime);\n\t console.log(spotOrganization.value)\n\t minOrderAmount.value = spotOrganization.value.minorder || 0;\n\t}\n\n\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","_d","watch","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsJA,UAAM,QAAQ;AAKd,UAAM,oBAAoBA,IAAG,IAAC,KAAK;AAErBC,cAAQ,SAAA;AACtB,UAAM,SAASC,UAAS,UAAA;AACxB,UAAM,EAAE,gBAAgB,YAAW,IAAKC,OAAe,gBAAA;AAEvD,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;AAChC,UAAM,mBAAmBA,IAAG,IAAC,CAAE,CAAA;AAC/B,UAAM,SAASA,IAAG,IAAC,IAAI;AAGvB,UAAM,iBAAiBA,IAAG,IAAC,CAAC;AAE5B,aAAS,eAAe,UAAU;;AAChC,UAAI;AACF,gBAAQ,IAAI,8BAA8B,QAAQ;AAElD,YACE,CAAC,YACD,OAAO,aAAa,YACpB,MAAM,QAAQ,QAAQ,KACtB,CAAC,SAAS,SACV;AACA,kBAAQ,IAAI,0CAA0C;AACt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e,OAAOjB,OAAAA,MAAa,OAAO;AAE3D,UAAIgB,QAAO;AACX,YAAI,OAAO,SAAS,YAAY;AAC9B,eAAK,SAAS,YAAY;AAAA,YACxB,gBAAgBA,OAAM;AAAA,YACtB,OAAO,kBAAkB;AAAA,YACzB,UAAU,eAAgB;AAAA;AAAA,YAC1B,KAAK;AAAA;AAAA,YACL,UAAU,aAAa;AAAA;AAAA,YACvB,OAAON,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,UAAIW,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,5 +1,5 @@
|
|
|
1
1
|
import { ref, computed, onMounted, watch, createElementBlock, openBlock, createBlock, createCommentVNode, createElementVNode, unref, toDisplayString, createVNode, Fragment, renderList, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import _sfc_main$9 from "../../../../components/Button/Button.
|
|
2
|
+
import _sfc_main$9 from "../../../../components/Button/Button.vue.js";
|
|
3
3
|
import _sfc_main$7 from "../blocks/CardOrderItem.vue.js";
|
|
4
4
|
import _sfc_main$1 from "../sections/AskToLogin.vue.js";
|
|
5
5
|
import _sfc_main$3 from "../sections/Succes.vue.js";
|
|
@@ -119,7 +119,7 @@ const _sfc_main = {
|
|
|
119
119
|
spotOrganization.value = orderOrganization.value[0].spots[0];
|
|
120
120
|
isOpen.value = checkIsOpenNow(spotOrganization.value.worktime);
|
|
121
121
|
console.log(spotOrganization.value);
|
|
122
|
-
minOrderAmount.value = spotOrganization.value || 0;
|
|
122
|
+
minOrderAmount.value = spotOrganization.value.minorder || 0;
|
|
123
123
|
}
|
|
124
124
|
isLocationLoading.value = false;
|
|
125
125
|
emits("page-loaded");
|
|
@@ -275,7 +275,7 @@ const _sfc_main = {
|
|
|
275
275
|
key: 2,
|
|
276
276
|
order: order.value
|
|
277
277
|
}, null, 8, ["order"])) : createCommentVNode("", true),
|
|
278
|
-
state$4.positions.length > 0
|
|
278
|
+
state$4.positions.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
279
279
|
!isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3, _cache[0] || (_cache[0] = [
|
|
280
280
|
createElementVNode("p", { class: "t-fourth" }, "⚠️ This spot is currently closed. You can place an order, but it will be processed when the spot opens.", -1)
|
|
281
281
|
]))) : createCommentVNode("", true),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderCreate.vue.js","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\n\t<!-- Empty State -->\n\t<EmptyState \n\t\tv-if=\"shopcart.state.positions < 1\" \n\t/>\t\n\t<Succes \n\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t:order=\"order\" \n\t/>\n\t<!-- Уведомления о минимальной сумме заказа и времени работы -->\n\t<div v-if=\"shopcart.state.positions.length > 0 && orders.state.current.status !== true\" class=\"w-100 gap-thin cols-1 mn-b-thin\">\n\t\t<div v-if=\"!isOpen\" class=\"bg-fifth-nano pd-small radius-medium t-center\">\n\t\t\t<p class=\"t-fourth\">⚠️ This spot is currently closed. You can place an order, but it will be processed when the spot opens.</p>\n\t\t</div>\n\t\t<div v-if=\"cartTotalPrice < minOrderAmount\" class=\"bg-fourth-nano pd-small radius-medium t-center\">\n\t\t\t<p class=\"t-fourth\">⚠️ Minimum order amount is {{ formatPrice(minOrderAmount) }}. Your current total is {{ formatPrice(cartTotalPrice) }}.</p>\n\t\t</div>\n\t</div>\n\t\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\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 || cartTotalPrice < minOrderAmount\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, formatPrice } = 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({})\nconst spotOrganization = ref({})\nconst isOpen = ref(true)\n\n// Новые переменные для проверки минимальной суммы заказа и времени работы\nconst minOrderAmount = ref(0)\n\nfunction checkIsOpenNow(worktime) {\n try {\n console.log('[checkIsOpenNow] worktime:', worktime);\n\n if (\n !worktime ||\n typeof worktime !== 'object' ||\n Array.isArray(worktime) ||\n !worktime.regular\n ) {\n console.log('[checkIsOpenNow] invalid, returning true');\n return true;\n }\n\n const now = new Date();\n const currentDay = now.getDay();\n const currentTime = `${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;\n const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n\n console.log('[checkIsOpenNow] currentDay:', currentDay);\n console.log('[checkIsOpenNow] currentTime:', currentTime);\n\n const specialDay = worktime.special?.find(s => {\n const d = new Date(s.date);\n return (\n d.getFullYear() === today.getFullYear() &&\n d.getMonth() === today.getMonth() &&\n d.getDate() === today.getDate()\n );\n });\n\n if (specialDay) {\n console.log('[checkIsOpenNow] specialDay:', specialDay);\n if (!specialDay.isOpen) return false;\n return specialDay.periods?.some(p => p.open <= currentTime && p.close > currentTime);\n }\n\n const regularDay = worktime.regular.find(d => d.dayOfWeek === currentDay);\n if (!regularDay || !regularDay.isOpen) return false;\n\n return regularDay.periods?.some(p => p.open <= currentTime && p.close > currentTime);\n } catch (err) {\n console.error('[checkIsOpenNow] error:', err);\n return true;\n }\n}\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\t\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\t// Получаем информацию о минимальной сумме заказа и времени работы из spot\n\tif (orderOrganization.value && orderOrganization.value[0]?.spots?.length > 0) {\n\t spotOrganization.value = orderOrganization.value[0].spots[0];\n\t\tisOpen.value = checkIsOpenNow(spotOrganization.value.worktime);\n\t console.log(spotOrganization.value)\n\t minOrderAmount.value = spotOrganization.value || 0;\n\t}\n\n\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":["orders.state","users.state","shopcart.getters","globals.state","orders.getters","auth.state","orders.mutations","users.actions","organizations.actions","shopcart.state","_a","_b","_c","_d","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJA,UAAM,QAAQ;AAKd,UAAM,oBAAoB,IAAI,KAAK;AAErB,aAAQ;AACtB,UAAM,SAAS,UAAS;AACxB,UAAM,EAAE,gBAAgB,YAAW,IAAK,gBAAe;AAEvD,UAAM,QAAQ,SAAS,MAAMA,MAAa,OAAO;AACpC,aAAS,MAAMC,QAAY,OAAO;AAE/C,UAAM,iBAAiBC,QAAiB;AAExC,UAAM,eAAe,SAAS,MAAM;;AAClC,YAAM,OAAOF,MAAa,QAAQ,SAAS;AAC3C,YAAM,aAAW,uBAAkB,MAAM,CAAC,MAAzB,mBAA4B,aAAY;AACzD,YAAM,WAASG,mBAAc,YAAdA,mBAAuB,WAAvBA,mBAA+B,qBAAoB,CAAA;AAElE,aAAOC,UAAe,iBAAiB,MAAM,UAAU,MAAM;AAAA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A,MACxC;AAEE,UAAIc,SAAQ,MAAMC,UAAe,OAAOf,MAAa,OAAO;AAE3D,UAAIc,QAAO;AACX,YAAI,OAAO,SAAS,YAAY;AAC9B,eAAK,SAAS,YAAY;AAAA,YACxB,gBAAgBA,OAAM;AAAA,YACtB,OAAO,kBAAkB;AAAA,YACzB,UAAU,eAAgB;AAAA;AAAA,YAC1B,KAAK;AAAA;AAAA,YACL,UAAU,aAAa;AAAA;AAAA,YACvB,OAAOL,QAAe,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,YAAUT,aAAc,aAAdA,mBAAwB,aAAY;AAAA,YAC9C,eAAe,gBAAgB;AAAA,YAC/B,SAASE,QAAW,KAAK,OAAO;AAAA,UACvC,CAAM;AAAA,QACN;AAAA,MACA;AAEE,UAAIS,QAAO;AACV,cAAM,OAAO,KAAK;AAAA,UACjB,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,OAAOA,OAAM;AAAA,UAClB;AAAA,QACI,CAAA;AAEDE,kBAAiB,cAAa;AAAA,MAEjC,OAAS;AACN,cAAM,iBAAiB;AAAA,MAC1B;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"OrderCreate.vue.js","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\n\t<!-- Empty State -->\n\t<EmptyState \n\t\tv-if=\"shopcart.state.positions < 1\" \n\t/>\t\n\t<Succes \n\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t:order=\"order\" \n\t/>\n\t<!-- Уведомления о минимальной сумме заказа и времени работы -->\n\t<div v-if=\"shopcart.state.positions.length > 0\" class=\"w-100 gap-thin cols-1 mn-b-thin\">\n\t\t<div v-if=\"!isOpen\" class=\"bg-fifth-nano pd-small radius-medium t-center\">\n\t\t\t<p class=\"t-fourth\">⚠️ This spot is currently closed. You can place an order, but it will be processed when the spot opens.</p>\n\t\t</div>\n\t\t<div v-if=\"cartTotalPrice < minOrderAmount\" class=\"bg-fourth-nano pd-small radius-medium t-center\">\n\t\t\t<p class=\"t-fourth\">⚠️ Minimum order amount is {{ formatPrice(minOrderAmount) }}. Your current total is {{ formatPrice(cartTotalPrice) }}.</p>\n\t\t</div>\n\t</div>\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\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 || cartTotalPrice < minOrderAmount\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, formatPrice } = 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({})\nconst spotOrganization = ref({})\nconst isOpen = ref(true)\n\n// Новые переменные для проверки минимальной суммы заказа и времени работы\nconst minOrderAmount = ref(0)\n\nfunction checkIsOpenNow(worktime) {\n try {\n console.log('[checkIsOpenNow] worktime:', worktime);\n\n if (\n !worktime ||\n typeof worktime !== 'object' ||\n Array.isArray(worktime) ||\n !worktime.regular\n ) {\n console.log('[checkIsOpenNow] invalid, returning true');\n return true;\n }\n\n const now = new Date();\n const currentDay = now.getDay();\n const currentTime = `${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;\n const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n\n console.log('[checkIsOpenNow] currentDay:', currentDay);\n console.log('[checkIsOpenNow] currentTime:', currentTime);\n\n const specialDay = worktime.special?.find(s => {\n const d = new Date(s.date);\n return (\n d.getFullYear() === today.getFullYear() &&\n d.getMonth() === today.getMonth() &&\n d.getDate() === today.getDate()\n );\n });\n\n if (specialDay) {\n console.log('[checkIsOpenNow] specialDay:', specialDay);\n if (!specialDay.isOpen) return false;\n return specialDay.periods?.some(p => p.open <= currentTime && p.close > currentTime);\n }\n\n const regularDay = worktime.regular.find(d => d.dayOfWeek === currentDay);\n if (!regularDay || !regularDay.isOpen) return false;\n\n return regularDay.periods?.some(p => p.open <= currentTime && p.close > currentTime);\n } catch (err) {\n console.error('[checkIsOpenNow] error:', err);\n return true;\n }\n}\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\t\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\t// Получаем информацию о минимальной сумме заказа и времени работы из spot\n\tif (orderOrganization.value && orderOrganization.value[0]?.spots?.length > 0) {\n\t spotOrganization.value = orderOrganization.value[0].spots[0];\n\t\tisOpen.value = checkIsOpenNow(spotOrganization.value.worktime);\n\t console.log(spotOrganization.value)\n\t minOrderAmount.value = spotOrganization.value.minorder || 0;\n\t}\n\n\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":["orders.state","users.state","shopcart.getters","globals.state","orders.getters","auth.state","orders.mutations","users.actions","organizations.actions","shopcart.state","_a","_b","_c","_d","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsJA,UAAM,QAAQ;AAKd,UAAM,oBAAoB,IAAI,KAAK;AAErB,aAAQ;AACtB,UAAM,SAAS,UAAS;AACxB,UAAM,EAAE,gBAAgB,YAAW,IAAK,gBAAe;AAEvD,UAAM,QAAQ,SAAS,MAAMA,MAAa,OAAO;AACpC,aAAS,MAAMC,QAAY,OAAO;AAE/C,UAAM,iBAAiBC,QAAiB;AAExC,UAAM,eAAe,SAAS,MAAM;;AAClC,YAAM,OAAOF,MAAa,QAAQ,SAAS;AAC3C,YAAM,aAAW,uBAAkB,MAAM,CAAC,MAAzB,mBAA4B,aAAY;AACzD,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