@ozdao/martyrs 0.2.582 → 0.2.583
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/martyrs/src/components/Button/Button.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
- package/dist/martyrs/src/components/Loader/{Loader.vue.js → Loader.vue2.js} +2 -2
- package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +1 -0
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/martyrs/src/components/Media/Media.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
- package/dist/martyrs/src/components/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/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue2.js.map +1 -0
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/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 +8 -14
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +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.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/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/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/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/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/{Filters.vue.js → Filters.vue2.js} +2 -2
- 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/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/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/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- 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/Playlist.vue.js +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/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/FormSelectCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +6 -6
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +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/FormDelivery.vue.js +2 -2
- 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/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.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/Organization.vue.js +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.js +89 -40
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +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.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.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/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/Rents.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/Spot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/style.css +72 -77
- package/package.json +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/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/organizations/components/pages/OrganizationEdit.vue +42 -11
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.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/components/Tab/Tab.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,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, unref, Fragment, renderList, createBlock, withCtx, createVNode, normalizeClass } from "vue";
|
|
2
|
-
import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.
|
|
2
|
+
import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue2.js";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
4
|
import IconChevronBottom from "../../../icons/navigation/IconChevronBottom.vue.js";
|
|
5
5
|
const _hoisted_1 = { class: "" };
|
|
@@ -2,7 +2,7 @@ import { ref, watch, createElementBlock, openBlock, createElementVNode, unref, c
|
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
4
|
import _sfc_main$2 from "../../../../../components/Feed/Feed.vue.js";
|
|
5
|
-
import Filters from "../../../../core/views/components/sections/Filters.
|
|
5
|
+
import Filters from "../../../../core/views/components/sections/Filters.vue2.js";
|
|
6
6
|
import _sfc_main$1 from "../../../../core/views/components/sections/filters/FiltersGroup.vue.js";
|
|
7
7
|
import Field from "../../../../../components/Field/Field.vue.js";
|
|
8
8
|
import _sfc_main$3 from "../../../../organizations/components/blocks/CardOrganization.vue.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, onMounted, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, createTextVNode, Transition, withCtx, Fragment, renderList, createBlock, createCommentVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
|
-
import Loader from "../../../../../components/Loader/Loader.
|
|
2
|
+
import Loader from "../../../../../components/Loader/Loader.vue2.js";
|
|
3
3
|
import { useRouter } from "vue-router";
|
|
4
4
|
import { useI18n } from "vue-i18n";
|
|
5
5
|
import { actions as actions$1 } from "../../../../products/store/categories.js";
|
|
@@ -6,7 +6,7 @@ import _sfc_main$4 from "../../../../components/Button/Button.vue.js";
|
|
|
6
6
|
import _sfc_main$3 from "../../../../components/Checkbox/Checkbox.vue.js";
|
|
7
7
|
import Select from "../../../../components/Select/Select.vue2.js";
|
|
8
8
|
import UploadImage from "../../../../components/UploadImage/UploadImage.vue.js";
|
|
9
|
-
/* empty css
|
|
9
|
+
/* empty css */
|
|
10
10
|
import BlockMultiselect from "../../../core/views/components/blocks/BlockMultiselect.vue.js";
|
|
11
11
|
import _sfc_main$2 from "../../../icons/navigation/IconCross.vue.js";
|
|
12
12
|
import { actions as actions$1 } from "../../store/artists.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, onMounted, resolveComponent, createElementBlock, openBlock, createCommentVNode, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createBlock, withCtx, createTextVNode } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
|
-
import Loader from "../../../../components/Loader/Loader.
|
|
3
|
+
import Loader from "../../../../components/Loader/Loader.vue2.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import Media from "../../../../components/Media/Media.vue.js";
|
|
6
6
|
/* empty css */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, computed, onMounted, createElementBlock, openBlock, createCommentVNode, createElementVNode, createVNode, unref, withCtx, createTextVNode, normalizeStyle, normalizeClass, toDisplayString, Fragment, renderList, createBlock } from "vue";
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
3
|
import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
|
|
4
|
-
/* empty css
|
|
4
|
+
/* empty css */
|
|
5
5
|
import _sfc_main$2 from "../cards/TrackListCard.vue.js";
|
|
6
6
|
import { state, actions } from "../../store/artists.js";
|
|
7
7
|
import { state as state$1 } from "../../../auth/views/store/auth.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, computed, onMounted, resolveComponent, createElementBlock, openBlock, createCommentVNode, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createBlock, withCtx, createTextVNode } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import _sfc_main$9 from "../../../../components/Button/Button.vue.js";
|
|
4
|
-
/* empty css
|
|
4
|
+
/* empty css */
|
|
5
5
|
import Media from "../../../../components/Media/Media.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import _sfc_main$7 from "../../../../components/Feed/Feed.vue.js";
|
|
@@ -6,7 +6,7 @@ import AlbumCard from "../cards/AlbumCard.vue.js";
|
|
|
6
6
|
import PlaylistCard from "../cards/PlaylistCard.vue.js";
|
|
7
7
|
import ArtistCard from "../cards/ArtistCard.vue.js";
|
|
8
8
|
import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
|
|
9
|
-
import Loader from "../../../../components/Loader/Loader.
|
|
9
|
+
import Loader from "../../../../components/Loader/Loader.vue2.js";
|
|
10
10
|
import { state, actions } from "../../store/search.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, ref, onMounted, resolveComponent, createElementBlock, openBlock, createCommentVNode, createBlock, createVNode, createElementVNode, withCtx, toDisplayString, Fragment, renderList } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import _sfc_main$5 from "../../../../components/Button/Button.vue.js";
|
|
4
|
-
import Loader from "../../../../components/Loader/Loader.
|
|
4
|
+
import Loader from "../../../../components/Loader/Loader.vue2.js";
|
|
5
5
|
import Media from "../../../../components/Media/Media.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import _sfc_main$c from "../../../../components/Popup/Popup.vue.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createVNode } from "vue";
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import _sfc_main$1 from "../forms/TrackForm.vue.js";
|
|
6
6
|
const _hoisted_1 = { class: "track-create-page" };
|
|
@@ -117,14 +117,14 @@ const _sfc_main = {
|
|
|
117
117
|
}, " Mark all read ")) : createCommentVNode("", true),
|
|
118
118
|
createVNode(_component_router_link, {
|
|
119
119
|
class: "w-100 bg-black t-white radius-small button",
|
|
120
|
-
to:
|
|
120
|
+
to: `/users/${state.user?._id}/notifications`,
|
|
121
121
|
onClick: closeNotifications
|
|
122
122
|
}, {
|
|
123
123
|
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
124
124
|
createTextVNode(" View all ")
|
|
125
125
|
])),
|
|
126
126
|
_: 1
|
|
127
|
-
})
|
|
127
|
+
}, 8, ["to"])
|
|
128
128
|
])
|
|
129
129
|
]))
|
|
130
130
|
])
|
|
@@ -135,7 +135,7 @@ const _sfc_main = {
|
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
|
-
const NotificationBadge = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
138
|
+
const NotificationBadge = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bea4263c"]]);
|
|
139
139
|
export {
|
|
140
140
|
NotificationBadge as default
|
|
141
141
|
};
|
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-medium 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 flex-center\"\n >\n <span>{{ unreadCount > 99 ? '99+' : unreadCount }}</span>\n </div>\n </button>\n \n <Popup\n title=\"Notifications\"\n @close-popup=\"closeNotifications\"\n :isPopupOpen=\"isOpen\"\n align=\"center right\"\n class=\"bg-white h-min-100 w-100 w-max-30r pd-medium\"\n >\n <div class=\"cols-1 gap-thin o-y-scroll\">\n <div v-if=\"loading\" class=\"notifications-loading\">\n Loading...\n </div>\n \n <div v-else-if=\"notifications.length === 0\" class=\"notifications-empty\">\n No notifications\n </div>\n \n <div v-else class=\"flex-column flex gap-thin\">\n <notification-item \n v-for=\"notification in recentNotifications\" \n :key=\"notification._id\" \n :notification=\"notification\"\n @click=\"handleNotificationClick(notification)\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <button \n v-if=\"unreadCount > 0\"\n class=\"w-100 bg-second t-white radius-small button\" \n @click=\"markAllAsRead\"\n >\n Mark all read\n </button>\n\n <router-link class=\"w-100 bg-black t-white radius-small button\" to=\"/notifications
|
|
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-medium 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 flex-center\"\n >\n <span>{{ unreadCount > 99 ? '99+' : unreadCount }}</span>\n </div>\n </button>\n \n <Popup\n title=\"Notifications\"\n @close-popup=\"closeNotifications\"\n :isPopupOpen=\"isOpen\"\n align=\"center right\"\n class=\"bg-white h-min-100 w-100 w-max-30r pd-medium\"\n >\n <div class=\"cols-1 gap-thin o-y-scroll\">\n <div v-if=\"loading\" class=\"notifications-loading\">\n Loading...\n </div>\n \n <div v-else-if=\"notifications.length === 0\" class=\"notifications-empty\">\n No notifications\n </div>\n \n <div v-else class=\"flex-column flex gap-thin\">\n <notification-item \n v-for=\"notification in recentNotifications\" \n :key=\"notification._id\" \n :notification=\"notification\"\n @click=\"handleNotificationClick(notification)\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <button \n v-if=\"unreadCount > 0\"\n class=\"w-100 bg-second t-white radius-small button\" \n @click=\"markAllAsRead\"\n >\n Mark all read\n </button>\n\n <router-link class=\"w-100 bg-black t-white radius-small button\" :to=\"`/users/${auth.state.user?._id}/notifications`\" @click=\"closeNotifications\">\n View all \n </router-link>\n </div>\n\n </div>\n\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, inject } from 'vue';\nimport { useRouter } from 'vue-router';\n\nimport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\nimport NotificationItem from '../blocks/NotificationItem.vue';\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\nimport IconBell from '@martyrs/src/modules/icons/entities/IconBell.vue';\n\nconst props = defineProps({\n maxNotifications: {\n type: Number,\n default: 10\n },\n fill: {\n type: String,\n default: 'rgb(var(--white))'\n }\n});\n\n// Get router and notification functionality\nconst router = useRouter();\n\n// Check if notifications module is loaded, provide fallback if not\nconst useNotifications = inject('useNotifications', () => ({\n notifications: ref([]),\n unreadCount: ref(0),\n loading: ref(false),\n markAllAsRead: () => {},\n getNotifications: () => {}\n}));\n\nconst { notifications, unreadCount, loading, markAllAsRead, getNotifications } = 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 closeNotifications = () => {\n isOpen.value = false;\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// Lifecycle hooks\nonMounted(() => {\n // Load notifications when component mounts\n const userId = auth.state.user._id;\n if (userId) {\n getNotifications(userId);\n }\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\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\n\n.notifications-loading,\n.notifications-empty {\n padding: 24px;\n text-align: center;\n color: rgb(var(--texfw-light));\n}\n</style>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,UAAM,QAAQ;AAYC,cAAS;AAGxB,UAAM,mBAAmB,OAAO,oBAAoB,OAAO;AAAA,MACzD,eAAe,IAAI,EAAE;AAAA,MACrB,aAAa,IAAI,CAAC;AAAA,MAClB,SAAS,IAAI,KAAK;AAAA,MAClB,eAAe,MAAM;AAAA,MAAC;AAAA,MACtB,kBAAkB,MAAM;AAAA,MAAC;AAAA,IAC3B,EAAE;AAEF,UAAM,EAAE,eAAe,aAAa,SAAS,eAAe,iBAAgB,IAAK,iBAAgB;AAGjG,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,qBAAqB,MAAM;AAC/B,aAAO,QAAQ;AAAA,IACjB;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,MACH;AAAA,IACF;AAGA,cAAU,MAAM;AAEd,YAAM,SAASA,MAAW,KAAK;AAC/B,UAAI,QAAQ;AACV,yBAAiB,MAAM;AAAA,MACzB;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject, reactive, ref, computed, onMounted, createElementBlock, openBlock, createElementVNode, unref, createVNode, Fragment, renderList, toDisplayString, createBlock, createCommentVNode, withCtx, createTextVNode } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Checkbox/Checkbox.vue.js";
|
|
3
3
|
import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
|
|
4
|
-
import Loader from "../../../../components/Loader/Loader.
|
|
4
|
+
import Loader from "../../../../components/Loader/Loader.vue2.js";
|
|
5
5
|
const _hoisted_1 = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "pd-large t-center t-transp"
|
|
@@ -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,EAAE,mBAAmB,SAAS,EAAE,KAAK,WAAW,OAAO,QAAQ;AAAA,IACxE;AAEA,UAAM,aAAa,SAAS,MAAM;AAChC,YAAM,cAAc,WAAW,MAAM,SAAS;AAC9C,YAAM,cAAc,WAAW,MAAM,SAAS;AAE9C,cAAO,MAAM,OAAO,YAAW,GAAE;AAAA,QAC/B,KAAK;AACH,iBAAO,YAAY,WAAW;AAAA,QAChC,KAAK;AACH,iBAAO,cAAc,WAAW;AAAA,QAClC,KAAK;AAAA,QACL,KAAK;AACH,cAAI,MAAM,WAAW,QAAQ;AAC3B,kBAAM,cAAc,IAAI,KAAK,MAAM,UAAU,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,GAAG;AACjF,mBAAO,SAAS,WAAW,WAAW,CAAC;AAAA,UACzC;AACA,iBAAO,gBAAgB,WAAW;AAAA,QACpC,KAAK;AACH,iBAAO,aAAa,WAAW;AAAA,QACjC,KAAK;AACH,iBAAO,aAAa,WAAW;AAAA,QACjC;AAEA,cAAI,MAAM,WAAW,QAAQ;AAC3B,kBAAM,eAAe,MAAM,UAAU,MAAM,UAAU,SAAS,CAAC;AAC/D,kBAAM,iBAAiB,cAAc,MAAM;AAE3C,gBAAI,gBAAgB;AAClB,oBAAM,cAAc,IAAI,KAAK,cAAc;AAC3C,oBAAM,MAAM,oBAAI,KAAI;AACpB,oBAAM,WAAW,KAAK,IAAI,IAAI,YAAY,YAAY,SAAS;AAC/D,oBAAM,WAAW,KAAK,KAAK,YAAY,MAAO,KAAK,KAAK,GAAG;AAE3D,kBAAI,WAAW,KAAK,MAAM,WAAW,cAAc,MAAM,WAAW,YAAY;AAC9E,uBAAO,SAAS,QAAQ,OAAO,WAAW,IAAI,MAAM,EAAE;AAAA,cACxD;AAAA,YACF;AAAA,UACF;AACA,iBAAO,YAAY,WAAW;AAAA,MAElC;AAAA,IACA,CAAC;AAGD,UAAM,aAAa,SAAS,MAAM;AAChC,UAAI,MAAM,WAAW,eAAe,MAAM,WAAW,SAAS;AAE5D,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[statusKey.value]?.dot || 'bg-main';\n});\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,UAAM,EAAE,OAAM,IAAK,QAAO;AAC1B,UAAM,EAAE,aAAa,WAAU,IAAK,gBAAe;AAEnD,UAAM,QAAQ;AASd,UAAM,gBAAgB,CAAC,OAAO;AAC5B,UAAI,CAAC,GAAI,QAAO;AAChB,aAAO,IAAI,GAAG,MAAM,GAAG,CAAC,EAAE,YAAW,CAAE,IAAI,GAAG,MAAM,EAAE,EAAE,YAAW,CAAE,KAAI,oBAAI,KAAI,GAAG,YAAW,CAAE;AAAA,IACnG;AAEA,UAAM,eAAe;AAAA,MACnB,aAAa,EAAE,OAAO,aAAa,OAAO,yBAAyB,KAAK,WAAU;AAAA,MAClF,YAAY,EAAE,OAAO,aAAa,OAAO,yBAAyB,KAAK,WAAU;AAAA,MACjF,cAAc,EAAE,OAAO,cAAc,OAAO,uBAAuB,KAAK,UAAS;AAAA,MACjF,WAAW,EAAE,OAAO,cAAc,OAAO,uBAAuB,KAAK,UAAS;AAAA,MAC9E,aAAa,EAAE,OAAO,aAAa,OAAO,uBAAuB,KAAK,UAAS;AAAA,MAC/E,WAAW,EAAE,OAAO,WAAW,OAAO,2BAA2B,KAAK,YAAW;AAAA,MACjF,aAAa,EAAE,OAAO,aAAa,OAAO,2BAA2B,KAAK,YAAW;AAAA,MACrF,aAAa,EAAE,OAAO,aAAa,OAAO,mBAAmB,KAAK,UAAS;AAAA,MAC3E,YAAY,EAAE,OAAO,aAAa,OAAO,mBAAmB,KAAK,UAAS;AAAA,MAC1E,YAAY,EAAE,OAAO,YAAY,OAAO,2BAA2B,KAAK,YAAW;AAAA,IACrF;AAEA,UAAM,YAAY,SAAS,MAAM,MAAM,QAAQ,YAAW,KAAM,SAAS;AAEzE,UAAM,cAAc,SAAS,MAAM;AACjC,aAAO,aAAa,UAAU,KAAK,GAAG,SAAS;AAAA,IACjD,CAAC;AAED,UAAM,gBAAgB,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,7 +1,7 @@
|
|
|
1
1
|
import { useModel, ref, createElementBlock, openBlock, Fragment, createVNode, withCtx, createBlock, unref, renderList } from "vue";
|
|
2
2
|
import { useRoute } from "vue-router";
|
|
3
3
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
4
|
-
/* empty css
|
|
4
|
+
/* empty css */
|
|
5
5
|
import _sfc_main$3 from "../../../icons/navigation/IconCross.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import _sfc_main$6 from "../../../../components/Popup/Popup.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
|
};
|