@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
|
@@ -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
|
/////////////////////////////
|
|
@@ -265,14 +260,14 @@ async function handleCreate() {
|
|
|
265
260
|
let order = await orders.actions.create(orders.state.current);
|
|
266
261
|
|
|
267
262
|
if (order) {
|
|
268
|
-
shopcart.actions.resetShopcart()
|
|
269
|
-
|
|
270
263
|
router.push({
|
|
271
264
|
name: 'Order',
|
|
272
265
|
params: {
|
|
273
266
|
order: order._id
|
|
274
267
|
}
|
|
275
268
|
})
|
|
269
|
+
|
|
270
|
+
shopcart.actions.resetShopcart()
|
|
276
271
|
} else {
|
|
277
272
|
alert('something wrong')
|
|
278
273
|
}
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
state: null
|
|
54
54
|
}"
|
|
55
55
|
:options="{
|
|
56
|
-
|
|
56
|
+
owner: route.params._id
|
|
57
57
|
}"
|
|
58
58
|
v-slot="{
|
|
59
59
|
items
|
|
@@ -165,12 +165,14 @@
|
|
|
165
165
|
|
|
166
166
|
<FormDelivery
|
|
167
167
|
v-if="tabOrderCreate === 'delivery'"
|
|
168
|
-
:order="orders.state.current"
|
|
168
|
+
:order="orders.state.current"
|
|
169
|
+
:organization="orderOrganization[0]"
|
|
169
170
|
/>
|
|
170
171
|
|
|
171
172
|
<FormPayment
|
|
172
173
|
v-if="tabOrderCreate === 'payment'"
|
|
173
174
|
:order="orders.state.current"
|
|
175
|
+
:organization="orderOrganization[0]"
|
|
174
176
|
/>
|
|
175
177
|
|
|
176
178
|
<Popup
|
|
@@ -223,6 +225,7 @@
|
|
|
223
225
|
import * as globals from '@martyrs/src/modules/globals/views/store/globals';
|
|
224
226
|
import * as auth from '@martyrs/src/modules/auth/views/store/auth';
|
|
225
227
|
import * as orders from '@martyrs/src/modules/orders/store/orders';
|
|
228
|
+
import * as organizations from '@martyrs/src/modules/organizations/store/organizations';
|
|
226
229
|
import * as products from '@martyrs/src/modules/products/store/products';
|
|
227
230
|
|
|
228
231
|
import customers from '@martyrs/src/modules/orders/store/customers.store';
|
|
@@ -296,7 +299,16 @@
|
|
|
296
299
|
})
|
|
297
300
|
}
|
|
298
301
|
|
|
299
|
-
|
|
302
|
+
const orderOrganization = ref({})
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
onMounted(async() => {
|
|
307
|
+
|
|
308
|
+
orderOrganization.value = await organizations.actions.read({
|
|
309
|
+
_id: route.params._id,
|
|
310
|
+
lookup: ['spots']
|
|
311
|
+
})
|
|
300
312
|
|
|
301
313
|
// await orders.actions.fetchOrder(route.params.id) // Implement this action in your store
|
|
302
314
|
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
v-if="!MOBILE_APP"
|
|
5
5
|
title="Orders"
|
|
6
6
|
:actions="[
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
route.meta.context === 'backoffice' && { to: { name: 'BackofficeAdminCreateOrder' }, label: 'Create Order' },
|
|
8
|
+
route.meta.context === 'organization' && { to: { name: 'OrganizationAdminCreateOrder', params: { _id: route.params._id}}, label: 'Create Order' }
|
|
9
|
+
].filter(Boolean)"
|
|
9
10
|
class="mn-b-small"
|
|
10
11
|
/>
|
|
11
12
|
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
}"
|
|
45
46
|
:options="{
|
|
46
47
|
limit: 15,
|
|
47
|
-
...(route.meta.context === 'organization' && {
|
|
48
|
+
...(route.meta.context === 'organization' && { owner: route.params._id }),
|
|
48
49
|
...(route.meta.context === 'user' && { customer: route.params._id }),
|
|
49
50
|
...(tab !== 'all' && { status: tab })
|
|
50
51
|
}"
|
|
@@ -62,98 +63,14 @@
|
|
|
62
63
|
? { order: order._id }
|
|
63
64
|
: { order: order._id, organization: order.owner.target || order.owner._id }
|
|
64
65
|
}"
|
|
65
|
-
class="bg-light pos-relative pd-medium radius-big"
|
|
66
66
|
>
|
|
67
|
-
<
|
|
68
|
-
:
|
|
69
|
-
:entityType="'order'"
|
|
67
|
+
<CardOrderBackoffice
|
|
68
|
+
:order="order"
|
|
70
69
|
:user="auth.state.user"
|
|
71
|
-
:
|
|
72
|
-
:
|
|
73
|
-
:
|
|
74
|
-
class="mn-b-small"
|
|
70
|
+
:formatDate="formatDate"
|
|
71
|
+
:getTotal="orders.getters.getTotal"
|
|
72
|
+
:currency="returnCurrency()"
|
|
75
73
|
/>
|
|
76
|
-
|
|
77
|
-
<div class="mn-b-small pd-small bg-white radius-small flex-nowrap flex">
|
|
78
|
-
<div class="w-100">
|
|
79
|
-
<!-- <h3 class="mn-b-thin">{{order.customer.target.profile?.name || order.customer.target.phone || order.customer.target.email || 'No name'}}</h3> -->
|
|
80
|
-
<p class="t-truncate">{{order.delivery.address || 'Not specified'}}</p>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<div class=" w-100 t-right">
|
|
84
|
-
<h3 class="mn-b-thin">{{returnCurrency()}}{{orders.getters.getTotal(order.positions)}}</h3>
|
|
85
|
-
<p>#{{order._id.slice(0, 4) + '...' + order._id.slice(-4)}}</p>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<div class="cols-1 mn-b-small gap-thin pd-small bg-white radius-small">
|
|
90
|
-
<!-- Always display the first two positions -->
|
|
91
|
-
<div
|
|
92
|
-
v-for="(position, index) in order.positions.slice(0, 2)"
|
|
93
|
-
:key="index"
|
|
94
|
-
class="w-100 flex"
|
|
95
|
-
>
|
|
96
|
-
<p class="mn-r-auto">{{ position.name }}</p>
|
|
97
|
-
<p class="t-right">
|
|
98
|
-
{{ position.quantity }} {{ position.type }}
|
|
99
|
-
x
|
|
100
|
-
{{ position.price }}
|
|
101
|
-
<span class="t-transp">{{ returnCurrency() }}</span>
|
|
102
|
-
</p>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<transition name="fade">
|
|
106
|
-
<!-- Display the rest of the positions if there are more than two and spoiler is true -->
|
|
107
|
-
<div v-if="spoiler && order.positions.length > 2">
|
|
108
|
-
<div
|
|
109
|
-
v-for="(position, index) in order.positions.slice(2)"
|
|
110
|
-
:key="index + 2"
|
|
111
|
-
class="w-100 flex"
|
|
112
|
-
>
|
|
113
|
-
<p class="mn-r-auto">{{ position.name }}</p>
|
|
114
|
-
<p class="t-right">
|
|
115
|
-
{{ position.quantity }} {{ position.type }}
|
|
116
|
-
x
|
|
117
|
-
{{ position.price }}
|
|
118
|
-
<span class="t-transp">{{ returnCurrency() }}</span>
|
|
119
|
-
</p>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
</transition>
|
|
123
|
-
|
|
124
|
-
<!-- Toggle button for additional positions, visible only if there are more than two positions -->
|
|
125
|
-
<button
|
|
126
|
-
v-if="order.positions.length > 2"
|
|
127
|
-
@click.prevent="spoiler = !spoiler"
|
|
128
|
-
class="radius-big bg-light-transp-50 pd-nano w-100 flex-center flex"
|
|
129
|
-
>
|
|
130
|
-
{{ !spoiler ? `+${order.positions.length - 2} more` : `Hide` }}
|
|
131
|
-
</button>
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<div class="pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex">
|
|
136
|
-
<IconTime class="i-semi t-transp" fill="rgb(var(--black)" />
|
|
137
|
-
<p class="t-medium mn-r-auto">{{formatDate(order.deadline)}}</p>
|
|
138
|
-
|
|
139
|
-
<span
|
|
140
|
-
class="flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"
|
|
141
|
-
>
|
|
142
|
-
{{order.status}}
|
|
143
|
-
</span>
|
|
144
|
-
|
|
145
|
-
<span
|
|
146
|
-
class="flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin t-white bg-red"
|
|
147
|
-
>
|
|
148
|
-
Unpaid
|
|
149
|
-
</span>
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
<div v-if="order.comment" class="pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small">
|
|
154
|
-
<p class="mn-b-thin t-transp uppercase p-small t-medium">Comment</p>
|
|
155
|
-
<p>{{order.comment}}</p>
|
|
156
|
-
</div>
|
|
157
74
|
</router-link>
|
|
158
75
|
|
|
159
76
|
<router-link
|
|
@@ -192,7 +109,7 @@
|
|
|
192
109
|
import CardOrder from '@martyrs/src/modules/orders/components/blocks/CardOrder.vue'
|
|
193
110
|
|
|
194
111
|
import CardOrderUser from '@martyrs/src/modules/orders/components/blocks/CardOrderUser.vue'
|
|
195
|
-
import
|
|
112
|
+
import CardOrderBackoffice from '@martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue'
|
|
196
113
|
|
|
197
114
|
import SectionPageTitle from '@martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue'
|
|
198
115
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- ---------------------------------------------------------------- -->
|
|
4
4
|
<!-- 01. Popup Header -->
|
|
5
5
|
<!-- ---------------------------------------------------------------- -->
|
|
6
|
-
<div class="
|
|
6
|
+
<div class="flex-nowrap flex">
|
|
7
7
|
<div class="mn-b-medium w-100">
|
|
8
8
|
<h4 class="mn-b-thin p-big">{{t('title')}}</h4>
|
|
9
9
|
<p class="t-transp p-small">{{t('subtitle')}} {{ t('positions', { count: StoreCartAmount }) }}</p>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<!-- ---------------------------------------------------------------- -->
|
|
14
14
|
<!-- 02. Popup Content -->
|
|
15
15
|
<!-- ---------------------------------------------------------------- -->
|
|
16
|
-
<div class="
|
|
16
|
+
<div class="h-100 flex flex-column w-100 pos-relative o-x-hidden o-y-scroll gap-small shopcart-content">
|
|
17
17
|
<!-- Empty State -->
|
|
18
18
|
<p v-if="!(shopcart.state.positions.length > 0)" class="mn-t-medium"><i>{{t('emptystate')}}</i></p>
|
|
19
19
|
<!-- Shopcart positions -->
|