@ozdao/martyrs 0.2.428 → 0.2.430
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/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/{globals.logger-Deb_8o7C.mjs → globals.cache-BT6q3vOf.mjs} +0 -33
- package/dist/{globals.logger-BuG0pN80.js → globals.cache-CwWvNGFQ.js} +0 -33
- package/dist/globals.logger-BdjooLaD.js +34 -0
- package/dist/globals.logger-DusiFsxN.mjs +35 -0
- package/dist/martyrs/src/modules/chats/components/pages/ChatPage.vue.cjs +13 -3
- package/dist/martyrs/src/modules/chats/components/pages/ChatPage.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/components/pages/ChatPage.vue.js +14 -4
- package/dist/martyrs/src/modules/chats/components/pages/ChatPage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs +24 -6
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js +25 -7
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs +7 -8
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.js +7 -8
- package/dist/martyrs/src/modules/chats/store/chat.store.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +6 -8
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +6 -8
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +11 -8
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +11 -8
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +5 -5
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +5 -5
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +17 -9
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +17 -9
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.cjs +16 -4
- package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.js +16 -4
- package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs +7 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +7 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.cjs +112 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +112 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +18 -12
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +18 -12
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +200 -92
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +213 -105
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +9 -12
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +10 -13
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +14 -6
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +23 -15
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +16 -99
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +16 -99
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +99 -99
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +102 -102
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +14 -8
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +15 -9
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/orders.cjs +51 -0
- package/dist/martyrs/src/modules/orders/store/orders.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/orders.js +51 -0
- package/dist/martyrs/src/modules/orders/store/orders.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +59 -56
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +63 -60
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/store/organizations.cjs +0 -2
- package/dist/martyrs/src/modules/organizations/store/organizations.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/store/organizations.js +1 -3
- package/dist/martyrs/src/modules/organizations/store/organizations.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +4 -3
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +5 -4
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +15 -12
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +15 -12
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/store/spots.cjs +2 -2
- package/dist/martyrs/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/store/spots.js +2 -2
- package/dist/martyrs/src/modules/spots/store/spots.js.map +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/orders.server.js +11 -4
- package/dist/orders.server.mjs +10 -3
- package/dist/organizations.server.js +33 -30
- package/dist/organizations.server.mjs +33 -30
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/{queryProcessor-CCmHM0yi.mjs → queryProcessor-CWnMIe2U.mjs} +4 -1
- package/dist/{queryProcessor-CwQakZkT.js → queryProcessor-D6GuKfTV.js} +4 -1
- package/dist/rents.server.js +4 -3
- package/dist/rents.server.mjs +3 -2
- package/dist/spots.server.js +41 -12
- package/dist/spots.server.mjs +41 -12
- package/dist/style.css +57 -65
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/package.json +1 -1
- package/src/modules/chats/components/pages/ChatPage.vue +18 -23
- package/src/modules/chats/components/sections/ChatWindow.vue +55 -38
- package/src/modules/chats/store/chat.store.js +20 -21
- package/src/modules/globals/controllers/utils/queryProcessor.js +2 -1
- package/src/modules/globals/views/classes/globals.websocket.js +10 -11
- package/src/modules/globals/views/components/layouts/Client.vue +21 -15
- package/src/modules/globals/views/components/partials/Header.vue +3 -4
- package/src/modules/globals/views/components/partials/Navigation.vue +17 -19
- package/src/modules/globals/views/components/partials/Sidebar.vue +20 -9
- package/src/modules/marketplace/views/components/sections/SectionMenu.vue +1 -1
- package/src/modules/notifications/components/elements/NotificationBadge.vue +7 -0
- package/src/modules/orders/components/blocks/CardOrderBackoffice.vue +106 -0
- package/src/modules/orders/components/blocks/CardOrderItem.vue +2 -2
- package/src/modules/orders/components/blocks/CardOrderUser.vue +16 -9
- package/src/modules/orders/components/pages/OrderBackoffice.vue +146 -77
- package/src/modules/orders/components/pages/OrderCreate.vue +7 -12
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +15 -3
- package/src/modules/orders/components/pages/Orders.vue +10 -93
- package/src/modules/orders/components/partials/ShopCart.vue +2 -2
- package/src/modules/orders/components/sections/FormDelivery.vue +35 -43
- package/src/modules/orders/components/sections/FormPayment.vue +17 -7
- package/src/modules/orders/controllers/orders.controller.js +12 -1
- package/src/modules/orders/store/orders.js +65 -0
- package/src/modules/organizations/components/pages/Organization.vue +48 -47
- package/src/modules/organizations/controllers/organizations.controller.js +57 -47
- package/src/modules/organizations/store/organizations.js +6 -6
- package/src/modules/products/components/pages/Products.vue +4 -3
- package/src/modules/spots/components/blocks/CardSpot.vue +8 -7
- package/src/modules/spots/controllers/spots.controller.js +47 -14
- package/src/modules/spots/routes/spots.routes.js +2 -3
- package/src/modules/spots/store/spots.js +4 -4
- package/src/styles/base/shadow_transitions_hover_refactor.scss +1 -0
- package/src/modules/landing/components/sections/HowToBuyWDR.vue +0 -130
- package/src/modules/landing/components/sections/WhatIsWDRSection.vue +0 -116
|
@@ -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=\"t-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-big\">\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-medium\">{{ 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-medium t-semi\"\n\t\t \t:class=\"[\n\t\t\t hasOverdue ? 't-red' : 't-second'\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 lastEndDate = new Date(props.positions[props.positions.length - 1].date.end);\n const now = new Date();\n const diffTime = Math.abs(now - lastEndDate);\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n if (diffDays > 0 && props.status !== 'finished' && props.status !== 'canceled') {\n return `Delay ${diffDays} day${diffDays > 1 ? 's' : ''}`;\n }\n }\n return `Created, ${createdDate}`;\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 = getDateWithoutTime(position.date.end);\n return endDate <= threeDaysFromNow;\n });\n});\n\n// Есть ли просроченные позиции\nconst hasOverdue = computed(() => {\n return props.positions.some(position => {\n const endDate = getDateWithoutTime(position.date.end);\n return 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":"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"}
|
|
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=\"t-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-big\">\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-medium\">{{ 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-medium t-semi\"\n\t\t \t:class=\"[\n\t\t\t hasOverdue ? 't-red' : 't-second'\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":"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"}
|
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
;/* empty css */
|
|
5
|
+
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
6
|
+
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
8
7
|
const Popup = require("../../../../components/Popup/Popup.vue2.cjs");
|
|
9
8
|
const IconTime = require("../../../icons/entities/IconTime.vue.cjs");
|
|
10
9
|
const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
|
|
11
10
|
const CardOrganization = require("../../../organizations/components/blocks/CardOrganization.vue.cjs");
|
|
12
11
|
const ChatPage = require("../../../chats/components/pages/ChatPage.vue.cjs");
|
|
13
12
|
const PriceTotal = require("../elements/PriceTotal.vue.cjs");
|
|
13
|
+
;/* empty css */
|
|
14
14
|
const globals = require("../../../globals/views/store/globals.cjs");
|
|
15
15
|
const auth = require("../../../auth/views/store/auth.cjs");
|
|
16
16
|
const orders = require("../../store/orders.cjs");
|
|
17
17
|
require("../../../products/store/products.cjs");
|
|
18
18
|
const organizations = require("../../../organizations/store/organizations.cjs");
|
|
19
19
|
const vueI18n = require("vue-i18n");
|
|
20
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
20
21
|
const _hoisted_1 = {
|
|
21
22
|
key: 0,
|
|
22
23
|
class: "pd-thin bg-white"
|
|
@@ -29,38 +30,41 @@ const _hoisted_3 = { class: "mn-b-small flex-nowrap flex" };
|
|
|
29
30
|
const _hoisted_4 = { class: "t-medium p-medium" };
|
|
30
31
|
const _hoisted_5 = { class: "p-small t-transp" };
|
|
31
32
|
const _hoisted_6 = { class: "flex-nowrap flex gap-thin pos-relative" };
|
|
32
|
-
const _hoisted_7 = {
|
|
33
|
+
const _hoisted_7 = { class: "flex gap-thin flex-column mn-b-thin" };
|
|
34
|
+
const _hoisted_8 = {
|
|
33
35
|
key: 1,
|
|
34
|
-
class: "bg-light pd-thin mn-b-thin pd-thin radius-extra flex-nowrap flex"
|
|
35
|
-
};
|
|
36
|
-
const _hoisted_8 = { class: "w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-light-transp-20" };
|
|
37
|
-
const _hoisted_9 = { class: "t-medium mn-r-auto" };
|
|
38
|
-
const _hoisted_10 = {
|
|
39
|
-
key: 2,
|
|
40
36
|
class: "gap-thin cols-2"
|
|
41
37
|
};
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
38
|
+
const _hoisted_9 = { class: "w-100" };
|
|
39
|
+
const _hoisted_10 = { class: "mn-b-thin bg-light w-100 o-hidden radius-medium" };
|
|
40
|
+
const _hoisted_11 = { class: "pd-small flex-nowrap flex" };
|
|
41
|
+
const _hoisted_12 = { class: "mn-r-auto" };
|
|
42
|
+
const _hoisted_13 = { class: "t-lh-075 h2 d-block mn-b-small" };
|
|
43
|
+
const _hoisted_14 = { class: "pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max" };
|
|
44
|
+
const _hoisted_15 = {
|
|
49
45
|
key: 0,
|
|
50
46
|
class: "pd-small flex flex-nowrap flex-v-center br-t br-black-transp-10 br-solid"
|
|
51
47
|
};
|
|
48
|
+
const _hoisted_16 = { class: "w-100 t-right" };
|
|
49
|
+
const _hoisted_17 = { class: "pd-small flex flex-nowrap flex-v-center br-t br-black-transp-10 br-solid" };
|
|
52
50
|
const _hoisted_18 = { class: "w-100 t-right" };
|
|
53
51
|
const _hoisted_19 = { class: "pd-small flex flex-nowrap flex-v-center br-t br-black-transp-10 br-solid" };
|
|
54
52
|
const _hoisted_20 = { class: "w-100 t-right" };
|
|
55
53
|
const _hoisted_21 = { class: "pd-small flex flex-nowrap flex-v-center br-t br-black-transp-10 br-solid" };
|
|
56
|
-
const _hoisted_22 = { class: "w-
|
|
57
|
-
const _hoisted_23 = {
|
|
58
|
-
const _hoisted_24 = {
|
|
54
|
+
const _hoisted_22 = { class: "w-max t-right" };
|
|
55
|
+
const _hoisted_23 = {
|
|
59
56
|
key: 1,
|
|
57
|
+
class: "o-y-scroll bg-light pd-thin mn-b-thin pd-thin radius-medium flex-nowrap flex"
|
|
58
|
+
};
|
|
59
|
+
const _hoisted_24 = { 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" };
|
|
60
|
+
const _hoisted_25 = { class: "t-medium mn-r-auto" };
|
|
61
|
+
const _hoisted_26 = { class: "bg-light radius-medium pd-medium mn-r-bold w-100" };
|
|
62
|
+
const _hoisted_27 = {
|
|
63
|
+
key: 2,
|
|
60
64
|
class: "t-transp"
|
|
61
65
|
};
|
|
62
|
-
const
|
|
63
|
-
const
|
|
66
|
+
const _hoisted_28 = { class: "bg-light radius-medium pd-medium w-100" };
|
|
67
|
+
const _hoisted_29 = { class: "flex gap-thin flex-column mn-b-thin" };
|
|
64
68
|
const _sfc_main = {
|
|
65
69
|
__name: "OrderBackoffice",
|
|
66
70
|
setup(__props) {
|
|
@@ -71,11 +75,7 @@ const _sfc_main = {
|
|
|
71
75
|
const order = vue.ref(null);
|
|
72
76
|
vue.ref(null);
|
|
73
77
|
const orderOrganization = vue.ref(null);
|
|
74
|
-
const statuses =
|
|
75
|
-
const statusLabels = ["Created", "Confirmed", "Preparing", "In use", "Finished"];
|
|
76
|
-
const isActiveStatus = (index) => {
|
|
77
|
-
return statuses.slice(index).includes(order.value.status);
|
|
78
|
-
};
|
|
78
|
+
const statuses = globals.state.options.orders.statuses;
|
|
79
79
|
if (route.meta.context === "user" && auth.state.user && route.params._id !== ((_a = auth.state.user) == null ? void 0 : _a._id) && !((_c = (_b = auth.state.access) == null ? void 0 : _b.roles) == null ? void 0 : _c.includes("ROLE_MODERATOR")) && !((_e = (_d = auth.state.access) == null ? void 0 : _d.roles) == null ? void 0 : _e.includes("ROLE_ADMIN"))) {
|
|
80
80
|
router.push("/401");
|
|
81
81
|
}
|
|
@@ -89,13 +89,27 @@ const _sfc_main = {
|
|
|
89
89
|
isOpeStatusPopup.value = false;
|
|
90
90
|
selectedMember.value = null;
|
|
91
91
|
}
|
|
92
|
+
const isOpenPaymentPopup = vue.ref(false);
|
|
93
|
+
const selectedPayments = vue.ref({
|
|
94
|
+
type: null,
|
|
95
|
+
status: null
|
|
96
|
+
});
|
|
97
|
+
function openPaymentPopup() {
|
|
98
|
+
selectedPayments.value.type = order.value.payment.type;
|
|
99
|
+
selectedPayments.value.status = order.value.payment.status;
|
|
100
|
+
isOpenPaymentPopup.value = true;
|
|
101
|
+
}
|
|
102
|
+
function closePaymentPopup() {
|
|
103
|
+
isOpenPaymentPopup.value = false;
|
|
104
|
+
}
|
|
92
105
|
vue.onMounted(async () => {
|
|
93
106
|
var _a2, _b2;
|
|
94
107
|
order.value = await orders.actions.read({ _id: route.params.order });
|
|
95
108
|
order.value = order.value[0];
|
|
96
109
|
orderOrganization.value = await organizations.actions.read({
|
|
97
110
|
_id: (_a2 = order.value) == null ? void 0 : _a2.owner.target._id,
|
|
98
|
-
location: (_b2 = globals.state.position) == null ? void 0 : _b2.location
|
|
111
|
+
location: (_b2 = globals.state.position) == null ? void 0 : _b2.location,
|
|
112
|
+
lookup: ["spots"]
|
|
99
113
|
});
|
|
100
114
|
});
|
|
101
115
|
let cartTotalPrice = vue.computed(() => {
|
|
@@ -118,20 +132,28 @@ const _sfc_main = {
|
|
|
118
132
|
}, 0));
|
|
119
133
|
});
|
|
120
134
|
function getNextStatus(currentStatus) {
|
|
121
|
-
const currentIndex = statuses.
|
|
135
|
+
const currentIndex = globals.state.options.orders.statuses.findIndex((status) => status.value === currentStatus);
|
|
122
136
|
if (currentIndex !== -1 && currentIndex + 1 < statuses.length) {
|
|
123
|
-
return statuses[currentIndex + 1];
|
|
137
|
+
return globals.state.options.orders.statuses[currentIndex + 1];
|
|
124
138
|
}
|
|
125
139
|
return null;
|
|
126
140
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
141
|
+
const isActiveStatus = (index) => {
|
|
142
|
+
return globals.state.options.orders.statuses.slice(index).some((status) => status.value === order.value.status);
|
|
143
|
+
};
|
|
144
|
+
async function changePaymentStatus() {
|
|
145
|
+
if (selectedPayments.value.status && selectedPayments.value.type) {
|
|
146
|
+
orders.state.current.payment = selectedPayments.value;
|
|
147
|
+
await orders.actions.update(orders.state.current);
|
|
148
|
+
} else {
|
|
149
|
+
console.error("Payment status is void. Must handle somehow.");
|
|
150
|
+
}
|
|
151
|
+
closePaymentPopup();
|
|
130
152
|
}
|
|
131
153
|
async function setNextStatus() {
|
|
132
154
|
const nextStatus = getNextStatus(orders.state.current.status);
|
|
133
155
|
if (nextStatus) {
|
|
134
|
-
orders.state.current.status = nextStatus;
|
|
156
|
+
orders.state.current.status = nextStatus.value;
|
|
135
157
|
await orders.actions.update(orders.state.current);
|
|
136
158
|
} else {
|
|
137
159
|
console.error("Next status is void. Must handle somehow.");
|
|
@@ -139,18 +161,18 @@ const _sfc_main = {
|
|
|
139
161
|
closeStatusPopup();
|
|
140
162
|
}
|
|
141
163
|
return (_ctx, _cache) => {
|
|
142
|
-
var _a2, _b2, _c2, _d2, _e2, _f, _g;
|
|
164
|
+
var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i, _j, _k;
|
|
143
165
|
return order.value && orderOrganization.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
144
166
|
order.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
145
167
|
vue.createElementVNode("div", _hoisted_3, [
|
|
146
168
|
vue.createElementVNode("p", _hoisted_4, [
|
|
147
|
-
_cache[
|
|
169
|
+
_cache[2] || (_cache[2] = vue.createTextVNode(" Order No: ")),
|
|
148
170
|
vue.createElementVNode("span", _hoisted_5, "#" + vue.toDisplayString(order.value._id), 1)
|
|
149
171
|
])
|
|
150
172
|
]),
|
|
151
173
|
vue.createElementVNode("div", _hoisted_6, [
|
|
152
|
-
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(statuses, (status, index) => {
|
|
153
|
-
return vue.
|
|
174
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(globals.state.options.orders.statuses, (status, index) => {
|
|
175
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
154
176
|
key: index,
|
|
155
177
|
class: "w-20"
|
|
156
178
|
}, [
|
|
@@ -159,50 +181,109 @@ const _sfc_main = {
|
|
|
159
181
|
"bg-white br-anim br-glow radius-extra h-1r w-100",
|
|
160
182
|
{ "br-glow-anim": isActiveStatus(index) },
|
|
161
183
|
{ "t-transp": !isActiveStatus(index) },
|
|
162
|
-
{ "blink": order.value.status ===
|
|
184
|
+
{ "blink": order.value.status === status.value && getNextStatus(order.value.status) }
|
|
163
185
|
])
|
|
164
186
|
}, null, 2),
|
|
165
187
|
vue.createElementVNode("div", {
|
|
166
188
|
class: vue.normalizeClass([{ "t-transp": !isActiveStatus(index) }, "mn-t-thin p-small t-medium uppercase"])
|
|
167
|
-
}, vue.toDisplayString(
|
|
189
|
+
}, vue.toDisplayString(status.value), 3)
|
|
168
190
|
]);
|
|
169
|
-
}),
|
|
191
|
+
}), 128))
|
|
170
192
|
])
|
|
171
193
|
])) : vue.createCommentVNode("", true),
|
|
172
|
-
vue.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
194
|
+
vue.createVNode(Popup.default, {
|
|
195
|
+
title: "Change payment",
|
|
196
|
+
onClosePopup: closePaymentPopup,
|
|
197
|
+
isPopupOpen: isOpenPaymentPopup.value,
|
|
198
|
+
class: "bg-light w-min-25r w-max-25r radius-medium pd-big"
|
|
199
|
+
}, {
|
|
200
|
+
default: vue.withCtx(() => [
|
|
201
|
+
vue.createVNode(Select.default, {
|
|
202
|
+
select: selectedPayments.value.type,
|
|
203
|
+
"onUpdate:select": _cache[0] || (_cache[0] = ($event) => selectedPayments.value.type = $event),
|
|
204
|
+
property: "value",
|
|
205
|
+
label: "Type",
|
|
206
|
+
options: [
|
|
207
|
+
{ name: "Cash", value: "cash" },
|
|
208
|
+
{ name: "Card", value: "card" },
|
|
209
|
+
{ name: "Bank Transfer", value: "bank" }
|
|
210
|
+
],
|
|
211
|
+
placeholder: "Select type of payment",
|
|
212
|
+
size: "small",
|
|
213
|
+
class: "bg-white mn-b-thin pd-regular radius-small w-100"
|
|
214
|
+
}, null, 8, ["select"]),
|
|
215
|
+
vue.createVNode(Select.default, {
|
|
216
|
+
select: selectedPayments.value.status,
|
|
217
|
+
"onUpdate:select": _cache[1] || (_cache[1] = ($event) => selectedPayments.value.status = $event),
|
|
218
|
+
property: "value",
|
|
219
|
+
label: "Status",
|
|
220
|
+
options: [
|
|
221
|
+
{ name: "Unpaid", value: "unpaid" },
|
|
222
|
+
{ name: "Paid", value: "paid" },
|
|
223
|
+
{ name: "Refunded", value: "refunded" }
|
|
224
|
+
],
|
|
225
|
+
placeholder: "Select status of payment",
|
|
226
|
+
size: "small",
|
|
227
|
+
class: "bg-white mn-b-small pd-regular radius-small w-100"
|
|
228
|
+
}, null, 8, ["select"]),
|
|
229
|
+
vue.createVNode(Button.default, {
|
|
230
|
+
submit: changePaymentStatus,
|
|
231
|
+
class: "t-white w-100 bg-second"
|
|
232
|
+
}, {
|
|
233
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
234
|
+
vue.createElementVNode("span", null, "Change Status", -1)
|
|
235
|
+
])),
|
|
236
|
+
_: 1
|
|
237
|
+
})
|
|
183
238
|
]),
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
onClick: openStatusPopup,
|
|
187
|
-
class: "mn-l-auto bg-black t-white button"
|
|
188
|
-
}, " Mark as " + vue.toDisplayString(getStatusLabel(getNextStatus(order.value.status))), 1)) : vue.createCommentVNode("", true)
|
|
189
|
-
])) : vue.createCommentVNode("", true),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["isPopupOpen"]),
|
|
190
241
|
vue.createVNode(Popup.default, {
|
|
191
|
-
title: "Change status",
|
|
242
|
+
title: "Change order status",
|
|
192
243
|
onClosePopup: closeStatusPopup,
|
|
193
244
|
isPopupOpen: isOpeStatusPopup.value,
|
|
194
245
|
class: "bg-light w-min-30r w-max-30r radius-medium pd-big"
|
|
195
246
|
}, {
|
|
196
|
-
default: vue.withCtx(() =>
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
247
|
+
default: vue.withCtx(() => {
|
|
248
|
+
var _a3, _b3, _c3, _d3, _e3, _f2, _g2, _h2;
|
|
249
|
+
return [
|
|
250
|
+
vue.createElementVNode("ul", _hoisted_7, [
|
|
251
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(order.value.positions, (product, index) => {
|
|
252
|
+
return vue.openBlock(), vue.createBlock(CardOrderItem.default, {
|
|
253
|
+
key: product._id,
|
|
254
|
+
editable: true,
|
|
255
|
+
product,
|
|
256
|
+
increase: (product2) => orders.mutations.incrementItemQuantity(order.value, product2._id),
|
|
257
|
+
decrease: (product2) => orders.mutations.decrementItemQuantity(order.value, product2._id),
|
|
258
|
+
remove: (product2) => orders.mutations.removeProduct(order.value, product2._id),
|
|
259
|
+
onUpdateRentDates: (product2, dates) => _ctx.shopcart.actions.updateRentDates({ positions: order.value.positions, productId: product2._id, dates }),
|
|
260
|
+
class: "bg-white radius-small pd-small"
|
|
261
|
+
}, null, 8, ["product", "increase", "decrease", "remove", "onUpdateRentDates"]);
|
|
262
|
+
}), 128))
|
|
263
|
+
]),
|
|
264
|
+
vue.createVNode(PriceTotal.default, {
|
|
265
|
+
totalPrice: vue.unref(cartTotalPrice),
|
|
266
|
+
currency: _ctx.returnCurrency(),
|
|
267
|
+
showFees: (_b3 = (_a3 = globals.state.options) == null ? void 0 : _a3.orders) == null ? void 0 : _b3.showFees,
|
|
268
|
+
feesRate: ((_d3 = (_c3 = globals.state.options) == null ? void 0 : _c3.orders) == null ? void 0 : _d3.feesRate) || 0,
|
|
269
|
+
showVat: (_f2 = (_e3 = globals.state.options) == null ? void 0 : _e3.orders) == null ? void 0 : _f2.showVat,
|
|
270
|
+
vatRate: ((_h2 = (_g2 = globals.state.options) == null ? void 0 : _g2.orders) == null ? void 0 : _h2.vatRate) || 0
|
|
271
|
+
}, null, 8, ["totalPrice", "currency", "showFees", "feesRate", "showVat", "vatRate"]),
|
|
272
|
+
vue.createVNode(Button.default, {
|
|
273
|
+
submit: setNextStatus,
|
|
274
|
+
class: "t-white w-100 bg-second"
|
|
275
|
+
}, {
|
|
276
|
+
default: vue.withCtx(() => [
|
|
277
|
+
vue.createElementVNode("span", null, vue.toDisplayString("Confirm Changing to " + getNextStatus(order.value.status).label), 1)
|
|
278
|
+
]),
|
|
279
|
+
_: 1
|
|
280
|
+
})
|
|
281
|
+
];
|
|
282
|
+
}),
|
|
202
283
|
_: 1
|
|
203
284
|
}, 8, ["isPopupOpen"]),
|
|
204
|
-
order.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
205
|
-
vue.createElementVNode("div",
|
|
285
|
+
order.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
286
|
+
vue.createElementVNode("div", _hoisted_9, [
|
|
206
287
|
orderOrganization.value[0] ? (vue.openBlock(), vue.createBlock(CardOrganization.default, {
|
|
207
288
|
key: 0,
|
|
208
289
|
organization: orderOrganization.value[0],
|
|
@@ -211,40 +292,67 @@ const _sfc_main = {
|
|
|
211
292
|
showProducts: false,
|
|
212
293
|
class: "bg-light mn-b-thin w-100 o-hidden radius-medium pd-small"
|
|
213
294
|
}, null, 8, ["organization"])) : vue.createCommentVNode("", true),
|
|
214
|
-
vue.createElementVNode("div",
|
|
215
|
-
vue.createElementVNode("div",
|
|
216
|
-
vue.createElementVNode("div",
|
|
217
|
-
_cache[
|
|
218
|
-
vue.createElementVNode("span",
|
|
219
|
-
vue.createElementVNode("p",
|
|
295
|
+
vue.createElementVNode("div", _hoisted_10, [
|
|
296
|
+
vue.createElementVNode("div", _hoisted_11, [
|
|
297
|
+
vue.createElementVNode("div", _hoisted_12, [
|
|
298
|
+
_cache[4] || (_cache[4] = vue.createElementVNode("span", { class: "d-block t-medium p-medium" }, "Order is", -1)),
|
|
299
|
+
vue.createElementVNode("span", _hoisted_13, vue.toDisplayString(order.value.status), 1),
|
|
300
|
+
vue.createElementVNode("p", _hoisted_14, vue.toDisplayString(_ctx.formatDate(order.value.updatedAt, { language: vue.unref(locale) })), 1)
|
|
220
301
|
])
|
|
221
302
|
]),
|
|
222
|
-
((_a2 = order.value.customer.target) == null ? void 0 : _a2.number) ? (vue.openBlock(), vue.createElementBlock("div",
|
|
223
|
-
_cache[
|
|
224
|
-
vue.createElementVNode("p",
|
|
303
|
+
((_a2 = order.value.customer.target) == null ? void 0 : _a2.number) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [
|
|
304
|
+
_cache[5] || (_cache[5] = vue.createElementVNode("p", { class: "w-100 t-medium p-medium" }, " Phone ", -1)),
|
|
305
|
+
vue.createElementVNode("p", _hoisted_16, vue.toDisplayString(((_b2 = order.value.customer.target) == null ? void 0 : _b2.number) || "Not specified"), 1)
|
|
225
306
|
])) : vue.createCommentVNode("", true),
|
|
307
|
+
vue.createElementVNode("div", _hoisted_17, [
|
|
308
|
+
_cache[6] || (_cache[6] = vue.createElementVNode("p", { class: "t-medium p-medium" }, " Address ", -1)),
|
|
309
|
+
vue.createElementVNode("p", _hoisted_18, vue.toDisplayString(order.value.delivery.address || order.value.delivery.spot[0].profile.name + ", " + order.value.delivery.spot[0].address || "Not specified"), 1)
|
|
310
|
+
]),
|
|
226
311
|
vue.createElementVNode("div", _hoisted_19, [
|
|
227
|
-
_cache[
|
|
228
|
-
vue.createElementVNode("p", _hoisted_20, vue.toDisplayString(order.value.delivery.
|
|
312
|
+
_cache[7] || (_cache[7] = vue.createElementVNode("p", { class: "t-medium p-medium" }, " Delivery ", -1)),
|
|
313
|
+
vue.createElementVNode("p", _hoisted_20, vue.toDisplayString(order.value.delivery.type ? order.value.delivery.type : "Not specified"), 1)
|
|
229
314
|
]),
|
|
230
315
|
vue.createElementVNode("div", _hoisted_21, [
|
|
231
|
-
_cache[
|
|
232
|
-
vue.createElementVNode("p", _hoisted_22, vue.toDisplayString(order.value.
|
|
316
|
+
_cache[8] || (_cache[8] = vue.createElementVNode("p", { class: "mn-r-auto t-medium p-medium" }, " Payment ", -1)),
|
|
317
|
+
vue.createElementVNode("p", _hoisted_22, vue.toDisplayString(order.value.payment.type ? order.value.payment.type : "Not specified"), 1),
|
|
318
|
+
vue.createElementVNode("p", {
|
|
319
|
+
onClick: openPaymentPopup,
|
|
320
|
+
class: "w-max pd-thin radius-small bg-second t-white mn-l-thin cursor-pointer hover-bg-black t-right"
|
|
321
|
+
}, vue.toDisplayString(order.value.payment.status ? order.value.payment.status : "Unpaid"), 1)
|
|
233
322
|
])
|
|
234
323
|
]),
|
|
235
|
-
vue.
|
|
236
|
-
|
|
324
|
+
vue.unref(route).meta.context !== "user" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, [
|
|
325
|
+
vue.createElementVNode("div", _hoisted_24, [
|
|
326
|
+
vue.createVNode(IconTime.default, {
|
|
327
|
+
class: "i-semi t-transp",
|
|
328
|
+
fill: "rgb(var(--black)"
|
|
329
|
+
}),
|
|
330
|
+
vue.createElementVNode("p", _hoisted_25, [
|
|
331
|
+
_cache[9] || (_cache[9] = vue.createElementVNode("span", { class: "p-small t-transp" }, "Estimated Reaction", -1)),
|
|
332
|
+
_cache[10] || (_cache[10] = vue.createElementVNode("br", null, null, -1)),
|
|
333
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.formatDate(order.value.deadline, { language: vue.unref(locale) })), 1)
|
|
334
|
+
])
|
|
335
|
+
]),
|
|
336
|
+
getNextStatus(order.value.status) ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
337
|
+
key: 0,
|
|
338
|
+
onClick: openStatusPopup,
|
|
339
|
+
class: "flex-child-default mn-l-auto bg-black t-white button"
|
|
340
|
+
}, " Mark as " + vue.toDisplayString(getNextStatus(order.value.status).label), 1)) : vue.createCommentVNode("", true)
|
|
341
|
+
])) : vue.createCommentVNode("", true),
|
|
342
|
+
vue.createElementVNode("div", _hoisted_26, [
|
|
343
|
+
_cache[11] || (_cache[11] = vue.createElementVNode("h3", { class: "mn-b-small" }, "Chat With Us", -1)),
|
|
237
344
|
vue.createVNode(ChatPage.default, {
|
|
238
345
|
username: ["Order", "UserOrder"].includes(vue.unref(route).name) ? ((_c2 = order.value.user) == null ? void 0 : _c2.name) || "User" : "Support",
|
|
346
|
+
user: auth.state.user._id,
|
|
239
347
|
chatID: vue.unref(route).params.order,
|
|
240
348
|
class: "radius-semi bs-black bg-light o-hidden"
|
|
241
|
-
}, null, 8, ["username", "chatID"])
|
|
349
|
+
}, null, 8, ["username", "user", "chatID"])
|
|
242
350
|
]),
|
|
243
|
-
_ctx.payment && _ctx.payment.Status === "CONFIRMED" ? (vue.openBlock(), vue.createElementBlock("span",
|
|
351
|
+
_ctx.payment && _ctx.payment.Status === "CONFIRMED" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_27, "Paid")) : vue.createCommentVNode("", true)
|
|
244
352
|
]),
|
|
245
|
-
vue.createElementVNode("div",
|
|
246
|
-
_cache[
|
|
247
|
-
vue.createElementVNode("ul",
|
|
353
|
+
vue.createElementVNode("div", _hoisted_28, [
|
|
354
|
+
_cache[12] || (_cache[12] = vue.createElementVNode("h3", { class: "mn-b-small" }, "Order Summary", -1)),
|
|
355
|
+
vue.createElementVNode("ul", _hoisted_29, [
|
|
248
356
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(order.value.positions, (product, index) => {
|
|
249
357
|
return vue.openBlock(), vue.createBlock(CardOrderItem.default, {
|
|
250
358
|
key: product._id,
|
|
@@ -257,10 +365,10 @@ const _sfc_main = {
|
|
|
257
365
|
vue.createVNode(PriceTotal.default, {
|
|
258
366
|
totalPrice: vue.unref(cartTotalPrice),
|
|
259
367
|
currency: _ctx.returnCurrency(),
|
|
260
|
-
showFees: (_d2 = globals.state.options) == null ? void 0 : _d2.showFees,
|
|
261
|
-
feesRate: ((
|
|
262
|
-
showVat: (
|
|
263
|
-
vatRate: ((
|
|
368
|
+
showFees: (_e2 = (_d2 = globals.state.options) == null ? void 0 : _d2.orders) == null ? void 0 : _e2.showFees,
|
|
369
|
+
feesRate: ((_g = (_f = globals.state.options) == null ? void 0 : _f.orders) == null ? void 0 : _g.feesRate) || 0,
|
|
370
|
+
showVat: (_i = (_h = globals.state.options) == null ? void 0 : _h.orders) == null ? void 0 : _i.showVat,
|
|
371
|
+
vatRate: ((_k = (_j = globals.state.options) == null ? void 0 : _j.orders) == null ? void 0 : _k.vatRate) || 0
|
|
264
372
|
}, null, 8, ["totalPrice", "currency", "showFees", "feesRate", "showVat", "vatRate"])
|
|
265
373
|
])
|
|
266
374
|
])) : vue.createCommentVNode("", true)
|
|
@@ -268,6 +376,6 @@ const _sfc_main = {
|
|
|
268
376
|
};
|
|
269
377
|
}
|
|
270
378
|
};
|
|
271
|
-
const OrderBackoffice = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
379
|
+
const OrderBackoffice = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-c30b339c"]]);
|
|
272
380
|
exports.default = OrderBackoffice;
|
|
273
381
|
//# sourceMappingURL=OrderBackoffice.vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderBackoffice.vue.cjs","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=\"t-medium p-medium\">\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<div class=\"flex-nowrap flex gap-thin pos-relative \">\n\t <div v-for=\"(status, index) in statuses\" :key=\"index\" class=\"w-20\">\n\t <div\n\t \tclass=\"bg-white br-anim br-glow radius-extra h-1r w-100\"\n\t :class=\"\n\t\t\t\t { 'br-glow-anim': isActiveStatus(index) },\n\t\t\t\t { 't-transp': !isActiveStatus(index) },\n\t\t\t\t { 'blink': order.status === statuses[index] && getNextStatus(order.status) }\n\t\t\t\t \"\n\t />\n\t <div \n\t \t:class=\"{ 't-transp': !isActiveStatus(index) }\"\n\t\t\t\t class=\"mn-t-thin p-small t-medium uppercase\">{{ statusLabels[index] }}</div>\n\t \t</div>\n\t\t </div>\n\t </div>\n\n\t <div v-if=\"route.meta.context !== 'user'\" class=\"bg-light pd-thin mn-b-thin pd-thin radius-extra flex-nowrap flex\">\n \t\t<div class=\"w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-light-transp-20\">\n \t\t\t<IconTime class=\"i-semi t-transp\" fill=\"rgb(var(--black)\" />\n <p class=\"t-medium mn-r-auto\"><span class=\"p-small t-transp\">Estimated Reaction</span><br>{{formatDate(order.deadline, { language: locale })}}</p>\n\t \t</div>\n\t \t<button v-if=\"getNextStatus(order.status)\" @click=\"openStatusPopup\" class=\"mn-l-auto bg-black t-white button\"> \n\t\t Mark as {{ getStatusLabel(getNextStatus(order.status)) }} \n\t\t </button>\n\n\t\t<!-- <Button v-if=\"order.status !== 'canceled'\" :submit=\"cancelOrder\" class=\"w-max t-white mn-l-thin bg-red\">\n\t\t\t\t<span>Cancel Order</span>\n\t\t\t</Button>\n\n\t\t\t <Button v-if=\"order.status !== 'confirmed'\" :submit=\"confirmOrder\" class=\"w-max t-white mn-l-thin bg-red\">\n\t\t\t\t<span>Confirm Order</span>\n\t\t\t</Button>\n -->\n\n \t</div>\n\n\t <Popup \n title=\"Change 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<!-- <VueDatePicker v-model=\"order.deadline\" :hide-navigation=\"['calendar']\" :flow=\"['time']\" class=\"z-index-3 bg-white radius-small pd-small mn-b-thin mn-b-semi\" /> -->\n\n\t\t\t<!-- {{order.deadline}} -->\n<!-- \n\t\t\t<p class=\"t-medium p-medium mn-b-thin\">\n\t\t Positions\n\t\t </p>\n\n \t<ul class=\"bg-white pd-small radius-small flex gap-thin flex-column mn-b-semi\">\n \t\t\t<CardOrderItem\n \t\t\t\tv-for=\"(product, index) in orderProducts\" :key=\"product._id\"\n \t\t\t\t:editable=\"false\" \n \t\t\t\t:product=\"product\" \n \t\t\t/>\n </ul> -->\n \t<button @click=\"setNextStatus\" class=\"w-100 bg-black-small t-white button\">\n \t\t{{'Confirm Changing to ' + getStatusLabel(getNextStatus(order.status))}}\n \t</button>\n\t \t</Popup>\n\n\n\t \n\t <div v-if=\"order\" class=\"gap-thin cols-2\">\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 t-medium p-medium\">Order is</span>\n\t\t\t\t\t <span class=\" t-lh-075 h2 d-block mn-b-small\">{{order.status}}</span>\n\t\t\t\t\t <p class=\"pd-t-nano pd-b-nano pd-r-thin pd-l-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 br-black-transp-10 br-solid\">\n\t\t\t \t<p class=\"w-100 t-medium p-medium\">\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 br-black-transp-10 br-solid\">\n\t\t\t \t<p class=\"t-medium p-medium\">\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 {{order.delivery.address || (order.delivery.spot[0].profile.name + ', ' + order.delivery.spot[0].address) || '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 br-black-transp-10 br-solid\">\n\t\t\t \t<p class=\"mn-b-small t-medium p-medium\">\n\t\t\t \tDelivery\n\t\t\t </p>\n\n\t\t\t <p class=\"w-100 t-right mn-b-small\">\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\t</div>\n\t\t\t\t\t\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 <ChatWindow\n\t\t \t:username=\"['Order', 'UserOrder'].includes(route.name) ? (order.user?.name || 'User') : 'Support'\"\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\" :key=\"product._id\"\n\t \t\t\t\t:editable=\"false\" \n\t \t\t\t\t:product=\"product\" \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 :currency=\"returnCurrency()\"\n :showFees=\"globals.state.options?.showFees\"\n :feesRate=\"globals.state.options?.feesRate || 0\"\n :showVat=\"globals.state.options?.showVat\"\n :vatRate=\"globals.state.options?.vatRate || 0\"\n />\n </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 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 ChatWindow 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\n\n\timport * as globals \tfrom '@martyrs/src/modules/globals/views/store/globals'\n\timport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\timport * as orders \tfrom '@martyrs/src/modules/orders/store/orders'\n\timport * as products \tfrom '@martyrs/src/modules/products/store/products'\n\timport * as organizations \tfrom '@martyrs/src/modules/organizations/store/organizations'\n\n\timport { useI18n } from 'vue-i18n';\n\t\n\tconst { locale } = useI18n();\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 = ['created', 'confirmed', 'preparing', 'inuse', 'finished'];\n\tconst statusLabels = ['Created', 'Confirmed', 'Preparing', 'In use', 'Finished'];\n\n\tconst isActiveStatus = (index) => {\n\t return statuses.slice(index).includes(order.value.status);\n\t};\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\t// description: 'Your order has been successfully created. Our manager will contact you within five minutes to confirm your order.'\n\t// description: 'Your order has been confirmed. We are now processing your items and preparing them for shipment.'\n\t// description: 'Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information.'\n\t// description: 'Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information.'\n\t// description: 'Your order is currently in transit. Our delivery team is working hard to get your items to you as soon as possible.'\n\t// description: 'Congratulations! Your order has been successfully delivered. If you have any concerns or feedback, feel free to contact us.'\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\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: globals.state.position?.location,\n\t });\n\n\t})\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\tfunction getNextStatus(currentStatus) {\n const currentIndex = statuses.indexOf(currentStatus);\n\n if (currentIndex !== -1 && currentIndex + 1 < statuses.length) {\n return statuses[currentIndex + 1];\n }\n return null; // Если следующий статус не существует\n }\n\n function getStatusLabel(status) {\n const index = statuses.indexOf(status);\n\n return status ? statusLabels[index] : \"\";\n }\n async function setNextStatus() {\n const nextStatus = getNextStatus(orders.state.current.status);\n\n if (nextStatus) {\n orders.state.current.status = nextStatus;\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}\n\n\n\tfunction requestPayment(order) {\n\t\t // store.dispatch(\"payments/newPayment\", order);\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 console.log(date)\n\t console.log(estimatedDeliveryTime)\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":["useI18n","useRouter","useRoute","ref","auth.state","onMounted","orders.actions","organizations.actions","_a","globals.state","computed","orders.state"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"OrderBackoffice.vue.cjs","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=\"t-medium p-medium\">\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<div class=\"flex-nowrap flex gap-thin pos-relative \">\n\t <div v-for=\"(status, index) in globals.state.options.orders.statuses\" :key=\"index\" class=\"w-20\">\n\t <div\n\t \tclass=\"bg-white br-anim br-glow radius-extra h-1r w-100\"\n\t :class=\"\n\t\t\t\t { 'br-glow-anim': isActiveStatus(index) },\n\t\t\t\t { 't-transp': !isActiveStatus(index) },\n\t\t\t\t { 'blink': order.status === status.value && getNextStatus(order.status) }\n\t\t\t\t \"\n\t />\n\t <div \n\t \t:class=\"{ 't-transp': !isActiveStatus(index) }\"\n\t\t\t\t class=\"mn-t-thin p-small t-medium uppercase\">{{ status.value }}</div>\n\t \t</div>\n\t\t </div>\n\t </div>\n\n \t <Popup \n title=\"Change payment\" \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\" :key=\"product._id\"\n \t\t\t\t:editable=\"true\" \n \t\t\t\t:product=\"product\" \n \t\t\t\t:increase=\"product => orders.mutations.incrementItemQuantity(order, product._id)\"\n\t :decrease=\"product => orders.mutations.decrementItemQuantity(order, product._id)\"\n\t :remove=\"product => orders.mutations.removeProduct(order, product._id)\"\n\t @updateRentDates=\"(product, dates) => shopcart.actions.updateRentDates({ positions: order.positions, productId: product._id, 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=\"globals.state.options?.orders?.showFees\"\n :feesRate=\"globals.state.options?.orders?.feesRate || 0\"\n :showVat=\"globals.state.options?.orders?.showVat\"\n :vatRate=\"globals.state.options?.orders?.vatRate || 0\"\n />\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\">\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 t-medium p-medium\">Order is</span>\n\t\t\t\t\t <span class=\" t-lh-075 h2 d-block mn-b-small\">{{order.status}}</span>\n\t\t\t\t\t <p class=\"pd-t-nano pd-b-nano pd-r-thin pd-l-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 br-black-transp-10 br-solid\">\n\t\t\t \t<p class=\"w-100 t-medium p-medium\">\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 br-black-transp-10 br-solid\">\n\t\t\t \t<p class=\"t-medium p-medium\">\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 {{order.delivery.address || (order.delivery.spot[0].profile.name + ', ' + order.delivery.spot[0].address) || '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 br-black-transp-10 br-solid\">\n\t\t\t \t<p class=\"t-medium p-medium\">\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 br-black-transp-10 br-solid\">\n\t\t\t \t<p class=\"mn-r-auto t-medium p-medium\">\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=\"openPaymentPopup\" 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'\" 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-semi t-transp\" fill=\"rgb(var(--black)\" />\n\t\t <p class=\"t-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\" :key=\"product._id\"\n\t \t\t\t\t:editable=\"false\" \n\t \t\t\t\t:product=\"product\" \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 :currency=\"returnCurrency()\"\n :showFees=\"globals.state.options?.orders?.showFees\"\n :feesRate=\"globals.state.options?.orders?.feesRate || 0\"\n :showVat=\"globals.state.options?.orders?.showVat\"\n :vatRate=\"globals.state.options?.orders?.vatRate || 0\"\n />\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 * as globals \tfrom '@martyrs/src/modules/globals/views/store/globals'\n\timport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\timport * as orders \tfrom '@martyrs/src/modules/orders/store/orders'\n\timport * as products \tfrom '@martyrs/src/modules/products/store/products'\n\timport * as organizations \tfrom '@martyrs/src/modules/organizations/store/organizations'\n\n\timport { useI18n } from 'vue-i18n';\n\t\n\tconst { locale } = useI18n();\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 = globals.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: globals.state.position?.location,\n\t lookup: ['spots']\n\t });\n\n\t})\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 = globals.state.options.orders.statuses.findIndex(status => status.value === currentStatus);\n\n\t if (currentIndex !== -1 && currentIndex + 1 < statuses.length) {\n\t return globals.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 globals.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 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":["useI18n","useRouter","useRoute","ref","globals.state","auth.state","onMounted","orders.actions","organizations.actions","_a","computed","orders.state"],"mappings":"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"}
|