@ozdao/martyrs 0.2.427 → 0.2.429
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/Block/Block.vue.cjs +1 -1
- package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
- package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.cjs → Dropdown.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.js.map → Dropdown.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.js → Dropdown.vue.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/Popup/{Popup.vue.cjs → Popup.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Popup/{Popup.vue.js → Popup.vue2.js} +2 -2
- package/dist/martyrs/src/components/Popup/{Popup.vue.cjs.map → Popup.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.cjs → SelectMulti.vue.cjs} +2 -2
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js.map → SelectMulti.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js → SelectMulti.vue.js} +2 -2
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.cjs → Tooltip.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js.map → Tooltip.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
- 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/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- 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/blocks/CardHeader.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.cjs +5 -5
- package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js +5 -5
- package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.cjs +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.cjs +3 -3
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js +3 -3
- package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.cjs +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs +3 -3
- 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 +3 -3
- 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/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 +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +201 -93
- 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 +214 -106
- 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 +8 -11
- 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 +9 -12
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/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/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +16 -13
- 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 +16 -13
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/store/spots.cjs +11 -4
- package/dist/martyrs/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/store/spots.js +11 -4
- package/dist/martyrs/src/modules/spots/store/spots.js.map +1 -1
- package/dist/orders.server.js +6 -0
- package/dist/orders.server.mjs +6 -0
- package/dist/spots.server.js +44 -3
- package/dist/spots.server.mjs +44 -3
- package/dist/style.css +20 -20
- 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/views/classes/globals.websocket.js +10 -11
- package/src/modules/landing/components/sections/Examples.vue +1 -1
- package/src/modules/landing/components/sections/HowToBuyWDR.vue +3 -3
- package/src/modules/landing/components/sections/SectionEarn.vue +4 -4
- package/src/modules/landing/components/sections/SectionFeature.vue +1 -1
- package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +1 -1
- package/src/modules/landing/components/sections/SectionFocus.vue +1 -1
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +3 -3
- package/src/modules/landing/components/sections/SectionMobileApp.vue +3 -3
- package/src/modules/landing/components/sections/SectionOverview.vue +1 -1
- package/src/modules/landing/components/sections/SectionRoadmap.vue +1 -1
- package/src/modules/landing/components/sections/WhatIsWDRSection.vue +3 -3
- package/src/modules/marketplace/views/components/sections/SectionMenu.vue +3 -3
- package/src/modules/notifications/components/elements/NotificationBadge.vue +7 -0
- package/src/modules/orders/components/blocks/CardOrderItem.vue +2 -2
- package/src/modules/orders/components/pages/OrderBackoffice.vue +146 -77
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -10
- 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 +10 -0
- package/src/modules/orders/store/orders.js +65 -0
- package/src/modules/products/components/sections/PopularProducts.vue +4 -1
- package/src/modules/spots/components/blocks/CardSpot.vue +8 -7
- package/src/modules/spots/controllers/spots.controller.js +49 -2
- package/src/modules/spots/routes/spots.routes.js +3 -1
- package/src/modules/spots/store/spots.js +12 -4
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Popup/Popup.vue.js.map +0 -1
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +0 -1
|
@@ -9,67 +9,96 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<div class="flex-nowrap flex gap-thin pos-relative ">
|
|
12
|
-
<div v-for="(status, index) in statuses" :key="index" class="w-20">
|
|
12
|
+
<div v-for="(status, index) in globals.state.options.orders.statuses" :key="index" class="w-20">
|
|
13
13
|
<div
|
|
14
14
|
class="bg-white br-anim br-glow radius-extra h-1r w-100"
|
|
15
15
|
:class="
|
|
16
16
|
{ 'br-glow-anim': isActiveStatus(index) },
|
|
17
17
|
{ 't-transp': !isActiveStatus(index) },
|
|
18
|
-
{ 'blink': order.status ===
|
|
18
|
+
{ 'blink': order.status === status.value && getNextStatus(order.status) }
|
|
19
19
|
"
|
|
20
20
|
/>
|
|
21
21
|
<div
|
|
22
22
|
:class="{ 't-transp': !isActiveStatus(index) }"
|
|
23
|
-
class="mn-t-thin p-small t-medium uppercase">{{
|
|
23
|
+
class="mn-t-thin p-small t-medium uppercase">{{ status.value }}</div>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
<Popup
|
|
29
|
+
title="Change payment"
|
|
30
|
+
@close-popup="closePaymentPopup"
|
|
31
|
+
:isPopupOpen="isOpenPaymentPopup"
|
|
32
|
+
class="bg-light w-min-25r w-max-25r radius-medium pd-big"
|
|
33
|
+
>
|
|
34
|
+
<Select
|
|
35
|
+
v-model:select="selectedPayments.type"
|
|
36
|
+
:property="'value'"
|
|
37
|
+
label="Type"
|
|
38
|
+
:options="[
|
|
39
|
+
{name: 'Cash', value: 'cash'},
|
|
40
|
+
{name: 'Card', value: 'card'},
|
|
41
|
+
{name: 'Bank Transfer', value: 'bank'},
|
|
42
|
+
]"
|
|
43
|
+
placeholder="Select type of payment"
|
|
44
|
+
size="small"
|
|
45
|
+
class="bg-white mn-b-thin pd-regular radius-small w-100"
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
<Select
|
|
49
|
+
v-model:select="selectedPayments.status"
|
|
50
|
+
:property="'value'"
|
|
51
|
+
label="Status"
|
|
52
|
+
:options="[
|
|
53
|
+
{name: 'Unpaid', value: 'unpaid'},
|
|
54
|
+
{name: 'Paid', value: 'paid'},
|
|
55
|
+
{name: 'Refunded', value: 'refunded'},
|
|
56
|
+
]"
|
|
57
|
+
placeholder="Select status of payment"
|
|
58
|
+
size="small"
|
|
59
|
+
class="bg-white mn-b-small pd-regular radius-small w-100"
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<Button :submit="changePaymentStatus" class="t-white w-100 bg-second">
|
|
64
|
+
<span>Change Status</span>
|
|
43
65
|
</Button>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</div>
|
|
66
|
+
</Popup>
|
|
47
67
|
|
|
48
68
|
<Popup
|
|
49
|
-
title="Change status"
|
|
69
|
+
title="Change order status"
|
|
50
70
|
@close-popup="closeStatusPopup"
|
|
51
71
|
:isPopupOpen="isOpeStatusPopup"
|
|
52
72
|
class="bg-light w-min-30r w-max-30r radius-medium pd-big"
|
|
53
73
|
>
|
|
54
74
|
|
|
55
|
-
<!--
|
|
56
|
-
|
|
57
|
-
<!-- {{order.deadline}} -->
|
|
58
|
-
<!--
|
|
59
|
-
<p class="t-medium p-medium mn-b-thin">
|
|
60
|
-
Positions
|
|
61
|
-
</p>
|
|
75
|
+
<!-- Добавить выбор примерного времени -->
|
|
62
76
|
|
|
63
|
-
<ul class="
|
|
77
|
+
<ul class="flex gap-thin flex-column mn-b-thin">
|
|
64
78
|
<CardOrderItem
|
|
65
|
-
v-for="(product, index) in
|
|
66
|
-
:editable="
|
|
79
|
+
v-for="(product, index) in order.positions" :key="product._id"
|
|
80
|
+
:editable="true"
|
|
67
81
|
:product="product"
|
|
82
|
+
:increase="product => orders.mutations.incrementItemQuantity(order, product._id)"
|
|
83
|
+
:decrease="product => orders.mutations.decrementItemQuantity(order, product._id)"
|
|
84
|
+
:remove="product => orders.mutations.removeProduct(order, product._id)"
|
|
85
|
+
@updateRentDates="(product, dates) => shopcart.actions.updateRentDates({ positions: order.positions, productId: product._id, dates })"
|
|
86
|
+
class="bg-white radius-small pd-small"
|
|
68
87
|
/>
|
|
69
|
-
</ul>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
88
|
+
</ul>
|
|
89
|
+
|
|
90
|
+
<PriceTotal
|
|
91
|
+
:totalPrice="cartTotalPrice"
|
|
92
|
+
:currency="returnCurrency()"
|
|
93
|
+
:showFees="globals.state.options?.orders?.showFees"
|
|
94
|
+
:feesRate="globals.state.options?.orders?.feesRate || 0"
|
|
95
|
+
:showVat="globals.state.options?.orders?.showVat"
|
|
96
|
+
:vatRate="globals.state.options?.orders?.vatRate || 0"
|
|
97
|
+
/>
|
|
98
|
+
|
|
99
|
+
<Button :submit="setNextStatus" class="t-white w-100 bg-second">
|
|
100
|
+
<span>{{'Confirm Changing to ' + (getNextStatus(order.status)).label}}</span>
|
|
101
|
+
</Button>
|
|
73
102
|
</Popup>
|
|
74
103
|
|
|
75
104
|
|
|
@@ -128,22 +157,49 @@
|
|
|
128
157
|
</div>
|
|
129
158
|
|
|
130
159
|
<div class="pd-small flex flex-nowrap flex-v-center br-t br-black-transp-10 br-solid">
|
|
131
|
-
<p class="
|
|
160
|
+
<p class="t-medium p-medium">
|
|
132
161
|
Delivery
|
|
133
162
|
</p>
|
|
134
163
|
|
|
135
|
-
<p class="w-100 t-right
|
|
164
|
+
<p class="w-100 t-right ">
|
|
136
165
|
{{order.delivery.type ? order.delivery.type : 'Not specified'}}
|
|
137
166
|
</p>
|
|
138
167
|
</div>
|
|
139
168
|
|
|
169
|
+
<div class="pd-small flex flex-nowrap flex-v-center br-t br-black-transp-10 br-solid">
|
|
170
|
+
<p class="mn-r-auto t-medium p-medium">
|
|
171
|
+
Payment
|
|
172
|
+
</p>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<p class="w-max t-right">
|
|
176
|
+
{{order.payment.type ? order.payment.type : 'Not specified'}}
|
|
177
|
+
</p>
|
|
178
|
+
|
|
179
|
+
<p @click="openPaymentPopup" class="w-max pd-thin radius-small bg-second t-white mn-l-thin cursor-pointer hover-bg-black t-right">
|
|
180
|
+
{{order.payment.status ? order.payment.status : 'Unpaid'}}
|
|
181
|
+
</p>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
|
|
140
185
|
</div>
|
|
141
|
-
|
|
186
|
+
|
|
187
|
+
<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">
|
|
188
|
+
<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">
|
|
189
|
+
<IconTime class="i-semi t-transp" fill="rgb(var(--black)" />
|
|
190
|
+
<p class="t-medium mn-r-auto"><span class="p-small t-transp">Estimated Reaction</span><br>{{formatDate(order.deadline, { language: locale })}}</p>
|
|
191
|
+
</div>
|
|
192
|
+
<button v-if="getNextStatus(order.status)" @click="openStatusPopup" class="flex-child-default mn-l-auto bg-black t-white button">
|
|
193
|
+
Mark as {{ (getNextStatus(order.status)).label }}
|
|
194
|
+
</button>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
142
197
|
<div class="bg-light radius-medium pd-medium mn-r-bold w-100">
|
|
143
198
|
<h3 class="mn-b-small">Chat With Us</h3>
|
|
144
199
|
|
|
145
|
-
<
|
|
200
|
+
<ChatPage
|
|
146
201
|
:username="['Order', 'UserOrder'].includes(route.name) ? (order.user?.name || 'User') : 'Support'"
|
|
202
|
+
:user="auth.state.user._id"
|
|
147
203
|
:chatID="route.params.order"
|
|
148
204
|
class="radius-semi bs-black bg-light o-hidden"
|
|
149
205
|
/>
|
|
@@ -184,12 +240,12 @@
|
|
|
184
240
|
<PriceTotal
|
|
185
241
|
:totalPrice="cartTotalPrice"
|
|
186
242
|
:currency="returnCurrency()"
|
|
187
|
-
:showFees="globals.state.options?.showFees"
|
|
188
|
-
:feesRate="globals.state.options?.feesRate || 0"
|
|
189
|
-
:showVat="globals.state.options?.showVat"
|
|
190
|
-
:vatRate="globals.state.options?.vatRate || 0"
|
|
243
|
+
:showFees="globals.state.options?.orders?.showFees"
|
|
244
|
+
:feesRate="globals.state.options?.orders?.feesRate || 0"
|
|
245
|
+
:showVat="globals.state.options?.orders?.showVat"
|
|
246
|
+
:vatRate="globals.state.options?.orders?.vatRate || 0"
|
|
191
247
|
/>
|
|
192
|
-
|
|
248
|
+
</div>
|
|
193
249
|
|
|
194
250
|
|
|
195
251
|
</div>
|
|
@@ -203,6 +259,7 @@
|
|
|
203
259
|
import { useRouter, useRoute } from 'vue-router'
|
|
204
260
|
|
|
205
261
|
import Button from '@martyrs/src/components/Button/Button.vue'
|
|
262
|
+
import Select from '@martyrs/src/components/Select/Select.vue'
|
|
206
263
|
import Popup from "@martyrs/src/components/Popup/Popup.vue";
|
|
207
264
|
|
|
208
265
|
import IconTime from '@martyrs/src/modules/icons/entities/IconTime.vue'
|
|
@@ -211,11 +268,11 @@
|
|
|
211
268
|
import CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'
|
|
212
269
|
import CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'
|
|
213
270
|
|
|
214
|
-
import
|
|
271
|
+
import ChatPage from '@martyrs/src/modules/chats/components/pages/ChatPage.vue';
|
|
215
272
|
|
|
216
273
|
import StatusHistory from '@martyrs/src/modules/orders/components/blocks/StatusHistory.vue'
|
|
217
274
|
import PriceTotal from '@martyrs/src/modules/orders/components/elements/PriceTotal.vue';
|
|
218
|
-
|
|
275
|
+
import FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'
|
|
219
276
|
|
|
220
277
|
import * as globals from '@martyrs/src/modules/globals/views/store/globals'
|
|
221
278
|
import * as auth from '@martyrs/src/modules/auth/views/store/auth'
|
|
@@ -234,13 +291,9 @@
|
|
|
234
291
|
const productsOrganization = ref(null)
|
|
235
292
|
const orderOrganization = ref(null)
|
|
236
293
|
|
|
237
|
-
const statuses =
|
|
294
|
+
const statuses = globals.state.options.orders.statuses
|
|
238
295
|
const statusLabels = ['Created', 'Confirmed', 'Preparing', 'In use', 'Finished'];
|
|
239
296
|
|
|
240
|
-
const isActiveStatus = (index) => {
|
|
241
|
-
return statuses.slice(index).includes(order.value.status);
|
|
242
|
-
};
|
|
243
|
-
|
|
244
297
|
if (route.meta.context === 'user' &&
|
|
245
298
|
auth.state.user &&
|
|
246
299
|
route.params._id !== auth.state.user?._id &&
|
|
@@ -248,13 +301,6 @@
|
|
|
248
301
|
!auth.state.access?.roles?.includes('ROLE_ADMIN')) {
|
|
249
302
|
router.push('/401');
|
|
250
303
|
}
|
|
251
|
-
// description: 'Your order has been successfully created. Our manager will contact you within five minutes to confirm your order.'
|
|
252
|
-
// description: 'Your order has been confirmed. We are now processing your items and preparing them for shipment.'
|
|
253
|
-
// description: 'Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information.'
|
|
254
|
-
// description: 'Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information.'
|
|
255
|
-
// description: 'Your order is currently in transit. Our delivery team is working hard to get your items to you as soon as possible.'
|
|
256
|
-
// description: 'Congratulations! Your order has been successfully delivered. If you have any concerns or feedback, feel free to contact us.'
|
|
257
|
-
|
|
258
304
|
|
|
259
305
|
const isOpeStatusPopup = ref(false);
|
|
260
306
|
const selectedMember = ref(null);
|
|
@@ -269,6 +315,24 @@
|
|
|
269
315
|
selectedMember.value = null;
|
|
270
316
|
}
|
|
271
317
|
|
|
318
|
+
const isOpenPaymentPopup = ref(false);
|
|
319
|
+
|
|
320
|
+
const selectedPayments = ref({
|
|
321
|
+
type: null,
|
|
322
|
+
status: null
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
function openPaymentPopup() {
|
|
326
|
+
selectedPayments.value.type = order.value.payment.type
|
|
327
|
+
selectedPayments.value.status = order.value.payment.status
|
|
328
|
+
|
|
329
|
+
isOpenPaymentPopup.value = true;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
function closePaymentPopup() {
|
|
333
|
+
isOpenPaymentPopup.value = false;
|
|
334
|
+
}
|
|
335
|
+
|
|
272
336
|
onMounted(async()=>{
|
|
273
337
|
order.value = await orders.actions.read({_id: route.params.order})
|
|
274
338
|
order.value = order.value[0]
|
|
@@ -276,6 +340,7 @@
|
|
|
276
340
|
orderOrganization.value = await organizations.actions.read({
|
|
277
341
|
_id: order.value?.owner.target._id,
|
|
278
342
|
location: globals.state.position?.location,
|
|
343
|
+
lookup: ['spots']
|
|
279
344
|
});
|
|
280
345
|
|
|
281
346
|
})
|
|
@@ -309,25 +374,37 @@
|
|
|
309
374
|
await orders.actions.update(orders.state.current)
|
|
310
375
|
}
|
|
311
376
|
|
|
377
|
+
|
|
312
378
|
function getNextStatus(currentStatus) {
|
|
313
|
-
|
|
379
|
+
const currentIndex = globals.state.options.orders.statuses.findIndex(status => status.value === currentStatus);
|
|
314
380
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
381
|
+
if (currentIndex !== -1 && currentIndex + 1 < statuses.length) {
|
|
382
|
+
return globals.state.options.orders.statuses[currentIndex + 1];
|
|
383
|
+
}
|
|
384
|
+
return null; // If next status doesn't exist
|
|
385
|
+
}
|
|
320
386
|
|
|
321
|
-
|
|
322
|
-
|
|
387
|
+
const isActiveStatus = (index) => {
|
|
388
|
+
return globals.state.options.orders.statuses.slice(index).some(status => status.value === order.value.status);
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
async function changePaymentStatus() {
|
|
392
|
+
if (selectedPayments.value.status && selectedPayments.value.type) {
|
|
393
|
+
orders.state.current.payment = selectedPayments.value;
|
|
394
|
+
|
|
395
|
+
await orders.actions.update(orders.state.current)
|
|
396
|
+
} else {
|
|
397
|
+
console.error('Payment status is void. Must handle somehow.');
|
|
398
|
+
}
|
|
323
399
|
|
|
324
|
-
|
|
400
|
+
closePaymentPopup()
|
|
325
401
|
}
|
|
402
|
+
|
|
326
403
|
async function setNextStatus() {
|
|
327
404
|
const nextStatus = getNextStatus(orders.state.current.status);
|
|
328
405
|
|
|
329
406
|
if (nextStatus) {
|
|
330
|
-
orders.state.current.status = nextStatus;
|
|
407
|
+
orders.state.current.status = nextStatus.value;
|
|
331
408
|
|
|
332
409
|
await orders.actions.update(orders.state.current)
|
|
333
410
|
} else {
|
|
@@ -352,11 +429,6 @@
|
|
|
352
429
|
orders.state.current.status = 'confirmed';
|
|
353
430
|
|
|
354
431
|
await orders.actions.update(orders.state.current)
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
function requestPayment(order) {
|
|
359
|
-
// store.dispatch("payments/newPayment", order);
|
|
360
432
|
}
|
|
361
433
|
|
|
362
434
|
function calculateDeliveryTime(distance, date) {
|
|
@@ -371,9 +443,6 @@
|
|
|
371
443
|
const startTime = new Date(date).getTime();
|
|
372
444
|
const estimatedDeliveryTime = new Date(startTime + basePreparationTime + travelTime);
|
|
373
445
|
|
|
374
|
-
console.log(date)
|
|
375
|
-
console.log(estimatedDeliveryTime)
|
|
376
|
-
|
|
377
446
|
return estimatedDeliveryTime;
|
|
378
447
|
}
|
|
379
448
|
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
<FormPayment
|
|
28
28
|
v-if="orders.state.current.status !== true && shopcart.state.positions.length > 0"
|
|
29
29
|
:order="orders.state.current"
|
|
30
|
+
:organization="orderOrganization[0]"
|
|
30
31
|
/>
|
|
31
32
|
<FormDelivery
|
|
32
33
|
v-if="orders.state.current.status !== true && shopcart.state.positions.length > 0"
|
|
33
|
-
:order="orders.state.current"
|
|
34
|
+
:order="orders.state.current"
|
|
35
|
+
:organization="orderOrganization[0]"
|
|
34
36
|
/>
|
|
35
37
|
|
|
36
38
|
</div>
|
|
@@ -180,17 +182,10 @@ onMounted(async()=> {
|
|
|
180
182
|
orderOrganization.value = await organizations.actions.read({
|
|
181
183
|
_id: shopcart.state.organization,
|
|
182
184
|
location: globals.state.position?.location,
|
|
185
|
+
lookup: ['spots']
|
|
183
186
|
})
|
|
184
187
|
})
|
|
185
|
-
|
|
186
|
-
// WATCHERS
|
|
187
|
-
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
188
|
-
watch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {
|
|
189
|
-
orderOrganization.value = await organizations.actions.read({
|
|
190
|
-
_id: shopcart.state.organization,
|
|
191
|
-
location: orders.state.current.delivery.location,
|
|
192
|
-
})
|
|
193
|
-
}, { deep: true })
|
|
188
|
+
|
|
194
189
|
/////////////////////////////
|
|
195
190
|
// Store Verification
|
|
196
191
|
/////////////////////////////
|
|
@@ -1,60 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Block title="Delivery">
|
|
3
3
|
<h5 class="font-second mn-b-thin">Select delivery type</h5>
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
<div class="mn-b-small flex-nowrap flex" v-if="availableDeliveryTypes.length">
|
|
5
6
|
<Radio
|
|
7
|
+
v-for="type in availableDeliveryTypes"
|
|
8
|
+
:key="type"
|
|
6
9
|
v-model:radio="order.delivery.type"
|
|
7
|
-
label="
|
|
8
|
-
value="
|
|
9
|
-
class="bg-white pd-medium radius-small w-100 mn-r-small"
|
|
10
|
-
/>
|
|
11
|
-
<Radio
|
|
12
|
-
v-model:radio="order.delivery.type"
|
|
13
|
-
label="Courier"
|
|
14
|
-
value="courier"
|
|
10
|
+
:label="capitalize(type)"
|
|
11
|
+
:value="type"
|
|
15
12
|
class="bg-white pd-medium radius-small w-100 mn-r-small"
|
|
16
13
|
/>
|
|
17
14
|
</div>
|
|
15
|
+
<div v-else>No delivery options available.</div>
|
|
18
16
|
|
|
19
17
|
<!-- Раздел для Pickup -->
|
|
20
18
|
<template v-if="order.delivery.type === 'pickup'">
|
|
21
19
|
<h5 class="font-second mn-b-thin">Select pickup spot</h5>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
limit: 10
|
|
35
|
-
}"
|
|
36
|
-
v-slot="{
|
|
37
|
-
items
|
|
38
|
-
}"
|
|
39
|
-
class=""
|
|
40
|
-
>
|
|
41
|
-
<CardSpot
|
|
42
|
-
v-for="(spot, index) in items"
|
|
43
|
-
:key="index"
|
|
44
|
-
:spot="spot"
|
|
45
|
-
:organization="order.organization"
|
|
46
|
-
:editAcess="false"
|
|
47
|
-
:showDeliveryOptions="false"
|
|
48
|
-
:showPaymentOptions="false"
|
|
49
|
-
:selected="order.delivery.spot === spot._id"
|
|
50
|
-
@click="() => order.delivery.spot = order.delivery.spot === spot._id ? null : spot._id"
|
|
51
|
-
class="mn-b-thin radius-medium o-hidden bg-white"
|
|
52
|
-
/>
|
|
53
|
-
</Feed>
|
|
20
|
+
<CardSpot
|
|
21
|
+
v-for="(spot, index) in organization?.spots.filter(item => item.delivery?.includes('pickup'))"
|
|
22
|
+
:key="index"
|
|
23
|
+
:spot="spot"
|
|
24
|
+
:organization="order.organization"
|
|
25
|
+
:editAcess="false"
|
|
26
|
+
:showDeliveryOptions="false"
|
|
27
|
+
:showPaymentOptions="false"
|
|
28
|
+
:selected="order.delivery.spot === spot._id"
|
|
29
|
+
@click="() => order.delivery.spot = order.delivery.spot === spot._id ? null : spot._id"
|
|
30
|
+
class="mn-b-thin radius-medium o-hidden bg-white"
|
|
31
|
+
/>
|
|
54
32
|
</template>
|
|
55
33
|
|
|
56
34
|
<!-- Раздел для Courier -->
|
|
57
|
-
<template v-else-if="order.delivery.type === 'courier'">
|
|
35
|
+
<template v-else-if="order.delivery.type === 'courier' || order.delivery.type === 'post'">
|
|
58
36
|
<h5 class="font-second mn-b-thin">Address</h5>
|
|
59
37
|
<Address
|
|
60
38
|
label="Location"
|
|
@@ -91,7 +69,7 @@
|
|
|
91
69
|
</template>
|
|
92
70
|
|
|
93
71
|
<script setup>
|
|
94
|
-
import { watch, onMounted } from 'vue';
|
|
72
|
+
import { watch, computed, onMounted } from 'vue';
|
|
95
73
|
import { useRoute } from 'vue-router';
|
|
96
74
|
|
|
97
75
|
import Feed from '@martyrs/src/components/Feed/Feed.vue';
|
|
@@ -106,6 +84,7 @@ import Field from '@martyrs/src/components/Field/Field.vue';
|
|
|
106
84
|
|
|
107
85
|
const props = defineProps({
|
|
108
86
|
order: Object,
|
|
87
|
+
organization: Object,
|
|
109
88
|
});
|
|
110
89
|
|
|
111
90
|
const route = useRoute();
|
|
@@ -124,4 +103,17 @@ onMounted(() => {
|
|
|
124
103
|
props.order.delivery.location = globals.state.position.location;
|
|
125
104
|
}
|
|
126
105
|
});
|
|
106
|
+
|
|
107
|
+
const availableDeliveryTypes = computed(() => {
|
|
108
|
+
const types = new Set()
|
|
109
|
+
props.organization?.spots?.forEach(spot => {
|
|
110
|
+
spot.delivery?.forEach(type => types.add(type))
|
|
111
|
+
})
|
|
112
|
+
return Array.from(types)
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
function capitalize(str) {
|
|
116
|
+
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
117
|
+
}
|
|
118
|
+
|
|
127
119
|
</script>
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
<div class="mn-b-small flex-nowrap flex">
|
|
4
4
|
<Select
|
|
5
5
|
v-model:select="order.payment.type"
|
|
6
|
-
:
|
|
7
|
-
:options="[
|
|
8
|
-
{name: 'Cash', value: 'cash'},
|
|
9
|
-
{name: 'Card', value: 'card'},
|
|
10
|
-
{name: 'Bank Transfer', value: 'bank'},
|
|
11
|
-
]"
|
|
6
|
+
:options="availablePaymentTypes"
|
|
12
7
|
placeholder="Select type of payment"
|
|
13
8
|
size="small"
|
|
14
9
|
class="bg-white pd-medium radius-small w-100"
|
|
@@ -18,10 +13,25 @@
|
|
|
18
13
|
</template>
|
|
19
14
|
|
|
20
15
|
<script setup>
|
|
16
|
+
|
|
17
|
+
import { computed } from 'vue';
|
|
18
|
+
|
|
21
19
|
import Block from '@martyrs/src/components/Block/Block.vue'
|
|
22
20
|
import Select from '@martyrs/src/components/Select/Select.vue'
|
|
23
21
|
|
|
24
|
-
defineProps({
|
|
22
|
+
const props = defineProps({
|
|
25
23
|
order: Object,
|
|
24
|
+
organization: Object,
|
|
26
25
|
});
|
|
26
|
+
|
|
27
|
+
const availablePaymentTypes = computed(() => {
|
|
28
|
+
const types = new Set()
|
|
29
|
+
props.organization?.spots?.forEach(spot => {
|
|
30
|
+
spot.payment?.forEach(type => types.add(type))
|
|
31
|
+
})
|
|
32
|
+
return Array.from(types)
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
27
37
|
</script>
|
|
@@ -324,7 +324,17 @@ const controllerFactory = (db) => {
|
|
|
324
324
|
// }
|
|
325
325
|
|
|
326
326
|
// Save the order first
|
|
327
|
+
if (req.body.payment?.type && req.body.payment.type !== order.payment?.type) {
|
|
328
|
+
order.payment.type = req.body.payment.type;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// Update payment.status if changed
|
|
332
|
+
if (req.body.payment?.status && req.body.payment.status !== order.payment?.status) {
|
|
333
|
+
order.payment.status = req.body.payment.status;
|
|
334
|
+
}
|
|
335
|
+
|
|
327
336
|
await order.save();
|
|
337
|
+
|
|
328
338
|
|
|
329
339
|
// Send notification if status changed
|
|
330
340
|
if (statusChanged) {
|
|
@@ -94,6 +94,71 @@ const mutations = {
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
|
|
97
|
+
|
|
98
|
+
addProductToCart(state, product, organization, date) {
|
|
99
|
+
const cartItem = state.positions.find(
|
|
100
|
+
(item) => item._id === product._id
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
if (cartItem) {
|
|
104
|
+
cartItem.quantity++;
|
|
105
|
+
} else {
|
|
106
|
+
state.positions.push({
|
|
107
|
+
_id: product._id,
|
|
108
|
+
images: product.images,
|
|
109
|
+
name: product.name,
|
|
110
|
+
listing: product.listing,
|
|
111
|
+
price: product.price,
|
|
112
|
+
price_currency: product.price_currency,
|
|
113
|
+
quantity: 1,
|
|
114
|
+
date: date,
|
|
115
|
+
org_id: organization, // Добавляем _id организации к каждому продукту
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
removeProduct(state, _id) {
|
|
122
|
+
const cartItem = state.positions.find(
|
|
123
|
+
(item) => item._id === _id
|
|
124
|
+
);
|
|
125
|
+
const cartItemIndex = state.positions.indexOf(cartItem);
|
|
126
|
+
|
|
127
|
+
if (cartItemIndex > -1) {
|
|
128
|
+
state.positions.splice(cartItemIndex, 1);
|
|
129
|
+
|
|
130
|
+
// Сохраняем весь объект корзины, а не только позиции
|
|
131
|
+
localStorage.setItem('shopcart', JSON.stringify({
|
|
132
|
+
positions: state.positions,
|
|
133
|
+
organization: state.organization
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
decrementItemQuantity(state, _id) {
|
|
140
|
+
const cartItem = state.positions.find(
|
|
141
|
+
(item) => item._id === _id
|
|
142
|
+
);
|
|
143
|
+
const cartItemIndex = state.positions.indexOf(cartItem);
|
|
144
|
+
|
|
145
|
+
if (cartItemIndex > -1) {
|
|
146
|
+
cartItem.quantity--;
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
incrementItemQuantity(state, _id) {
|
|
152
|
+
const cartItem = state.positions.find(
|
|
153
|
+
(item) => item._id === _id
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
if (cartItem) {
|
|
157
|
+
cartItem.quantity++;
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
|
|
97
162
|
resetCustomer(stateObject) {
|
|
98
163
|
Object.assign(stateObject, customerInitState);
|
|
99
164
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="embla" ref="emblaNode">
|
|
3
3
|
<div class="embla__container">
|
|
4
4
|
<div
|
|
5
|
-
class="embla__slide h-100 pos-
|
|
5
|
+
class="embla__slide h-100 pos-relative pd-nano"
|
|
6
6
|
v-for="(value, key) in productsState"
|
|
7
7
|
:key="value?._id || key"
|
|
8
8
|
>
|
|
@@ -37,8 +37,11 @@ import { useRouter } from 'vue-router'
|
|
|
37
37
|
|
|
38
38
|
import emblaCarouselVue from 'embla-carousel-vue'
|
|
39
39
|
import Autoplay from 'embla-carousel-autoplay'
|
|
40
|
+
|
|
40
41
|
import Loader from '@martyrs/src/components/Loader/Loader.vue'
|
|
42
|
+
|
|
41
43
|
import CardProduct from '@martyrs/src/modules/products/components/blocks/CardProduct.vue'
|
|
44
|
+
|
|
42
45
|
import * as products from '@martyrs/src/modules/products/store/products'
|
|
43
46
|
|
|
44
47
|
const router = useRouter()
|