@ozdao/martyrs 0.2.582 → 0.2.584
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/{main-vq1_XpmQ.js → main-fmp55tJF.js} +11 -11
- package/dist/martyrs/dist/{main-vq1_XpmQ.js → main-fmp55tJF.js} +2 -2
- package/dist/martyrs/dist/main-fmp55tJF.js.map +1 -0
- package/dist/martyrs/dist/{web-BNJDRie_.js → web-BDuQSQKS.js} +2 -2
- package/dist/martyrs/dist/{web-BNJDRie_.js.map → web-BDuQSQKS.js.map} +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.js +5 -5
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/{EditImages.vue.js → EditImages.vue2.js} +2 -2
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js +2 -2
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +2 -2
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js +2 -2
- package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js.map +1 -1
- package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.js → Spoiler.vue2.js} +2 -2
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +7 -13
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js +182 -89
- package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/configs/navigation.user.config.js +9 -2
- package/dist/martyrs/src/modules/auth/views/configs/navigation.user.config.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +3 -3
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js.map +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.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +3 -3
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Sidebar.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/Sidebar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/{Filters.vue.js → Filters.vue2.js} +5 -5
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +4 -4
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +6 -6
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +3 -3
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +90 -175
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +8 -8
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +41 -28
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.js +14 -14
- package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/router/orders.router.js +23 -0
- package/dist/martyrs/src/modules/orders/router/orders.router.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +89 -40
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +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.js +3 -3
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js.map +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.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +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.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js.map +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/style.css +105 -110
- package/dist/{web-BNJDRie_.js → web-BDuQSQKS.js} +1 -1
- package/package.json +1 -1
- package/src/components/Calendar/Calendar.vue +4 -4
- package/src/components/Completion/Completion.vue +3 -3
- package/src/components/Field/Field.vue +1 -1
- package/src/components/FieldBig/FieldBig.vue +1 -1
- package/src/components/FieldDate/FieldDate.vue +1 -1
- package/src/modules/TASKS.MD +26 -1
- package/src/modules/auth/views/components/pages/Profile.vue +9 -15
- package/src/modules/auth/views/components/pages/UserDashboard.vue +214 -125
- package/src/modules/auth/views/configs/navigation.user.config.js +8 -2
- package/src/modules/community/components/layouts/Community.vue +2 -2
- package/src/modules/core/views/components/blocks/CardHeader.vue +1 -1
- package/src/modules/core/views/components/partials/Header.vue +1 -1
- package/src/modules/core/views/components/partials/Sidebar.vue +1 -1
- package/src/modules/core/views/components/sections/Filters.vue +2 -2
- package/src/modules/core/views/components/sections/SectionPageTitle.vue +1 -1
- package/src/modules/events/components/pages/EditEventTickets.vue +2 -2
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
- package/src/modules/inventory/components/pages/Inventory.vue +4 -4
- package/src/modules/inventory/components/pages/InventoryEdit.vue +1 -1
- package/src/modules/music/components/pages/Playlist.vue +5 -5
- package/src/modules/notifications/components/elements/NotificationBadge.vue +1 -1
- package/src/modules/orders/components/blocks/CardOrderUser.vue +88 -190
- package/src/modules/orders/components/pages/OrderBackoffice.vue +5 -5
- package/src/modules/orders/components/pages/Orders.vue +56 -50
- package/src/modules/orders/router/orders.router.js +33 -0
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +42 -11
- package/src/modules/pages/views/components/pages/PageEdit.vue +2 -2
- package/src/modules/pages/views/components/partials/SidebarPages.vue +1 -1
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/src/modules/products/components/sections/EditDiscounts.vue +1 -1
- package/src/modules/products/components/sections/ProductConfigurator.vue +1 -1
- package/src/modules/spots/components/pages/Spots.vue +1 -1
- package/src/modules/wallet/views/components/blocks/CryptoDeposit.vue +1 -1
- package/src/modules/wallet/views/components/pages/Wallet.vue +1 -1
- package/dist/martyrs/dist/main-vq1_XpmQ.js.map +0 -1
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue2.js.map +0 -1
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.js +0 -625
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +0 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusCanceled.vue.js +0 -32
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusCanceled.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusConfirmed.vue.js +0 -32
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusConfirmed.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusCreated.vue.js +0 -32
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusCreated.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusDelay.vue.js +0 -32
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusDelay.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusFinished.vue.js +0 -32
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusFinished.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusInUse.vue.js +0 -32
- package/dist/martyrs/src/modules/orders/components/icons/IconStatusInUse.vue.js.map +0 -1
|
@@ -1,39 +1,27 @@
|
|
|
1
|
-
import { computed, createElementBlock, openBlock, createElementVNode,
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import _sfc_main$
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { computed, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, normalizeClass, createTextVNode, Fragment, renderList, createBlock, createCommentVNode, createVNode } from "vue";
|
|
2
|
+
import { useI18n } from "vue-i18n";
|
|
3
|
+
import { useGlobalMixins } from "../../../core/views/mixins/mixins.js";
|
|
4
|
+
import IconNext from "../../../icons/navigation/IconChevronRight.vue.js";
|
|
5
|
+
import _sfc_main$1 from "./CardOrderItem.vue.js";
|
|
6
|
+
const _hoisted_1 = { class: "bg-light radius-medium pd-medium" };
|
|
7
|
+
const _hoisted_2 = { class: "flex-nowrap flex-v-center flex-between flex mn-b-small" };
|
|
8
|
+
const _hoisted_3 = { class: "flex-v-center gap-small flex" };
|
|
9
|
+
const _hoisted_4 = { class: "fw-medium t-dark" };
|
|
10
|
+
const _hoisted_5 = { class: "t-transp" };
|
|
11
|
+
const _hoisted_6 = { class: "gap-thin flex-column flex mn-b-small" };
|
|
12
|
+
const _hoisted_7 = { class: "flex-nowrap flex-v-center flex-between flex" };
|
|
13
|
+
const _hoisted_8 = { class: "w-100" };
|
|
14
|
+
const _hoisted_9 = { class: "fw-demi t-dark p-medium" };
|
|
15
|
+
const _hoisted_10 = { class: "flex-nowrap gap-thin flex" };
|
|
16
|
+
const _hoisted_11 = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "button bg-white pd-t-thin pd-b-thin pd-l-small pd-r-small p-small fw-medium radius-small"
|
|
15
19
|
};
|
|
16
|
-
const _hoisted_3 = ["src", "alt"];
|
|
17
|
-
const _hoisted_4 = {
|
|
18
|
-
key: 1,
|
|
19
|
-
class: "flex-center h-100"
|
|
20
|
-
};
|
|
21
|
-
const _hoisted_5 = { class: "fw-medium t-white" };
|
|
22
|
-
const _hoisted_6 = { class: "flex-column flex w-100" };
|
|
23
|
-
const _hoisted_7 = { class: "mn-b-thin" };
|
|
24
|
-
const _hoisted_8 = { class: "p-medium" };
|
|
25
|
-
const _hoisted_9 = { class: "t-transp" };
|
|
26
|
-
const _hoisted_10 = { class: "flex-nowrap radius-thin bg-white w-max pd-thin flex-v-center flex" };
|
|
27
|
-
const _hoisted_11 = { class: "mn-l-micro p-regular" };
|
|
28
20
|
const _hoisted_12 = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
width: "19",
|
|
32
|
-
height: "19",
|
|
33
|
-
viewBox: "0 0 19 19",
|
|
34
|
-
fill: "none"
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "button bg-main t-white pd-t-thin pd-b-thin pd-l-small pd-r-small p-small fw-medium radius-small"
|
|
35
23
|
};
|
|
36
|
-
const _hoisted_13 =
|
|
24
|
+
const _hoisted_13 = { class: "button bg-white pd-t-thin pd-b-thin pd-l-small pd-r-small p-small fw-medium radius-small flex-v-center gap-micro flex" };
|
|
37
25
|
const _sfc_main = {
|
|
38
26
|
__name: "CardOrderUser",
|
|
39
27
|
props: {
|
|
@@ -45,163 +33,90 @@ const _sfc_main = {
|
|
|
45
33
|
total: [String, Number]
|
|
46
34
|
},
|
|
47
35
|
setup(__props) {
|
|
36
|
+
const { locale } = useI18n();
|
|
37
|
+
const { formatPrice, formatDate } = useGlobalMixins();
|
|
48
38
|
const props = __props;
|
|
49
|
-
const
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
"preparing": _sfc_main$2,
|
|
53
|
-
"inuse": _sfc_main$2,
|
|
54
|
-
"finished": _sfc_main$4,
|
|
55
|
-
"canceled": _sfc_main$3,
|
|
56
|
-
"delay": _sfc_main$1
|
|
39
|
+
const formatOrderId = (id) => {
|
|
40
|
+
if (!id) return "";
|
|
41
|
+
return `#${id.slice(0, 3).toUpperCase()}-${id.slice(-4).toUpperCase()}-${(/* @__PURE__ */ new Date()).getFullYear()}`;
|
|
57
42
|
};
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
43
|
+
const statusConfig = {
|
|
44
|
+
"delivered": { label: "Delivered", class: "t-green bg-green-nano", dot: "bg-green" },
|
|
45
|
+
"finished": { label: "Delivered", class: "t-green bg-green-nano", dot: "bg-green" },
|
|
46
|
+
"processing": { label: "Processing", class: "t-main bg-main-nano", dot: "bg-main" },
|
|
47
|
+
"created": { label: "Processing", class: "t-main bg-main-nano", dot: "bg-main" },
|
|
48
|
+
"confirmed": { label: "Confirmed", class: "t-main bg-main-nano", dot: "bg-main" },
|
|
49
|
+
"shipped": { label: "Shipped", class: "t-second bg-second-nano", dot: "bg-second" },
|
|
50
|
+
"preparing": { label: "Preparing", class: "t-second bg-second-nano", dot: "bg-second" },
|
|
51
|
+
"cancelled": { label: "Cancelled", class: "t-grey bg-light", dot: "bg-grey" },
|
|
52
|
+
"canceled": { label: "Cancelled", class: "t-grey bg-light", dot: "bg-grey" },
|
|
53
|
+
"returned": { label: "Returned", class: "t-fourth bg-fourth-nano", dot: "bg-fourth" }
|
|
61
54
|
};
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
switch (props.status.toLowerCase()) {
|
|
66
|
-
case "created":
|
|
67
|
-
return `Created, ${createdDate}`;
|
|
68
|
-
case "confirmed":
|
|
69
|
-
return `Confirmed, ${updatedDate}`;
|
|
70
|
-
case "preparing":
|
|
71
|
-
case "inuse":
|
|
72
|
-
if (props.positions?.length) {
|
|
73
|
-
const lastEndDate = new Date(props.positions[props.positions.length - 1].date.end);
|
|
74
|
-
return `up to ${formatDate(lastEndDate)}`;
|
|
75
|
-
}
|
|
76
|
-
return `up to 18:00, ${updatedDate}`;
|
|
77
|
-
case "finished":
|
|
78
|
-
return `Finished, ${updatedDate}`;
|
|
79
|
-
case "canceled":
|
|
80
|
-
return `Canceled, ${updatedDate}`;
|
|
81
|
-
default:
|
|
82
|
-
if (props.positions?.length) {
|
|
83
|
-
const lastPosition = props.positions[props.positions.length - 1];
|
|
84
|
-
const lastEndDateRaw = lastPosition?.date?.end;
|
|
85
|
-
if (lastEndDateRaw) {
|
|
86
|
-
const lastEndDate = new Date(lastEndDateRaw);
|
|
87
|
-
const now = /* @__PURE__ */ new Date();
|
|
88
|
-
const diffTime = Math.abs(now.getTime() - lastEndDate.getTime());
|
|
89
|
-
const diffDays = Math.ceil(diffTime / (1e3 * 60 * 60 * 24));
|
|
90
|
-
if (diffDays > 0 && props.status !== "finished" && props.status !== "canceled") {
|
|
91
|
-
return `Delay ${diffDays} day${diffDays > 1 ? "s" : ""}`;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return `Created, ${createdDate}`;
|
|
96
|
-
}
|
|
55
|
+
const statusKey = computed(() => props.status?.toLowerCase() || "created");
|
|
56
|
+
const statusLabel = computed(() => {
|
|
57
|
+
return statusConfig[statusKey.value]?.label || "Processing";
|
|
97
58
|
});
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
if (props.positions?.length) {
|
|
101
|
-
const lastEndDate = new Date(props.positions[props.positions.length - 1].date.end);
|
|
102
|
-
if (/* @__PURE__ */ new Date() > lastEndDate && props.status !== "finished" && props.status !== "canceled") {
|
|
103
|
-
return _sfc_main$1;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return _sfc_main$2;
|
|
107
|
-
}
|
|
108
|
-
return iconMap[props.status.toLowerCase()] || _sfc_main$6;
|
|
59
|
+
const statusClasses = computed(() => {
|
|
60
|
+
return statusConfig[statusKey.value]?.class || "t-main bg-main-nano";
|
|
109
61
|
});
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
date.setHours(0, 0, 0, 0);
|
|
113
|
-
return date;
|
|
114
|
-
};
|
|
115
|
-
const today = getDateWithoutTime(/* @__PURE__ */ new Date());
|
|
116
|
-
const threeDaysFromNow = new Date(today);
|
|
117
|
-
threeDaysFromNow.setDate(today.getDate() + 3);
|
|
118
|
-
const showReturnNotice = computed(() => {
|
|
119
|
-
return props.positions.some((position) => {
|
|
120
|
-
const endDate = position?.date?.end ? getDateWithoutTime(position.date.end) : null;
|
|
121
|
-
return endDate !== null && endDate <= threeDaysFromNow;
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
const hasOverdue = computed(() => {
|
|
125
|
-
return props.positions.some((position) => {
|
|
126
|
-
const endDate = position?.date?.end ? getDateWithoutTime(position.date.end) : null;
|
|
127
|
-
return endDate !== null && endDate < today;
|
|
128
|
-
});
|
|
62
|
+
const dotClasses = computed(() => {
|
|
63
|
+
return statusConfig[statusKey.value]?.dot || "bg-main";
|
|
129
64
|
});
|
|
130
65
|
return (_ctx, _cache) => {
|
|
131
66
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
132
|
-
createElementVNode("div",
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
67
|
+
createElementVNode("div", _hoisted_2, [
|
|
68
|
+
createElementVNode("div", _hoisted_3, [
|
|
69
|
+
createElementVNode("span", _hoisted_4, toDisplayString(formatOrderId(__props.orderId)), 1),
|
|
70
|
+
_cache[0] || (_cache[0] = createElementVNode("span", { class: "t-transp" }, "|", -1)),
|
|
71
|
+
createElementVNode("span", _hoisted_5, toDisplayString(unref(formatDate)(__props.createdAt, { dayMonth: true, language: unref(locale) })), 1)
|
|
72
|
+
]),
|
|
73
|
+
createElementVNode("div", {
|
|
74
|
+
class: normalizeClass(["pd-l-small pd-r-small pd-t-micro pd-b-micro radius-big p-small fw-semi flex-v-center gap-micro flex", statusClasses.value])
|
|
75
|
+
}, [
|
|
76
|
+
createElementVNode("span", {
|
|
77
|
+
class: normalizeClass(["d-block radius-big", dotClasses.value]),
|
|
78
|
+
style: { "width": "6px", "height": "6px" }
|
|
79
|
+
}, null, 2),
|
|
80
|
+
createTextVNode(" " + toDisplayString(statusLabel.value), 1)
|
|
81
|
+
], 2)
|
|
82
|
+
]),
|
|
83
|
+
createElementVNode("div", _hoisted_6, [
|
|
84
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.positions, (item, index) => {
|
|
85
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
86
|
+
key: `${item._id}_${item.variant || "no-variant"}_${index}`,
|
|
87
|
+
editable: false,
|
|
88
|
+
productId: item._id,
|
|
89
|
+
variantId: item.variant,
|
|
90
|
+
images: item.images,
|
|
91
|
+
name: item.name,
|
|
92
|
+
quantity: item.quantity,
|
|
93
|
+
unit: item.unit,
|
|
94
|
+
dates: item.date,
|
|
95
|
+
listing: item.listing,
|
|
96
|
+
price: item.price,
|
|
97
|
+
class: "bg-white radius-small pd-small"
|
|
98
|
+
}, null, 8, ["productId", "variantId", "images", "name", "quantity", "unit", "dates", "listing", "price"]);
|
|
99
|
+
}), 128))
|
|
100
|
+
]),
|
|
101
|
+
createElementVNode("div", _hoisted_7, [
|
|
102
|
+
createElementVNode("div", _hoisted_8, [
|
|
103
|
+
_cache[1] || (_cache[1] = createElementVNode("span", { class: "fw-medium t-dark p-medium" }, "Total", -1)),
|
|
104
|
+
createElementVNode("span", _hoisted_9, toDisplayString(unref(formatPrice)(__props.total)), 1)
|
|
158
105
|
]),
|
|
159
|
-
createElementVNode("div",
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
_: 1
|
|
166
|
-
}, 8, ["text"]),
|
|
167
|
-
createElementVNode("p", _hoisted_9, toDisplayString(__props.positions.length) + " items for " + toDisplayString(_ctx.formatPrice(__props.total)), 1)
|
|
168
|
-
]),
|
|
169
|
-
createElementVNode("div", _hoisted_10, [
|
|
170
|
-
(openBlock(), createBlock(resolveDynamicComponent(statusIcon.value), { class: "t-transp" })),
|
|
171
|
-
createElementVNode("span", _hoisted_11, toDisplayString(statusText.value), 1)
|
|
106
|
+
createElementVNode("div", _hoisted_10, [
|
|
107
|
+
__props.status === "delivered" || __props.status === "finished" ? (openBlock(), createElementBlock("button", _hoisted_11, " Rate ")) : createCommentVNode("", true),
|
|
108
|
+
__props.status === "created" || __props.status === "confirmed" ? (openBlock(), createElementBlock("button", _hoisted_12, " Pay ")) : createCommentVNode("", true),
|
|
109
|
+
createElementVNode("button", _hoisted_13, [
|
|
110
|
+
_cache[2] || (_cache[2] = createTextVNode(" Details ")),
|
|
111
|
+
createVNode(IconNext, { class: "i-small" })
|
|
172
112
|
])
|
|
173
113
|
])
|
|
174
|
-
]
|
|
175
|
-
showReturnNotice.value ? (openBlock(), createElementBlock("div", {
|
|
176
|
-
key: 0,
|
|
177
|
-
class: normalizeClass([
|
|
178
|
-
"flex-nowrap",
|
|
179
|
-
"flex-v-center",
|
|
180
|
-
"flex",
|
|
181
|
-
"pd-regular",
|
|
182
|
-
"radius-bl-medium",
|
|
183
|
-
"radius-br-medium",
|
|
184
|
-
hasOverdue.value ? "bg-fourth-nano" : "bg-second-nano"
|
|
185
|
-
])
|
|
186
|
-
}, [
|
|
187
|
-
(openBlock(), createElementBlock("svg", _hoisted_12, [
|
|
188
|
-
createElementVNode("path", {
|
|
189
|
-
d: "M9.21484 18.4367C8.19857 18.4367 7.23014 18.2795 6.30957 17.965C5.389 17.6551 4.54362 17.2176 3.77344 16.6525C3.00781 16.092 2.34245 15.4266 1.77734 14.6564C1.2168 13.8863 0.779297 13.0432 0.464844 12.1271C0.154948 11.2066 0 10.2381 0 9.22186C0 8.20103 0.154948 7.23033 0.464844 6.30975C0.779297 5.38918 1.2168 4.54608 1.77734 3.78046C2.34245 3.01483 3.00781 2.34947 3.77344 1.78436C4.54362 1.21926 5.389 0.781759 6.30957 0.471863C7.23014 0.15741 8.19857 0.000183105 9.21484 0.000183105C10.2357 0.000183105 11.2064 0.15741 12.127 0.471863C13.0475 0.781759 13.8906 1.21926 14.6562 1.78436C15.4219 2.34947 16.0872 3.01483 16.6523 3.78046C17.2174 4.54608 17.6549 5.38918 17.9648 6.30975C18.2793 7.23033 18.4365 8.20103 18.4365 9.22186C18.4365 10.2381 18.2793 11.2066 17.9648 12.1271C17.6549 13.0432 17.2174 13.8863 16.6523 14.6564C16.0872 15.4266 15.4219 16.092 14.6562 16.6525C13.8906 17.2176 13.0475 17.6551 12.127 17.965C11.2064 18.2795 10.2357 18.4367 9.21484 18.4367ZM9.22168 10.6027C9.7959 10.6027 10.0967 10.3042 10.124 9.70721L10.2607 5.69452C10.2744 5.39374 10.181 5.14992 9.98047 4.96307C9.78451 4.77167 9.5293 4.67596 9.21484 4.67596C8.89583 4.67596 8.63835 4.76939 8.44238 4.95624C8.25098 5.14309 8.16211 5.38918 8.17578 5.69452L8.30566 9.71405C8.33301 10.3065 8.63835 10.6027 9.22168 10.6027ZM9.22168 13.6994C9.5498 13.6994 9.82324 13.6037 10.042 13.4123C10.2653 13.2163 10.377 12.9634 10.377 12.6535C10.377 12.3391 10.2653 12.0838 10.042 11.8879C9.82324 11.6919 9.5498 11.5939 9.22168 11.5939C8.89811 11.5939 8.6224 11.6942 8.39453 11.8947C8.17122 12.0907 8.05957 12.3436 8.05957 12.6535C8.05957 12.9634 8.17122 13.2163 8.39453 13.4123C8.6224 13.6037 8.89811 13.6994 9.22168 13.6994Z",
|
|
190
|
-
fill: hasOverdue.value ? "#FF0000" : "#007AFF"
|
|
191
|
-
}, null, 8, _hoisted_13)
|
|
192
|
-
])),
|
|
193
|
-
createElementVNode("span", {
|
|
194
|
-
class: normalizeClass(["p-regular fw-semi", [
|
|
195
|
-
hasOverdue.value ? "t-red" : "t-grey"
|
|
196
|
-
]])
|
|
197
|
-
}, " Need to return part of the equipment ", 2)
|
|
198
|
-
], 2)) : createCommentVNode("", true)
|
|
114
|
+
])
|
|
199
115
|
]);
|
|
200
116
|
};
|
|
201
117
|
}
|
|
202
118
|
};
|
|
203
|
-
const CardOrderUser = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-06132302"]]);
|
|
204
119
|
export {
|
|
205
|
-
|
|
120
|
+
_sfc_main as default
|
|
206
121
|
};
|
|
207
122
|
//# sourceMappingURL=CardOrderUser.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardOrderUser.vue.js","sources":["../../../../../../../src/modules/orders/components/blocks/CardOrderUser.vue"],"sourcesContent":["<template>\n <div class=\"w-100\">\n <!-- Главный контейнер -->\n <div class=\"bg-light radius-tl-medium radius-tr-medium pd-thin gap-small flex-v-center flex-nowrap flex\"\n \t:class=\"{\n \t\t'radius-bl-medium radius-br-medium': !showReturnNotice\n \t}\"\n >\n <!-- Левая часть - сетка фотографий -->\n <div style=\"display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr\" class=\"flex-child-default gap-micro h-max-5r aspect-1x1\">\n\t\t\t <template v-if=\"positions.length > 0\">\n\t\t\t <div \n\t\t\t v-for=\"index in 4\" \n\t\t\t :key=\"index\" \n style=\"min-height: 0\"\n\t\t\t class=\"w-100 h-100 bg-white-transp-50 radius-thin\"\n\t\t\t :class=\"{\n\t\t\t 'bg-white-transp-50': index <= positions.length && index <= 3,\n\t\t\t 'bg-white-transp-50': index > positions.length || (index === 4 && positions.length <= 3),\n\t\t\t 'bg-main': index === 4 && positions.length > 3\n\t\t\t }\"\n\t\t\t >\n\t\t\t <img \n\t\t\t\t\t\t v-if=\"index > 0 && index <= positions.length && positions[index - 1]?.images?.[0]\" \n\t\t\t\t\t\t :src=\"`${FILE_SERVER_URL || ''}${positions[index - 1].images[0] || positions[index - 1].image}`\" \n\t\t\t\t\t\t class=\"radius-small object-fit-contain w-100 h-100\" \n\t\t\t\t\t\t :alt=\"positions[index - 1].name\" \n\t\t\t\t\t>\n\t\t\t <div v-else-if=\"index === 4 && positions.length > 3\" class=\"flex-center h-100\">\n\t\t\t <span class=\"fw-medium t-white\">+{{ positions.length - 3 }}</span>\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t </template>\n\t\t\t</div>\n\n <!-- Правая часть - контент -->\n <div class=\"flex-column flex w-100\">\n <!-- ID заказа и цена -->\n <div class=\"mn-b-thin\">\n <Tooltip :text=\"orderId\">\n\t\t\t <p class=\"p-medium\">\n\t\t\t #{{ orderId.slice(0, 4) }}...{{ orderId.slice(-4) }}\n\t\t\t </p>\n\t\t\t </Tooltip>\n <p class=\"t-transp\">{{ positions.length }} items for {{ formatPrice(total) }}</p>\n </div>\n\n <!-- Оставшееся время -->\n <div class=\"flex-nowrap radius-thin bg-white w-max pd-thin flex-v-center flex\">\n\t\t\t\t\t<component :is=\"statusIcon\" class=\"t-transp\" />\n\t\t\t <span class=\"mn-l-micro p-regular\">{{ statusText }}</span>\n </div>\n </div>\n </div>\n\n <!-- Уведомление о возврате -->\n <div \n\t\t v-if=\"showReturnNotice\" \n\t\t :class=\"[\n\t\t 'flex-nowrap', \n\t\t 'flex-v-center', \n\t\t 'flex', \n\t\t 'pd-regular', \n\t\t 'radius-bl-medium', \n\t\t 'radius-br-medium',\n\t\t hasOverdue ? 'bg-fourth-nano' : 'bg-second-nano'\n\t\t ]\"\n\t\t>\n\t\t <svg \n\t\t class=\"i-medium mn-r-thin t-main\" \n\t\t xmlns=\"http://www.w3.org/2000/svg\" \n\t\t width=\"19\" \n\t\t height=\"19\" \n\t\t viewBox=\"0 0 19 19\" \n\t\t fill=\"none\"\n\t\t >\n\t\t <path \n\t\t d=\"M9.21484 18.4367C8.19857 18.4367 7.23014 18.2795 6.30957 17.965C5.389 17.6551 4.54362 17.2176 3.77344 16.6525C3.00781 16.092 2.34245 15.4266 1.77734 14.6564C1.2168 13.8863 0.779297 13.0432 0.464844 12.1271C0.154948 11.2066 0 10.2381 0 9.22186C0 8.20103 0.154948 7.23033 0.464844 6.30975C0.779297 5.38918 1.2168 4.54608 1.77734 3.78046C2.34245 3.01483 3.00781 2.34947 3.77344 1.78436C4.54362 1.21926 5.389 0.781759 6.30957 0.471863C7.23014 0.15741 8.19857 0.000183105 9.21484 0.000183105C10.2357 0.000183105 11.2064 0.15741 12.127 0.471863C13.0475 0.781759 13.8906 1.21926 14.6562 1.78436C15.4219 2.34947 16.0872 3.01483 16.6523 3.78046C17.2174 4.54608 17.6549 5.38918 17.9648 6.30975C18.2793 7.23033 18.4365 8.20103 18.4365 9.22186C18.4365 10.2381 18.2793 11.2066 17.9648 12.1271C17.6549 13.0432 17.2174 13.8863 16.6523 14.6564C16.0872 15.4266 15.4219 16.092 14.6562 16.6525C13.8906 17.2176 13.0475 17.6551 12.127 17.965C11.2064 18.2795 10.2357 18.4367 9.21484 18.4367ZM9.22168 10.6027C9.7959 10.6027 10.0967 10.3042 10.124 9.70721L10.2607 5.69452C10.2744 5.39374 10.181 5.14992 9.98047 4.96307C9.78451 4.77167 9.5293 4.67596 9.21484 4.67596C8.89583 4.67596 8.63835 4.76939 8.44238 4.95624C8.25098 5.14309 8.16211 5.38918 8.17578 5.69452L8.30566 9.71405C8.33301 10.3065 8.63835 10.6027 9.22168 10.6027ZM9.22168 13.6994C9.5498 13.6994 9.82324 13.6037 10.042 13.4123C10.2653 13.2163 10.377 12.9634 10.377 12.6535C10.377 12.3391 10.2653 12.0838 10.042 11.8879C9.82324 11.6919 9.5498 11.5939 9.22168 11.5939C8.89811 11.5939 8.6224 11.6942 8.39453 11.8947C8.17122 12.0907 8.05957 12.3436 8.05957 12.6535C8.05957 12.9634 8.17122 13.2163 8.39453 13.4123C8.6224 13.6037 8.89811 13.6994 9.22168 13.6994Z\" \n\t\t :fill=\"hasOverdue ? '#FF0000' : '#007AFF'\"\n\t\t />\n\t\t </svg>\t\n\t\t <span \n\t\t \tclass=\"p-regular fw-semi\"\n\t\t \t:class=\"[\n\t\t\t hasOverdue ? 't-red' : 't-grey'\n\t\t\t ]\"\n\t\t >\n\t\t\t\tNeed to return part of the equipment\n\t\t\t</span>\n\t\t</div>\n </div>\n</template>\n\n<script setup>\nimport { computed } from 'vue';\n\nimport Tooltip from '@martyrs/src/components/Tooltip/Tooltip.vue'\n\nimport IconStatusCreated from '@martyrs/src/modules/orders/components/icons/IconStatusCreated.vue';\nimport IconStatusConfirmed from '@martyrs/src/modules/orders/components/icons/IconStatusConfirmed.vue';\nimport IconStatusInUse from '@martyrs/src/modules/orders/components/icons/IconStatusInUse.vue';\nimport IconStatusFinished from '@martyrs/src/modules/orders/components/icons/IconStatusFinished.vue';\nimport IconStatusCanceled from '@martyrs/src/modules/orders/components/icons/IconStatusCanceled.vue';\nimport IconStatusDelay from '@martyrs/src/modules/orders/components/icons/IconStatusDelay.vue';\n\nconst props = defineProps({\n orderId: String,\n status: String,\n positions: Array,\n createdAt: [String, Date],\n updatedAt: [String, Date],\n total: [String, Number]\n});\n\nconst iconMap = {\n 'created': IconStatusCreated,\n 'confirmed': IconStatusConfirmed,\n 'preparing': IconStatusInUse,\n 'inuse': IconStatusInUse,\n 'finished': IconStatusFinished,\n 'canceled': IconStatusCanceled,\n 'delay': IconStatusDelay\n};\n\nconst formatDate = (date) => {\n const d = new Date(date);\n return d.toLocaleDateString('en-US', { day: 'numeric', month: 'long' });\n};\n\nconst statusText = computed(() => {\n const createdDate = formatDate(props.createdAt);\n const updatedDate = formatDate(props.updatedAt);\n \n switch(props.status.toLowerCase()) {\n case 'created':\n return `Created, ${createdDate}`;\n case 'confirmed':\n return `Confirmed, ${updatedDate}`;\n case 'preparing':\n case 'inuse':\n if (props.positions?.length) {\n const lastEndDate = new Date(props.positions[props.positions.length - 1].date.end);\n return `up to ${formatDate(lastEndDate)}`;\n }\n return `up to 18:00, ${updatedDate}`;\n case 'finished':\n return `Finished, ${updatedDate}`;\n case 'canceled':\n return `Canceled, ${updatedDate}`;\n default:\n // Расчет задержки\n if (props.positions?.length) {\n const lastPosition = props.positions[props.positions.length - 1];\n const lastEndDateRaw = lastPosition?.date?.end;\n\n if (lastEndDateRaw) {\n const lastEndDate = new Date(lastEndDateRaw);\n const now = new Date();\n const diffTime = Math.abs(now.getTime() - lastEndDate.getTime());\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n\n if (diffDays > 0 && props.status !== 'finished' && props.status !== 'canceled') {\n return `Delay ${diffDays} day${diffDays > 1 ? 's' : ''}`;\n }\n }\n }\n return `Created, ${createdDate}`;\n\n }\n});\n\n// Выбор иконки\nconst statusIcon = computed(() => {\n if (props.status === 'preparing' || props.status === 'inuse') {\n // Проверка на задержку\n if (props.positions?.length) {\n const lastEndDate = new Date(props.positions[props.positions.length - 1].date.end);\n if (new Date() > lastEndDate && props.status !== 'finished' && props.status !== 'canceled') {\n return IconStatusDelay;\n }\n }\n return IconStatusInUse;\n }\n return iconMap[props.status.toLowerCase()] || IconStatusCreated;\n});\n\n// Функция для нормализации даты (убираем время)\nconst getDateWithoutTime = (dateString) => {\n const date = new Date(dateString);\n date.setHours(0, 0, 0, 0);\n return date;\n};\n\n// Текущая дата и дата через 3 дня\nconst today = getDateWithoutTime(new Date());\nconst threeDaysFromNow = new Date(today);\nthreeDaysFromNow.setDate(today.getDate() + 3);\n\n// Показывать ли уведомление о возврате\nconst showReturnNotice = computed(() => {\n return props.positions.some(position => {\n const endDate = position?.date?.end ? getDateWithoutTime(position.date.end) : null;\n return endDate !== null && endDate <= threeDaysFromNow;\n });\n});\n\n// Есть ли просроченные позиции\nconst hasOverdue = computed(() => {\n return props.positions.some(position => {\n const endDate = position?.date?.end ? getDateWithoutTime(position.date.end) : null;\n return endDate !== null && endDate < today;\n });\n});\n\n// Предполагается, что formatPrice определен где-то в коде\n</script>\n\n<style scoped>\n/* Добавляем стиль для текста \"просрочено\" */\n.t-red {\n color: red;\n}\n</style>"],"names":["IconStatusCreated","IconStatusConfirmed","IconStatusInUse","IconStatusFinished","IconStatusCanceled","IconStatusDelay"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,UAAM,QAAQ;AASd,UAAM,UAAU;AAAA,MACd,WAAWA;AAAAA,MACX,aAAaC;AAAAA,MACb,aAAaC;AAAAA,MACb,SAASA;AAAAA,MACT,YAAYC;AAAAA,MACZ,YAAYC;AAAAA,MACZ,SAASC;AAAAA,IACX;AAEA,UAAM,aAAa,CAAC,SAAS;AAC3B,YAAM,IAAI,IAAI,KAAK,IAAI;AACvB,aAAO,EA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AE5D,YAAI,MAAM,WAAW,QAAQ;AAC3B,gBAAM,cAAc,IAAI,KAAK,MAAM,UAAU,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,GAAG;AACjF,cAAI,oBAAI,SAAS,eAAe,MAAM,WAAW,cAAc,MAAM,WAAW,YAAY;AAC1F,mBAAOA;AAAAA,UACT;AAAA,QACF;AACA,eAAOH;AAAAA,MACT;AACA,aAAO,QAAQ,MAAM,OAAO,YAAW,CAAE,KAAKF;AAAAA,IAChD,CAAC;AAGD,UAAM,qBAAqB,CAAC,eAAe;AACzC,YAAM,OAAO,IAAI,KAAK,UAAU;AAChC,WAAK,SAAS,GAAG,GAAG,GAAG,CAAC;AACxB,aAAO;AAAA,IACT;AAGA,UAAM,QAAQ,mBAAmB,oBAAI,MAAM;AAC3C,UAAM,mBAAmB,IAAI,KAAK,KAAK;AACvC,qBAAiB,QAAQ,MAAM,QAAO,IAAK,CAAC;AAG5C,UAAM,mBAAmB,SAAS,MAAM;AACtC,aAAO,MAAM,UAAU,KAAK,cAAY;AACtC,cAAM,UAAU,UAAU,MAAM,MAAM,mBAAmB,SAAS,KAAK,GAAG,IAAI;AAC9E,eAAO,YAAY,QAAQ,WAAW;AAAA,MACxC,CAAC;AAAA,IACH,CAAC;AAGD,UAAM,aAAa,SAAS,MAAM;AAChC,aAAO,MAAM,UAAU,KAAK,cAAY;AACtC,cAAM,UAAU,UAAU,MAAM,MAAM,mBAAmB,SAAS,KAAK,GAAG,IAAI;AAC9E,eAAO,YAAY,QAAQ,UAAU;AAAA,MACvC,CAAC;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CardOrderUser.vue.js","sources":["../../../../../../../src/modules/orders/components/blocks/CardOrderUser.vue"],"sourcesContent":["<template>\n <div class=\"bg-light radius-medium pd-medium\">\n\n <!-- Header: Order ID | Date | Status -->\n <div class=\"flex-nowrap flex-v-center flex-between flex mn-b-small\">\n <div class=\"flex-v-center gap-small flex\">\n <span class=\"fw-medium t-dark\">{{ formatOrderId(orderId) }}</span>\n <span class=\"t-transp\">|</span>\n <span class=\"t-transp\">{{ formatDate(createdAt, { dayMonth: true, language: locale }) }}</span>\n </div>\n\n <!-- Status Badge -->\n <div\n class=\"pd-l-small pd-r-small pd-t-micro pd-b-micro radius-big p-small fw-semi flex-v-center gap-micro flex\"\n :class=\"statusClasses\"\n >\n <span class=\"d-block radius-big\" :class=\"dotClasses\" style=\"width: 6px; height: 6px;\"></span>\n {{ statusLabel }}\n </div>\n </div>\n\n <!-- Product List -->\n <div class=\"gap-thin flex-column flex mn-b-small\">\n <CardOrderItem\n v-for=\"(item, index) in positions\"\n :key=\"`${item._id}_${item.variant || 'no-variant'}_${index}`\"\n :editable=\"false\"\n :productId=\"item._id\"\n :variantId=\"item.variant\"\n :images=\"item.images\"\n :name=\"item.name\"\n :quantity=\"item.quantity\"\n :unit=\"item.unit\"\n :dates=\"item.date\"\n :listing=\"item.listing\"\n :price=\"item.price\"\n class=\"bg-white radius-small pd-small\"\n />\n </div>\n\n <!-- Footer: Total + Actions -->\n <div class=\"flex-nowrap flex-v-center flex-between flex\">\n <div class=\"w-100\">\n <span class=\"fw-medium t-dark p-medium\">Total</span>\n <span class=\"fw-demi t-dark p-medium\">{{ formatPrice(total) }}</span>\n </div>\n\n <div class=\"flex-nowrap gap-thin flex\">\n <button\n v-if=\"status === 'delivered' || status === 'finished'\"\n class=\"button bg-white pd-t-thin pd-b-thin pd-l-small pd-r-small p-small fw-medium radius-small\"\n >\n Rate\n </button>\n <button\n v-if=\"status === 'created' || status === 'confirmed'\"\n class=\"button bg-main t-white pd-t-thin pd-b-thin pd-l-small pd-r-small p-small fw-medium radius-small\"\n >\n Pay\n </button>\n <button class=\"button bg-white pd-t-thin pd-b-thin pd-l-small pd-r-small p-small fw-medium radius-small flex-v-center gap-micro flex\">\n Details\n <IconChevronRight class=\"i-small\" />\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed } from 'vue';\nimport { useI18n } from 'vue-i18n';\nimport { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\nimport IconChevronRight from '@martyrs/src/modules/icons/navigation/IconChevronRight.vue';\nimport CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue';\n\nconst { locale } = useI18n();\nconst { formatPrice, formatDate } = useGlobalMixins();\n\nconst props = defineProps({\n orderId: String,\n status: String,\n positions: Array,\n createdAt: [String, Date],\n updatedAt: [String, Date],\n total: [String, Number]\n});\n\nconst formatOrderId = (id) => {\n if (!id) return '';\n return `#${id.slice(0, 3).toUpperCase()}-${id.slice(-4).toUpperCase()}-${new Date().getFullYear()}`;\n};\n\nconst statusConfig = {\n 'delivered': { label: 'Delivered', class: 't-green bg-green-nano', dot: 'bg-green' },\n 'finished': { label: 'Delivered', class: 't-green bg-green-nano', dot: 'bg-green' },\n 'processing': { label: 'Processing', class: 't-main bg-main-nano', dot: 'bg-main' },\n 'created': { label: 'Processing', class: 't-main bg-main-nano', dot: 'bg-main' },\n 'confirmed': { label: 'Confirmed', class: 't-main bg-main-nano', dot: 'bg-main' },\n 'shipped': { label: 'Shipped', class: 't-second bg-second-nano', dot: 'bg-second' },\n 'preparing': { label: 'Preparing', class: 't-second bg-second-nano', dot: 'bg-second' },\n 'cancelled': { label: 'Cancelled', class: 't-grey bg-light', dot: 'bg-grey' },\n 'canceled': { label: 'Cancelled', class: 't-grey bg-light', dot: 'bg-grey' },\n 'returned': { label: 'Returned', class: 't-fourth bg-fourth-nano', dot: 'bg-fourth' }\n};\n\nconst statusKey = computed(() => props.status?.toLowerCase() || 'created');\n\nconst statusLabel = computed(() => {\n return statusConfig[statusKey.value]?.label || 'Processing';\n});\n\nconst statusClasses = computed(() => {\n return statusConfig[statusKey.value]?.class || 't-main bg-main-nano';\n});\n\nconst dotClasses = computed(() => {\n return statusConfig[statusK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AgB,SAAS,MAAM;AACnC,aAAO,aAAa,UAAU,KAAK,GAAG,SAAS;AAAA,IACjD,CAAC;AAED,UAAM,aAAa,SAAS,MAAM;AAChC,aAAO,aAAa,UAAU,KAAK,GAAG,OAAO;AAAA,IAC/C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mergeModels, useModel, ref, watch, createBlock, openBlock, withCtx, createVNode, createElementVNode, unref, isRef, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
3
3
|
import Field from "../../../../components/Field/Field.vue.js";
|
|
4
|
-
import Select from "../../../../components/Select/Select.
|
|
5
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
5
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
6
6
|
const _hoisted_1 = { class: "gap-thin flex mn-t-small" };
|
|
7
7
|
const _sfc_main = {
|
|
8
8
|
__name: "FormApplicationDetails",
|
|
@@ -2,8 +2,8 @@ import { mergeModels, useModel, ref, watch, createBlock, openBlock, withCtx, cre
|
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
3
3
|
import Field from "../../../../components/Field/Field.vue.js";
|
|
4
4
|
import _sfc_main$2 from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
|
5
|
-
import Select from "../../../../components/Select/Select.
|
|
6
|
-
import _sfc_main$3 from "../../../../components/Button/Button.
|
|
5
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
6
|
+
import _sfc_main$3 from "../../../../components/Button/Button.vue2.js";
|
|
7
7
|
const _hoisted_1 = { class: "gap-thin mn-b-thin flex-justify-between flex-nowrap flex" };
|
|
8
8
|
const _hoisted_2 = {
|
|
9
9
|
key: 2,
|
|
@@ -3,7 +3,7 @@ import { useRoute } from "vue-router";
|
|
|
3
3
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import _sfc_main$3 from "../../../icons/navigation/IconCross.vue.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
import _sfc_main$6 from "../../../../components/Popup/Popup.vue.js";
|
|
8
8
|
import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
|
|
9
9
|
import _sfc_main$4 from "../../../core/views/components/blocks/BlockSearch.vue.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, onMounted, computed, createElementBlock, createCommentVNode, openBlock, createVNode, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, unref, normalizeClass, withCtx, createBlock } from "vue";
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
-
import Select from "../../../../components/Select/Select.
|
|
3
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
4
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
5
5
|
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
|
6
6
|
import IconTime from "../../../icons/entities/IconTime.vue.js";
|
|
7
7
|
import _sfc_main$3 from "../blocks/CardOrderItem.vue.js";
|
|
@@ -79,7 +79,7 @@ const _sfc_main = {
|
|
|
79
79
|
const order = ref(null);
|
|
80
80
|
ref(null);
|
|
81
81
|
const orderOrganization = ref(null);
|
|
82
|
-
const statuses = store.core.state.options
|
|
82
|
+
const statuses = store.core.state.options?.orders?.statuses || [];
|
|
83
83
|
if (route.meta.context === "user" && state.user && route.params._id !== state.user?._id && !state.access?.roles?.includes("ROLE_MODERATOR") && !state.access?.roles?.includes("ROLE_ADMIN")) {
|
|
84
84
|
router.push("/401");
|
|
85
85
|
}
|
|
@@ -139,14 +139,14 @@ const _sfc_main = {
|
|
|
139
139
|
}, 0));
|
|
140
140
|
});
|
|
141
141
|
function getNextStatus(currentStatus) {
|
|
142
|
-
const currentIndex =
|
|
142
|
+
const currentIndex = statuses.findIndex((status) => status.value === currentStatus);
|
|
143
143
|
if (currentIndex !== -1 && currentIndex + 1 < statuses.length) {
|
|
144
|
-
return
|
|
144
|
+
return statuses[currentIndex + 1];
|
|
145
145
|
}
|
|
146
146
|
return null;
|
|
147
147
|
}
|
|
148
148
|
const isActiveStatus = (index) => {
|
|
149
|
-
return
|
|
149
|
+
return statuses.slice(index).some((status) => status.value === order.value?.status);
|
|
150
150
|
};
|
|
151
151
|
async function changePaymentStatus() {
|
|
152
152
|
if (selectedPayments.value.status && selectedPayments.value.type) {
|
|
@@ -178,7 +178,7 @@ const _sfc_main = {
|
|
|
178
178
|
])
|
|
179
179
|
]),
|
|
180
180
|
createElementVNode("div", _hoisted_6, [
|
|
181
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
181
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(statuses), (status, index) => {
|
|
182
182
|
return openBlock(), createElementBlock("div", {
|
|
183
183
|
key: index,
|
|
184
184
|
class: "w-20"
|
|
@@ -402,7 +402,7 @@ const _sfc_main = {
|
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
|
-
const OrderBackoffice = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
405
|
+
const OrderBackoffice = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f82cb957"]]);
|
|
406
406
|
export {
|
|
407
407
|
OrderBackoffice as default
|
|
408
408
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderBackoffice.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderBackoffice.vue"],"sourcesContent":["<template>\n\t<div v-if=\"order && orderOrganization\" class=\"pd-thin bg-white\"> \n\n\t <div v-if=\"order\" class=\"mn-b-thin pos-relative w-100 bg-main radius-medium pd-medium\">\n\t \t<div class=\"mn-b-small flex-nowrap flex\">\n\t\t \t<p class=\"fw-medium p-regular\">\n\t\t \tOrder No: <span class=\"p-small t-transp\">#{{order._id}}</span>\n\t\t </p>\n\t\t\t</div>\n\n\t \t<div class=\"flex-nowrap flex gap-thin pos-relative \">\n\t\t <div v-for=\"(status, index) in store.core.state.options.orders.statuses\" :key=\"index\" class=\"w-20\">\n\t\t <div\n\t\t \tclass=\"bg-white br-anim br-glow radius-extra h-1r w-100\"\n\t\t :class=\"\n\t\t\t\t\t { 'br-glow-anim': isActiveStatus(index) },\n\t\t\t\t\t { 't-transp': !isActiveStatus(index) },\n\t\t\t\t\t { 'blink': order.status === status.value && getNextStatus(order.status) }\n\t\t\t\t\t \"\n\t\t />\n\t\t <div \n\t\t \t:class=\"{ 't-transp': !isActiveStatus(index) }\"\n\t\t\t\t\t class=\"mn-t-thin p-small fw-medium uppercase\">{{ status.value }}</div>\n\t\t \t</div>\n\t\t\t </div>\n\t </div>\n\n \t<Popup \n title=\"Payment Status\" \n @close-popup=\"closePaymentPopup\" \n :isPopupOpen=\"isOpenPaymentPopup\"\n class=\"bg-light w-min-25r w-max-25r radius-medium pd-big\"\n >\n \t<Select \n v-model:select=\"selectedPayments.type\"\n :property=\"'value'\"\n label=\"Type\"\n :options=\"[\n {name: 'Cash', value: 'cash'}, \n {name: 'Card', value: 'card'}, \n {name: 'Bank Transfer', value: 'bank'},\n ]\"\n placeholder=\"Select type of payment\" \n size=\"small\"\n class=\"bg-white mn-b-thin pd-regular radius-small w-100\"\n />\n\n <Select \n v-model:select=\"selectedPayments.status\"\n :property=\"'value'\"\n label=\"Status\"\n :options=\"[\n {name: 'Unpaid', value: 'unpaid'}, \n {name: 'Paid', value: 'paid'}, \n {name: 'Refunded', value: 'refunded'},\n ]\"\n placeholder=\"Select status of payment\" \n size=\"small\"\n class=\"bg-white mn-b-small pd-regular radius-small w-100\"\n />\n\n\n <Button :submit=\"changePaymentStatus\" class=\"t-white w-100 bg-second\">\n\t\t\t\t<span>Change Status</span>\n\t\t\t</Button>\n\t \t</Popup>\n\n\t <Popup \n title=\"Change order status\" \n @close-popup=\"closeStatusPopup\" \n :isPopupOpen=\"isOpeStatusPopup\"\n class=\"bg-light w-min-30r w-max-30r radius-medium pd-big\"\n >\n\n\t\t\t<!-- Добавить выбор примерного времени -->\n\n \t<ul class=\"flex gap-thin flex-column mn-b-thin\">\n \t\t\t<CardOrderItem\n \t\t\t\tv-for=\"(product, index) in order.positions\" \n \t\t\t\t:key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n \t\t\t\t:editable=\"!order.status_history || order.status_history.length <= 1\" \n \t\t\t\t:productId=\"product._id\"\n \t\t\t\t:variantId=\"product.variant\"\n \t\t\t\t:images=\"product.images\"\n \t\t\t\t:name=\"product.name\"\n \t\t\t\t:quantity=\"product.quantity\"\n \t\t\t\t:unit=\"product.unit\"\n \t\t\t\t:dates=\"product.date\"\n \t\t\t\t:listing=\"product.listing\"\n \t\t\t\t:price=\"product.price\"\n \t\t\t\t:increase=\"() => orders.mutations.incrementItemQuantity(order, product._id, product.variant)\"\n\t :decrease=\"() => orders.mutations.decrementItemQuantity(order, product._id, product.variant)\"\n\t :remove=\"() => orders.mutations.removeProduct(order, product._id, product.variant)\"\n\t @updateRentDates=\"(productId, variantId, dates) => shopcart.actions.updateRentDates({ positions: order.positions, productId, variantId, dates })\"\n \t\t\t\tclass=\"bg-white radius-small pd-small\"\n \t\t\t/>\n </ul>\n \n <PriceTotal\n :totalPrice=\"cartTotalPrice\"\n :currency=\"returnCurrency()\"\n :showFees=\"store.core.state.options?.orders?.showFees\"\n :feesRate=\"store.core.state.options?.orders?.feesRate || 0\"\n :showVat=\"store.core.state.options?.orders?.showVat\"\n :vatRate=\"store.core.state.options?.orders?.vatRate || 0\"\n />\n\n \t<Button :submit=\"setNextStatus\" class=\"t-white w-100 bg-second\">\n\t\t\t\t<span>{{'Confirm Changing to ' + (getNextStatus(order.status)).label}}</span>\n\t\t\t</Button>\n\t \t</Popup>\n\n\n\t \n\t <div v-if=\"order\" class=\"gap-thin cols-2 mobile:cols-1\">\n\n\t <div class=\"w-100\">\n\n\n\t\t <CardOrganization \n\t\t \tv-if=\"orderOrganization[0]\"\n\t\t :organization=\"orderOrganization[0]\"\n\t\t :showRating=\"true\"\n\t\t :showFollowers=\"false\"\n\t\t :showProducts=\"false\"\n\t\t class=\"bg-light mn-b-thin w-100 o-hidden radius-medium pd-small \"\n\t\t />\n\n\n\t\t <div \n\t\t \tclass=\"mn-b-thin bg-light w-100 o-hidden radius-medium \"\n\t\t >\n\t\t \t<div class=\"pd-small flex-nowrap flex\">\n\t\t\t \t<div class=\"mn-r-auto\">\n\t\t\t\t \t<span class=\"d-block fw-medium p-regular mn-b-thin\">Order is</span>\n\t\t\t\t\t <span class=\" lh-[0.75] h2 d-block mn-b-small\">{{order.status}}</span>\n\t\t\t\t\t <p class=\"pd-thin radius-extra bg-black t-white w-max\">{{formatDate(order.updatedAt, {language: locale })}}</p>\n\t\t\t\t\t </div>\n\t\t\t\t\t <!-- <div class=\"t-right\">\n\t\t\t\t\t \tCancel order<br>\n\t\t\t\t\t \tExchange item\n\t\t\t\t\t \t<hr class=\"mn-b-thin mn-t-thin\">\n\t\t\t\t\t \tFor Delivery Queries Contact Us\n\t\t\t\t\t \t\n\t\t\t\t\t </div> -->\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div v-if=\"order.customer.target?.number\" class=\"pd-small flex flex-nowrap flex-v-center br-t-1px br-black-transp-10\">\n\t\t\t \t<p class=\"w-100 fw-medium p-regular\">\n\t\t\t \tPhone\n\t\t\t </p>\n\n\t\t\t <p class=\"w-100 t-right \">\n\t\t\t \t{{order.customer.target?.number || 'Not specified'}}\n\t\t\t </p>\n\t\t\t </div>\n\n\t\t\t <div class=\"pd-small flex flex-nowrap flex-v-center br-t-1px br-black-transp-10\">\n\t\t\t \t<p class=\"fw-medium p-regular\">\n\t\t\t \tAddress\n\t\t\t </p>\n\n\t\t\t <p class=\"w-100 t-right\">\n\t\t\t\t\t\t\t{{order.delivery.address || (order.delivery.spot[0]?.profile.name + (order.delivery.spot[0]?.address ? ', ' + order.delivery.spot[0].address : '')) || 'Not specified'}}\n\t\t\t </p>\n\n\n\n\t\t\t </div>\n\n\n\t\t\t <div v-if=\"order.comment\" class=\"pos-relative radius-thin mn-t-zero mn-thin bg-fifth-transp-10 pd-small\">\n\t\t\t <p class=\"mn-b-thin t-transp uppercase p-small fw-medium\">Comment</p>\n\t\t\t <p>{{order.comment}}</p>\n\t\t\t </div>\n\n\t\t\t <div class=\"pd-small flex flex-nowrap flex-v-center br-t-1px br-black-transp-10\">\n\t\t\t \t<p class=\"fw-medium p-regular\">\n\t\t\t \tDelivery\n\t\t\t </p>\n\n\t\t\t <p class=\"w-100 t-right \">\n\t\t\t {{order.delivery.type ? order.delivery.type : 'Not specified'}} \n\t\t\t </p>\n\t\t\t </div>\n\n\t\t\t <div class=\"pd-small flex flex-nowrap flex-v-center br-t-1px br-black-transp-10\">\n\t\t\t \t<p class=\"mn-r-auto fw-medium p-regular\">\n\t\t\t \tPayment\n\t\t\t </p>\n\n\n\t\t\t <p class=\"w-max t-right\">\n\t\t\t {{order.payment.type ? order.payment.type : 'Not specified'}} \n\t\t\t </p>\n\n\t\t\t <p @click=\"route.meta.context !== 'user' && route.meta.context !== 'root' ? openPaymentPopup() : console.log('Context:', route.meta.context)\" class=\"w-max pd-thin radius-small bg-second t-white mn-l-thin cursor-pointer hover:bg-black t-right\">\n\t\t\t {{order.payment.status ? order.payment.status : 'Unpaid'}} \n\t\t\t </p>\n\t\t\t </div>\n\n\n\t\t\t\t</div>\n\n\t\t\t\t<div v-if=\"route.meta.context !== 'user' && route.meta.context !== 'root'\" class=\"o-y-scroll bg-light pd-thin mn-b-thin pd-thin radius-medium flex-nowrap flex\">\n\t\t \t\t<div class=\"flex-child-default mn-r-small w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-light-transp-20\">\n\t\t \t\t\t<IconTime class=\"i-medium t-transp\" fill=\"rgb(var(--black)\" />\n\t\t <p class=\"fw-medium mn-r-auto\"><span class=\"p-small t-transp\">Estimated Reaction</span><br>{{formatDate(order.deadline, { language: locale })}}</p>\n\t\t\t \t</div>\n\t\t\t \t<button v-if=\"getNextStatus(order.status)\" @click=\"openStatusPopup\" class=\"flex-child-default mn-l-auto bg-black t-white button\"> \n\t\t\t\t Mark as {{ (getNextStatus(order.status)).label }} \n\t\t\t\t </button>\n\t\t \t</div>\n\n\t\t\t<div class=\"bg-light radius-medium pd-medium mn-r-bold w-100\">\n\t\t <h3 class=\"mn-b-small\">Chat With Us</h3>\n\n\t\t <ChatPage\n\t\t \t:username=\"['Order', 'UserOrder'].includes(route.name) ? (order.user?.name || 'User') : 'Support'\"\n\t\t \t:user=\"auth.state.user._id\"\n\t\t \t:chatID=\"route.params.order\"\n\t\t \tclass=\"radius-semi bs-black bg-light o-hidden\"\n\t\t />\n\n\t </div>\n\t \t<!-- <StatusHistory \n\t \t\tv-if=\"orders.state.current.status_history\"\n\t \t\t:statuses=\"statuses\"\n\t \t\t:statusHistory=\"orders.state.current.status_history\"\n\t \t\t:statusCurrent=\"orders.state.current.status\"\n\t \t\t:edit=\"route.name === 'Order Edit'\"\n\t \t/> -->\n\n\t <!-- \t<button \n\t \t@click=\"requestPayment(order)\"\n\t \tv-if=\"\n\t \t\torder.status === 'Подтвержден' \n\t \t\t&& order.payment.type === 'Online'\n\t \t\t&& payment.Status !== 'CONFIRMED'\n\t \t\t&& payment.Status !== 'REFUNDED'\n\t \t\" \n\t \tclass='w-100 button'>Оплатить заказ</button> -->\n\t \t<span class=\"t-transp\" v-if=\"payment && payment.Status === 'CONFIRMED'\">Paid</span> \n\t </div> \n\n\t <div class=\"bg-light radius-medium pd-medium w-100\">\n\t \t\t<h3 class=\"mn-b-small\">Order Summary</h3>\n\n\t \t\t<ul class=\"flex gap-thin flex-column mn-b-thin\">\n\t \t\t\t<CardOrderItem\n\t \t\t\t\tv-for=\"(product, index) in order.positions\" \n\t \t\t\t\t:key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n\t \t\t\t\t:editable=\"false\" \n\t \t\t\t\t:productId=\"product._id\"\n\t \t\t\t\t:variantId=\"product.variant\"\n\t \t\t\t\t:images=\"product.images\"\n\t \t\t\t\t:name=\"product.name\"\n\t \t\t\t\t:quantity=\"product.quantity\"\n\t \t\t\t\t:unit=\"product.unit\"\n\t \t\t\t\t:dates=\"product.date\"\n\t \t\t\t\t:listing=\"product.listing\"\n\t \t\t\t\t:price=\"product.price\"\n\t \t\t\t\tclass=\"bg-white radius-small pd-small\"\n\t \t\t\t/>\n\t </ul>\n\t \n\t <PriceTotal\n :totalPrice=\"cartTotalPrice\"\n :deliveryRate=\"deliveryCost\"\n :currency=\"returnCurrency()\"\n :showFees=\"store.core.state.options?.orders?.showFees\"\n :feesRate=\"store.core.state.options?.orders?.feesRate || 0\"\n :showVat=\"store.core.state.options?.orders?.showVat\"\n :vatRate=\"store.core.state.options?.orders?.vatRate || 0\"\n\t\t\t\t :showDeliveryFee=\"store.core.state.options?.orders.showDeliveryFee\"\n\n />\n \t</div>\n\n\t \n\t </div>\n\t</div>\t\t\n\n</template>\n\n\n<script setup=\"props\">\n\timport { computed, ref, onMounted } from 'vue'\n\timport { useRouter, useRoute } from 'vue-router'\n\n\timport Button from '@martyrs/src/components/Button/Button.vue'\n\timport Select from '@martyrs/src/components/Select/Select.vue'\n\timport Popup from \"@martyrs/src/components/Popup/Popup.vue\";\n\n\timport IconTime from '@martyrs/src/modules/icons/entities/IconTime.vue'\n\n\t// Block\n\timport CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'\n\timport CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport ChatPage from '@martyrs/src/modules/chats/components/pages/ChatPage.vue';\n\n\timport StatusHistory from '@martyrs/src/modules/orders/components/blocks/StatusHistory.vue'\n\timport PriceTotal from '@martyrs/src/modules/orders/components/elements/PriceTotal.vue';\n\timport FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'\n\n\timport { useStore } from '@martyrs/src/modules/core/views/store/core.store.js'\n\timport * as auth from '@martyrs/src/modules/auth/views/store/auth.js'\n\timport * as orders \tfrom '@martyrs/src/modules/orders/store/orders.js'\n\timport * as products \tfrom '@martyrs/src/modules/products/store/products.js'\n\timport * as organizations \tfrom '@martyrs/src/modules/organizations/store/organizations.js'\n\n\timport { useI18n } from 'vue-i18n';\n\timport { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\n\tconst store = useStore()\n\t\n\tconst { locale } = useI18n();\n\tconst { returnCurrency } = useGlobalMixins();\n\n\tconst router = useRouter()\n\tconst route = useRoute()\n\n\tconst order = ref(null)\n\tconst productsOrganization = ref(null)\n\tconst orderOrganization = ref(null)\n\n\tconst statuses = store.core.state.options.orders.statuses\n\tconst statusLabels = ['Created', 'Confirmed', 'Preparing', 'In use', 'Finished'];\n\n if (route.meta.context === 'user' && \n auth.state.user && \n route.params._id !== auth.state.user?._id && \n !auth.state.access?.roles?.includes('ROLE_MODERATOR') && \n !auth.state.access?.roles?.includes('ROLE_ADMIN')) {\n router.push('/401');\n }\n\n\tconst isOpeStatusPopup = ref(false);\n\tconst selectedMember = ref(null);\n\n\tfunction openStatusPopup(member) {\n\t isOpeStatusPopup.value = true;\n\t if (typeof member === \"number\") selectedMember.value = member;\n\t}\n\n\tfunction closeStatusPopup() {\n\t isOpeStatusPopup.value = false;\n\t selectedMember.value = null;\n\t}\n\n\tconst isOpenPaymentPopup = ref(false);\n\n\tconst selectedPayments = ref({\n\t\ttype: null,\n\t\tstatus: null\n\t});\n\n\tfunction openPaymentPopup() {\n\t selectedPayments.value.type = order.value.payment.type\n\t selectedPayments.value.status = order.value.payment.status\n\n\t isOpenPaymentPopup.value = true;\n\t}\n\n\tfunction closePaymentPopup() {\n\t isOpenPaymentPopup.value = false;\n\t}\n\n\tonMounted(async()=>{\n\t\torder.value = await orders.actions.read({_id: route.params.order})\n\t\torder.value = order.value[0]\n\n\t orderOrganization.value = await organizations.actions.read({\n\t _id: order.value?.owner.target._id,\n\t location: store.core.state.position?.location,\n\t lookup: ['spots']\n\t });\n\n\t})\n\n\nconst deliveryCost = computed(() => {\n const type = orders.state.current.delivery.type\n const distance = orderOrganization.value[0]?.distance || 0\n const config = store.core.state.options?.orders?.delivery_formula || {}\n\n return orders.getters.getDeliveryPrice(type, distance, config)\n})\n\n\tlet cartTotalPrice = computed(() => {\n return Number(order.value?.positions.reduce((total, product) => {\n // Проверяем тип листинга\n if (product.listing === 'rent') {\n const start = new Date(product.date.start)\n const end = new Date(product.date.end)\n const diffTime = Math.abs(end - start)\n return total + product.price * (Math.ceil(diffTime / (1000 * 60 * 60 * 24)) + 1);\n } else {\n // Для обычных товаров умножаем на количество\n return total + product.price * (product.quantity || 1);\n }\n }, 0));\n })\n\n\n let cartTotalAmount = computed(() => {\n return Number(order.value?.positions.reduce((total, product) => {\n return total + product.quantity;\n }, 0));\n })\n\n // Функция установки нового статуса\n\tasync function setStatus (newStatus) {\n\t orders.state.current.status = newStatus\n\n\t await orders.actions.update(orders.state.current)\n\t} \n\n\n\tfunction getNextStatus(currentStatus) {\n\t const currentIndex = store.core.state.options.orders.statuses.findIndex(status => status.value === currentStatus);\n\n\t if (currentIndex !== -1 && currentIndex + 1 < statuses.length) {\n\t return store.core.state.options.orders.statuses[currentIndex + 1];\n\t }\n\t return null; // If next status doesn't exist\n\t}\n\n\tconst isActiveStatus = (index) => {\n\t return store.core.state.options.orders.statuses.slice(index).some(status => status.value === order.value.status);\n\t};\n\n async function changePaymentStatus() {\n if (selectedPayments.value.status && selectedPayments.value.type) {\n orders.state.current.payment = selectedPayments.value;\n\n await orders.actions.update(orders.state.current)\n } else {\n console.error('Payment status is void. Must handle somehow.');\n }\n\n\t\tclosePaymentPopup()\n }\n\n async function setNextStatus() {\n const nextStatus = getNextStatus(orders.state.current.status);\n\n if (nextStatus) {\n orders.state.current.status = nextStatus.value;\n \n // Обновляем позиции заказа из текущего состояния\n orders.state.current.positions = order.value.positions;\n\n await orders.actions.update(orders.state.current)\n } else {\n console.error('Next status is void. Must handle somehow.');\n }\n\n\t\tcloseStatusPopup()\n }\n\n async function cancelOrder() {\n \talert()\n\n orders.state.current.status = 'canceled';\n\n await orders.actions.update(orders.state.current)\n}\n\n\n async function confirmOrder() {\n \talert()\n\n orders.state.current.status = 'confirmed';\n\n await orders.actions.update(orders.state.current)\n\t}\n\n\tfunction calculateDeliveryTime(distance, date) {\n\t if (!distance) {\n\t return null;\n\t }\n\n\t const basePreparationTime = 10 * 60 * 1000; // Convert to milliseconds\n\t const travelTime = Math.ceil((15 + 5 + 3 * distance) / 5) * 5 * 60 * 1000;\n\n\t // Преобразование даты начала в миллисекунды и добавление времени подготовки и доставки\n\t const startTime = new Date(date).getTime();\n\t const estimatedDeliveryTime = new Date(startTime + basePreparationTime + travelTime);\n\n\t return estimatedDeliveryTime;\n\t}\n\n\n</script>\n\n<style lang=\"scss\" scoped>\n\t.blink {\n\t animation: blink-animation 1s ease infinite;\n\t}\n\n\t@keyframes blink-animation {\n\t 0%, 100% {\n\t opacity: 1;\n\t }\n\t 50% {\n\t opacity: 0.8;\n\t }\n\t}\n</style>"],"names":["auth.state","orders.actions","organizations.actions","orders.state","orders.getters"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2TC,UAAM,QAAQ,SAAQ;AAEtB,UAAM,EAAE,OAAM,IAAK,QAAO;AAC1B,UAAM,EAAE,eAAc,IAAK,gBAAe;AAE1C,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,UAAM,QAAQ,IAAI,IAAI;AACO,QAAI,IAAI;AACrC,UAAM,oBAAoB,IAAI,IAAI;AAElC,UAAM,WAAW,MAAM,KAAK,MAAM,QAAQ,OAAO;AAGhD,QAAI,MAAM,KAAK,YAAY,UACv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iBAAiB;AAEhD,cAAMF,QAAe,OAAOE,QAAa,OAAO;AAAA,MAClD,OAAO;AACL,gBAAQ,MAAM,8CAA8C;AAAA,MAC9D;AAEF,wBAAiB;AAAA,IACjB;AAEA,mBAAe,gBAAgB;AAC7B,YAAM,aAAa,cAAcA,QAAa,QAAQ,MAAM;AAE5D,UAAI,YAAY;AACdA,gBAAa,QAAQ,SAAS,WAAW;AAGzCA,gBAAa,QAAQ,YAAY,MAAM,MAAM;AAE7C,cAAMF,QAAe,OAAOE,QAAa,OAAO;AAAA,MAClD,OAAO;AACL,gBAAQ,MAAM,2CAA2C;AAAA,MAC3D;AAEF,uBAAgB;AAAA,IAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"OrderBackoffice.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderBackoffice.vue"],"sourcesContent":["<template>\n\t<div v-if=\"order && orderOrganization\" class=\"pd-thin bg-white\"> \n\n\t <div v-if=\"order\" class=\"mn-b-thin pos-relative w-100 bg-main radius-medium pd-medium\">\n\t \t<div class=\"mn-b-small flex-nowrap flex\">\n\t\t \t<p class=\"fw-medium p-regular\">\n\t\t \tOrder No: <span class=\"p-small t-transp\">#{{order._id}}</span>\n\t\t </p>\n\t\t\t</div>\n\n\t \t<div class=\"flex-nowrap flex gap-thin pos-relative \">\n\t\t <div v-for=\"(status, index) in statuses\" :key=\"index\" class=\"w-20\">\n\t\t <div\n\t\t \tclass=\"bg-white br-anim br-glow radius-extra h-1r w-100\"\n\t\t :class=\"\n\t\t\t\t\t { 'br-glow-anim': isActiveStatus(index) },\n\t\t\t\t\t { 't-transp': !isActiveStatus(index) },\n\t\t\t\t\t { 'blink': order.status === status.value && getNextStatus(order.status) }\n\t\t\t\t\t \"\n\t\t />\n\t\t <div \n\t\t \t:class=\"{ 't-transp': !isActiveStatus(index) }\"\n\t\t\t\t\t class=\"mn-t-thin p-small fw-medium uppercase\">{{ status.value }}</div>\n\t\t \t</div>\n\t\t\t </div>\n\t </div>\n\n \t<Popup \n title=\"Payment Status\" \n @close-popup=\"closePaymentPopup\" \n :isPopupOpen=\"isOpenPaymentPopup\"\n class=\"bg-light w-min-25r w-max-25r radius-medium pd-big\"\n >\n \t<Select \n v-model:select=\"selectedPayments.type\"\n :property=\"'value'\"\n label=\"Type\"\n :options=\"[\n {name: 'Cash', value: 'cash'}, \n {name: 'Card', value: 'card'}, \n {name: 'Bank Transfer', value: 'bank'},\n ]\"\n placeholder=\"Select type of payment\" \n size=\"small\"\n class=\"bg-white mn-b-thin pd-regular radius-small w-100\"\n />\n\n <Select \n v-model:select=\"selectedPayments.status\"\n :property=\"'value'\"\n label=\"Status\"\n :options=\"[\n {name: 'Unpaid', value: 'unpaid'}, \n {name: 'Paid', value: 'paid'}, \n {name: 'Refunded', value: 'refunded'},\n ]\"\n placeholder=\"Select status of payment\" \n size=\"small\"\n class=\"bg-white mn-b-small pd-regular radius-small w-100\"\n />\n\n\n <Button :submit=\"changePaymentStatus\" class=\"t-white w-100 bg-second\">\n\t\t\t\t<span>Change Status</span>\n\t\t\t</Button>\n\t \t</Popup>\n\n\t <Popup \n title=\"Change order status\" \n @close-popup=\"closeStatusPopup\" \n :isPopupOpen=\"isOpeStatusPopup\"\n class=\"bg-light w-min-30r w-max-30r radius-medium pd-big\"\n >\n\n\t\t\t<!-- Добавить выбор примерного времени -->\n\n \t<ul class=\"flex gap-thin flex-column mn-b-thin\">\n \t\t\t<CardOrderItem\n \t\t\t\tv-for=\"(product, index) in order.positions\" \n \t\t\t\t:key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n \t\t\t\t:editable=\"!order.status_history || order.status_history.length <= 1\" \n \t\t\t\t:productId=\"product._id\"\n \t\t\t\t:variantId=\"product.variant\"\n \t\t\t\t:images=\"product.images\"\n \t\t\t\t:name=\"product.name\"\n \t\t\t\t:quantity=\"product.quantity\"\n \t\t\t\t:unit=\"product.unit\"\n \t\t\t\t:dates=\"product.date\"\n \t\t\t\t:listing=\"product.listing\"\n \t\t\t\t:price=\"product.price\"\n \t\t\t\t:increase=\"() => orders.mutations.incrementItemQuantity(order, product._id, product.variant)\"\n\t :decrease=\"() => orders.mutations.decrementItemQuantity(order, product._id, product.variant)\"\n\t :remove=\"() => orders.mutations.removeProduct(order, product._id, product.variant)\"\n\t @updateRentDates=\"(productId, variantId, dates) => shopcart.actions.updateRentDates({ positions: order.positions, productId, variantId, dates })\"\n \t\t\t\tclass=\"bg-white radius-small pd-small\"\n \t\t\t/>\n </ul>\n \n <PriceTotal\n :totalPrice=\"cartTotalPrice\"\n :currency=\"returnCurrency()\"\n :showFees=\"store.core.state.options?.orders?.showFees\"\n :feesRate=\"store.core.state.options?.orders?.feesRate || 0\"\n :showVat=\"store.core.state.options?.orders?.showVat\"\n :vatRate=\"store.core.state.options?.orders?.vatRate || 0\"\n />\n\n \t<Button :submit=\"setNextStatus\" class=\"t-white w-100 bg-second\">\n\t\t\t\t<span>{{'Confirm Changing to ' + (getNextStatus(order.status)).label}}</span>\n\t\t\t</Button>\n\t \t</Popup>\n\n\n\t \n\t <div v-if=\"order\" class=\"gap-thin cols-2 mobile:cols-1\">\n\n\t <div class=\"w-100\">\n\n\n\t\t <CardOrganization \n\t\t \tv-if=\"orderOrganization[0]\"\n\t\t :organization=\"orderOrganization[0]\"\n\t\t :showRating=\"true\"\n\t\t :showFollowers=\"false\"\n\t\t :showProducts=\"false\"\n\t\t class=\"bg-light mn-b-thin w-100 o-hidden radius-medium pd-small \"\n\t\t />\n\n\n\t\t <div \n\t\t \tclass=\"mn-b-thin bg-light w-100 o-hidden radius-medium \"\n\t\t >\n\t\t \t<div class=\"pd-small flex-nowrap flex\">\n\t\t\t \t<div class=\"mn-r-auto\">\n\t\t\t\t \t<span class=\"d-block fw-medium p-regular mn-b-thin\">Order is</span>\n\t\t\t\t\t <span class=\" lh-[0.75] h2 d-block mn-b-small\">{{order.status}}</span>\n\t\t\t\t\t <p class=\"pd-thin radius-extra bg-black t-white w-max\">{{formatDate(order.updatedAt, {language: locale })}}</p>\n\t\t\t\t\t </div>\n\t\t\t\t\t <!-- <div class=\"t-right\">\n\t\t\t\t\t \tCancel order<br>\n\t\t\t\t\t \tExchange item\n\t\t\t\t\t \t<hr class=\"mn-b-thin mn-t-thin\">\n\t\t\t\t\t \tFor Delivery Queries Contact Us\n\t\t\t\t\t \t\n\t\t\t\t\t </div> -->\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div v-if=\"order.customer.target?.number\" class=\"pd-small flex flex-nowrap flex-v-center br-t-1px br-black-transp-10\">\n\t\t\t \t<p class=\"w-100 fw-medium p-regular\">\n\t\t\t \tPhone\n\t\t\t </p>\n\n\t\t\t <p class=\"w-100 t-right \">\n\t\t\t \t{{order.customer.target?.number || 'Not specified'}}\n\t\t\t </p>\n\t\t\t </div>\n\n\t\t\t <div class=\"pd-small flex flex-nowrap flex-v-center br-t-1px br-black-transp-10\">\n\t\t\t \t<p class=\"fw-medium p-regular\">\n\t\t\t \tAddress\n\t\t\t </p>\n\n\t\t\t <p class=\"w-100 t-right\">\n\t\t\t\t\t\t\t{{order.delivery.address || (order.delivery.spot[0]?.profile.name + (order.delivery.spot[0]?.address ? ', ' + order.delivery.spot[0].address : '')) || 'Not specified'}}\n\t\t\t </p>\n\n\n\n\t\t\t </div>\n\n\n\t\t\t <div v-if=\"order.comment\" class=\"pos-relative radius-thin mn-t-zero mn-thin bg-fifth-transp-10 pd-small\">\n\t\t\t <p class=\"mn-b-thin t-transp uppercase p-small fw-medium\">Comment</p>\n\t\t\t <p>{{order.comment}}</p>\n\t\t\t </div>\n\n\t\t\t <div class=\"pd-small flex flex-nowrap flex-v-center br-t-1px br-black-transp-10\">\n\t\t\t \t<p class=\"fw-medium p-regular\">\n\t\t\t \tDelivery\n\t\t\t </p>\n\n\t\t\t <p class=\"w-100 t-right \">\n\t\t\t {{order.delivery.type ? order.delivery.type : 'Not specified'}} \n\t\t\t </p>\n\t\t\t </div>\n\n\t\t\t <div class=\"pd-small flex flex-nowrap flex-v-center br-t-1px br-black-transp-10\">\n\t\t\t \t<p class=\"mn-r-auto fw-medium p-regular\">\n\t\t\t \tPayment\n\t\t\t </p>\n\n\n\t\t\t <p class=\"w-max t-right\">\n\t\t\t {{order.payment.type ? order.payment.type : 'Not specified'}} \n\t\t\t </p>\n\n\t\t\t <p @click=\"route.meta.context !== 'user' && route.meta.context !== 'root' ? openPaymentPopup() : console.log('Context:', route.meta.context)\" class=\"w-max pd-thin radius-small bg-second t-white mn-l-thin cursor-pointer hover:bg-black t-right\">\n\t\t\t {{order.payment.status ? order.payment.status : 'Unpaid'}} \n\t\t\t </p>\n\t\t\t </div>\n\n\n\t\t\t\t</div>\n\n\t\t\t\t<div v-if=\"route.meta.context !== 'user' && route.meta.context !== 'root'\" class=\"o-y-scroll bg-light pd-thin mn-b-thin pd-thin radius-medium flex-nowrap flex\">\n\t\t \t\t<div class=\"flex-child-default mn-r-small w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-light-transp-20\">\n\t\t \t\t\t<IconTime class=\"i-medium t-transp\" fill=\"rgb(var(--black)\" />\n\t\t <p class=\"fw-medium mn-r-auto\"><span class=\"p-small t-transp\">Estimated Reaction</span><br>{{formatDate(order.deadline, { language: locale })}}</p>\n\t\t\t \t</div>\n\t\t\t \t<button v-if=\"getNextStatus(order.status)\" @click=\"openStatusPopup\" class=\"flex-child-default mn-l-auto bg-black t-white button\"> \n\t\t\t\t Mark as {{ (getNextStatus(order.status)).label }} \n\t\t\t\t </button>\n\t\t \t</div>\n\n\t\t\t<div class=\"bg-light radius-medium pd-medium mn-r-bold w-100\">\n\t\t <h3 class=\"mn-b-small\">Chat With Us</h3>\n\n\t\t <ChatPage\n\t\t \t:username=\"['Order', 'UserOrder'].includes(route.name) ? (order.user?.name || 'User') : 'Support'\"\n\t\t \t:user=\"auth.state.user._id\"\n\t\t \t:chatID=\"route.params.order\"\n\t\t \tclass=\"radius-semi bs-black bg-light o-hidden\"\n\t\t />\n\n\t </div>\n\t \t<!-- <StatusHistory \n\t \t\tv-if=\"orders.state.current.status_history\"\n\t \t\t:statuses=\"statuses\"\n\t \t\t:statusHistory=\"orders.state.current.status_history\"\n\t \t\t:statusCurrent=\"orders.state.current.status\"\n\t \t\t:edit=\"route.name === 'Order Edit'\"\n\t \t/> -->\n\n\t <!-- \t<button \n\t \t@click=\"requestPayment(order)\"\n\t \tv-if=\"\n\t \t\torder.status === 'Подтвержден' \n\t \t\t&& order.payment.type === 'Online'\n\t \t\t&& payment.Status !== 'CONFIRMED'\n\t \t\t&& payment.Status !== 'REFUNDED'\n\t \t\" \n\t \tclass='w-100 button'>Оплатить заказ</button> -->\n\t \t<span class=\"t-transp\" v-if=\"payment && payment.Status === 'CONFIRMED'\">Paid</span> \n\t </div> \n\n\t <div class=\"bg-light radius-medium pd-medium w-100\">\n\t \t\t<h3 class=\"mn-b-small\">Order Summary</h3>\n\n\t \t\t<ul class=\"flex gap-thin flex-column mn-b-thin\">\n\t \t\t\t<CardOrderItem\n\t \t\t\t\tv-for=\"(product, index) in order.positions\" \n\t \t\t\t\t:key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n\t \t\t\t\t:editable=\"false\" \n\t \t\t\t\t:productId=\"product._id\"\n\t \t\t\t\t:variantId=\"product.variant\"\n\t \t\t\t\t:images=\"product.images\"\n\t \t\t\t\t:name=\"product.name\"\n\t \t\t\t\t:quantity=\"product.quantity\"\n\t \t\t\t\t:unit=\"product.unit\"\n\t \t\t\t\t:dates=\"product.date\"\n\t \t\t\t\t:listing=\"product.listing\"\n\t \t\t\t\t:price=\"product.price\"\n\t \t\t\t\tclass=\"bg-white radius-small pd-small\"\n\t \t\t\t/>\n\t </ul>\n\t \n\t <PriceTotal\n :totalPrice=\"cartTotalPrice\"\n :deliveryRate=\"deliveryCost\"\n :currency=\"returnCurrency()\"\n :showFees=\"store.core.state.options?.orders?.showFees\"\n :feesRate=\"store.core.state.options?.orders?.feesRate || 0\"\n :showVat=\"store.core.state.options?.orders?.showVat\"\n :vatRate=\"store.core.state.options?.orders?.vatRate || 0\"\n\t\t\t\t :showDeliveryFee=\"store.core.state.options?.orders.showDeliveryFee\"\n\n />\n \t</div>\n\n\t \n\t </div>\n\t</div>\t\t\n\n</template>\n\n\n<script setup=\"props\">\n\timport { computed, ref, onMounted } from 'vue'\n\timport { useRouter, useRoute } from 'vue-router'\n\n\timport Button from '@martyrs/src/components/Button/Button.vue'\n\timport Select from '@martyrs/src/components/Select/Select.vue'\n\timport Popup from \"@martyrs/src/components/Popup/Popup.vue\";\n\n\timport IconTime from '@martyrs/src/modules/icons/entities/IconTime.vue'\n\n\t// Block\n\timport CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'\n\timport CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport ChatPage from '@martyrs/src/modules/chats/components/pages/ChatPage.vue';\n\n\timport StatusHistory from '@martyrs/src/modules/orders/components/blocks/StatusHistory.vue'\n\timport PriceTotal from '@martyrs/src/modules/orders/components/elements/PriceTotal.vue';\n\timport FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'\n\n\timport { useStore } from '@martyrs/src/modules/core/views/store/core.store.js'\n\timport * as auth from '@martyrs/src/modules/auth/views/store/auth.js'\n\timport * as orders \tfrom '@martyrs/src/modules/orders/store/orders.js'\n\timport * as products \tfrom '@martyrs/src/modules/products/store/products.js'\n\timport * as organizations \tfrom '@martyrs/src/modules/organizations/store/organizations.js'\n\n\timport { useI18n } from 'vue-i18n';\n\timport { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\n\tconst store = useStore()\n\t\n\tconst { locale } = useI18n();\n\tconst { returnCurrency } = useGlobalMixins();\n\n\tconst router = useRouter()\n\tconst route = useRoute()\n\n\tconst order = ref(null)\n\tconst productsOrganization = ref(null)\n\tconst orderOrganization = ref(null)\n\n\tconst statuses = store.core.state.options?.orders?.statuses || []\n\tconst statusLabels = ['Created', 'Confirmed', 'Preparing', 'In use', 'Finished'];\n\n if (route.meta.context === 'user' && \n auth.state.user && \n route.params._id !== auth.state.user?._id && \n !auth.state.access?.roles?.includes('ROLE_MODERATOR') && \n !auth.state.access?.roles?.includes('ROLE_ADMIN')) {\n router.push('/401');\n }\n\n\tconst isOpeStatusPopup = ref(false);\n\tconst selectedMember = ref(null);\n\n\tfunction openStatusPopup(member) {\n\t isOpeStatusPopup.value = true;\n\t if (typeof member === \"number\") selectedMember.value = member;\n\t}\n\n\tfunction closeStatusPopup() {\n\t isOpeStatusPopup.value = false;\n\t selectedMember.value = null;\n\t}\n\n\tconst isOpenPaymentPopup = ref(false);\n\n\tconst selectedPayments = ref({\n\t\ttype: null,\n\t\tstatus: null\n\t});\n\n\tfunction openPaymentPopup() {\n\t selectedPayments.value.type = order.value.payment.type\n\t selectedPayments.value.status = order.value.payment.status\n\n\t isOpenPaymentPopup.value = true;\n\t}\n\n\tfunction closePaymentPopup() {\n\t isOpenPaymentPopup.value = false;\n\t}\n\n\tonMounted(async()=>{\n\t\torder.value = await orders.actions.read({_id: route.params.order})\n\t\torder.value = order.value[0]\n\n\t orderOrganization.value = await organizations.actions.read({\n\t _id: order.value?.owner.target._id,\n\t location: store.core.state.position?.location,\n\t lookup: ['spots']\n\t });\n\n\t})\n\n\nconst deliveryCost = computed(() => {\n const type = orders.state.current.delivery.type\n const distance = orderOrganization.value[0]?.distance || 0\n const config = store.core.state.options?.orders?.delivery_formula || {}\n\n return orders.getters.getDeliveryPrice(type, distance, config)\n})\n\n\tlet cartTotalPrice = computed(() => {\n return Number(order.value?.positions.reduce((total, product) => {\n // Проверяем тип листинга\n if (product.listing === 'rent') {\n const start = new Date(product.date.start)\n const end = new Date(product.date.end)\n const diffTime = Math.abs(end - start)\n return total + product.price * (Math.ceil(diffTime / (1000 * 60 * 60 * 24)) + 1);\n } else {\n // Для обычных товаров умножаем на количество\n return total + product.price * (product.quantity || 1);\n }\n }, 0));\n })\n\n\n let cartTotalAmount = computed(() => {\n return Number(order.value?.positions.reduce((total, product) => {\n return total + product.quantity;\n }, 0));\n })\n\n // Функция установки нового статуса\n\tasync function setStatus (newStatus) {\n\t orders.state.current.status = newStatus\n\n\t await orders.actions.update(orders.state.current)\n\t} \n\n\n\tfunction getNextStatus(currentStatus) {\n\t const currentIndex = statuses.findIndex(status => status.value === currentStatus);\n\n\t if (currentIndex !== -1 && currentIndex + 1 < statuses.length) {\n\t return statuses[currentIndex + 1];\n\t }\n\t return null; // If next status doesn't exist\n\t}\n\n\tconst isActiveStatus = (index) => {\n\t return statuses.slice(index).some(status => status.value === order.value?.status);\n\t};\n\n async function changePaymentStatus() {\n if (selectedPayments.value.status && selectedPayments.value.type) {\n orders.state.current.payment = selectedPayments.value;\n\n await orders.actions.update(orders.state.current)\n } else {\n console.error('Payment status is void. Must handle somehow.');\n }\n\n\t\tclosePaymentPopup()\n }\n\n async function setNextStatus() {\n const nextStatus = getNextStatus(orders.state.current.status);\n\n if (nextStatus) {\n orders.state.current.status = nextStatus.value;\n \n // Обновляем позиции заказа из текущего состояния\n orders.state.current.positions = order.value.positions;\n\n await orders.actions.update(orders.state.current)\n } else {\n console.error('Next status is void. Must handle somehow.');\n }\n\n\t\tcloseStatusPopup()\n }\n\n async function cancelOrder() {\n \talert()\n\n orders.state.current.status = 'canceled';\n\n await orders.actions.update(orders.state.current)\n}\n\n\n async function confirmOrder() {\n \talert()\n\n orders.state.current.status = 'confirmed';\n\n await orders.actions.update(orders.state.current)\n\t}\n\n\tfunction calculateDeliveryTime(distance, date) {\n\t if (!distance) {\n\t return null;\n\t }\n\n\t const basePreparationTime = 10 * 60 * 1000; // Convert to milliseconds\n\t const travelTime = Math.ceil((15 + 5 + 3 * distance) / 5) * 5 * 60 * 1000;\n\n\t // Преобразование даты начала в миллисекунды и добавление времени подготовки и доставки\n\t const startTime = new Date(date).getTime();\n\t const estimatedDeliveryTime = new Date(startTime + basePreparationTime + travelTime);\n\n\t return estimatedDeliveryTime;\n\t}\n\n\n</script>\n\n<style lang=\"scss\" scoped>\n\t.blink {\n\t animation: blink-animation 1s ease infinite;\n\t}\n\n\t@keyframes blink-animation {\n\t 0%, 100% {\n\t opacity: 1;\n\t }\n\t 50% {\n\t opacity: 0.8;\n\t }\n\t}\n</style>"],"names":["auth.state","orders.actions","organizations.actions","orders.state","orders.getters"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2TC,UAAM,QAAQ,SAAQ;AAEtB,UAAM,EAAE,OAAM,IAAK,QAAO;AAC1B,UAAM,EAAE,eAAc,IAAK,gBAAe;AAE1C,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,UAAM,QAAQ,IAAI,IAAI;AACO,QAAI,IAAI;AACrC,UAAM,oBAAoB,IAAI,IAAI;AAElC,UAAM,WAAW,MAAM,KAAK,MAAM,SAAS,QAAQ,YAAY,CAAA;AAG9D,QAAI,MAAM,KAAK,YAAY,UACvBA,MAAW,QACX,MAAM,OAAO,QAAQA,MAAW,MAAM,OACtC,CAACA,MAAW,QAAQ,OAAO,SAAS,gBAAgB,KACpD,CAACA,MAAW,QAAQ,OAAO,SAAS,YAAY,GAAG;AACrD,aAAO,KAAK,MAAM;AAAA,IACpB;AAED,UAAM,mBAAmB,IAAI,KAAK;AAClC,UAAM,iBAAiB,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,uBAAiB,QAAQ;AACzB,UAAI,OAAO,WAAW,SAAU,gBAAe,QAAQ;AAAA,IACzD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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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.vue2.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentInstance, computed, ref, onMounted, createElementBlock, openBlock, createVNode, createBlock, createCommentVNode, withCtx, createElementVNode, createTextVNode, unref, Fragment, renderList, toDisplayString } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
5
5
|
import _sfc_main$3 from "../../../../components/Tab/Tab.vue.js";
|
|
6
6
|
import _sfc_main$4 from "../../../../components/Popup/Popup.vue.js";
|
|
7
7
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|