@ozdao/prometheus-framework 0.2.91 → 0.2.93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/events.server.js +19 -9
- package/dist/events.server.mjs +19 -9
- package/dist/main-CX2ISR43.mjs +13629 -0
- package/dist/main-cffh4bbv.js +92 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +32 -18
- package/dist/orders.server.mjs +32 -18
- package/dist/organizations.server.js +2 -1
- package/dist/organizations.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +14 -48
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +85 -25
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +74 -63
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.js +74 -0
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/landing.client.js +4 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +28 -28
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +7 -9
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +27 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +46 -43
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +37 -26
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +14 -15
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-CQQEUA9l.js +1 -0
- package/dist/web-D2Em-p-C.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +23 -34
- package/src/components/LocationMarker/LocationMarker.vue +6 -1
- package/src/components/LocationSelection/LocationSelection.vue +4 -0
- package/src/components/Map/Map.vue +29 -15
- package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
- package/src/modules/events/components/layouts/layoutEvents.vue +2 -59
- package/src/modules/events/components/pages/Events.vue +106 -23
- package/src/modules/events/controllers/events.controller.js +10 -7
- package/src/modules/globals/components/blocks/CardHeader.vue +31 -6
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
- package/src/modules/landing/components/pages/Farming.vue +226 -0
- package/src/modules/landing/components/pages/Governance.vue +3 -5
- package/src/modules/landing/components/pages/Home.vue +0 -3
- package/src/modules/landing/components/pages/Hotel.vue +1 -3
- package/src/modules/landing/components/pages/Page.vue +0 -3
- package/src/modules/landing/components/sections/Examples.vue +4 -56
- package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
- package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
- package/src/modules/landing/landing.client.js +3 -1
- package/src/modules/landing/router/landing.js +11 -0
- package/src/modules/marketplace/components/sections/Filters.vue +26 -23
- package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
- package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
- package/src/modules/orders/components/pages/Order.vue +2 -6
- package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
- package/src/modules/orders/components/pages/Orders.vue +60 -11
- package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
- package/src/modules/orders/components/sections/SubscribeNewsletter.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +29 -18
- package/src/modules/orders/models/order.model.js +8 -2
- package/src/modules/orders/router/orders.backoffice.router.js +3 -5
- package/src/modules/orders/router/orders.router.js +2 -2
- package/src/modules/orders/store/orders.js +3 -7
- package/src/modules/orders/store/shopcart.js +1 -1
- package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
- package/src/modules/organizations/components/pages/Department.vue +5 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
- package/src/modules/organizations/components/pages/Members.vue +2 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +3 -1
- package/src/modules/organizations/store/memberships.js +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +32 -22
- package/src/modules/products/components/pages/ProductEdit.vue +10 -13
- package/src/modules/products/components/pages/Products.vue +2 -0
- package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
- package/src/modules/products/store/products.js +25 -2
- package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
- package/src/modules/users/components/blocks/CardUser.vue +1 -0
- package/src/modules/landing/components/sections/AboutSection.vue +0 -69
@@ -0,0 +1,393 @@
|
|
1
|
+
<template>
|
2
|
+
<div v-if="order && orderOrganization" class="pd-thin">
|
3
|
+
|
4
|
+
<SectionPageTitle
|
5
|
+
:title="`Order is ${order.status}`"
|
6
|
+
class="mn-b-small bg-grey bg-grey radius-big"
|
7
|
+
/>
|
8
|
+
|
9
|
+
<div v-if="order" class="mn-b-thin pos-relative w-100 bg-main radius-big pd-big">
|
10
|
+
<div class="mn-b-small flex-nowrap flex">
|
11
|
+
<p class="t-medium p-medium mn-r-auto">
|
12
|
+
Progress
|
13
|
+
</p>
|
14
|
+
|
15
|
+
<p class="t-medium p-medium">
|
16
|
+
Order No: <span class="p-small t-transp">#{{order._id}}</span>
|
17
|
+
</p>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
|
21
|
+
<h2 class="mn-b-small"></h2>
|
22
|
+
|
23
|
+
<div class="radius-extra mn-b-medium flex-nowrap flex pos-relative ">
|
24
|
+
<div v-for="(status, index) in statuses" :key="index" class="mn-r-thin w-20">
|
25
|
+
<div
|
26
|
+
class="bg-grey br-anim br-glow radius-extra h-1r w-100"
|
27
|
+
:class="
|
28
|
+
{ 'br-glow-anim': isActiveStatus(index) },
|
29
|
+
{ 't-transp': !isActiveStatus(index) },
|
30
|
+
{ 'blink': order.status === statuses[index] && getNextStatus(order.status) }
|
31
|
+
"
|
32
|
+
/>
|
33
|
+
<div
|
34
|
+
:class="{ 't-transp': !isActiveStatus(index) }"
|
35
|
+
class="mn-t-thin t-medium uppercase">{{ statusLabels[index] }}</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="flex-nowrap flex">
|
40
|
+
<div class="w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20">
|
41
|
+
<IconTime class="i-semi t-transp" fill="rgb(var(--black)" />
|
42
|
+
<p class="t-medium mn-r-auto">Estimated Arrival {{formatDate(order.deadline)}}</p>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<button v-if="getNextStatus(order.status) && route.name === 'Order Edit'" @click="openStatusPopup" class="mn-l-auto bg-black t-white button">
|
46
|
+
Mark as {{ getStatusLabel(getNextStatus(order.status)) }}
|
47
|
+
</button>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<Popup
|
52
|
+
title="Change status"
|
53
|
+
@close-popup="closeStatusPopup"
|
54
|
+
:isPopupOpen="isOpeStatusPopup"
|
55
|
+
class="bg-white w-min-30r w-max-30r radius-big pd-big"
|
56
|
+
>
|
57
|
+
<p class="bg-grey radius-small pd-small mn-b-thin">Estimated Arrival {{formatDate(order.deadline)}}</p>
|
58
|
+
<ul class="bg-grey pd-small radius-small flex gap-thin flex-column mn-b-semi">
|
59
|
+
<CardOrderItem
|
60
|
+
v-for="(product, index) in orderProducts" :key="product._id"
|
61
|
+
:editable="false"
|
62
|
+
:product="product"
|
63
|
+
/>
|
64
|
+
</ul>
|
65
|
+
<button @click="setNextStatus" class="w-100 bg-black-small t-white button">
|
66
|
+
{{'Confirm Changing to ' + getStatusLabel(getNextStatus(order.status))}}
|
67
|
+
</button>
|
68
|
+
</Popup>
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
<div v-if="order" class="gap-thin cols-2">
|
73
|
+
|
74
|
+
<div class="w-100">
|
75
|
+
|
76
|
+
|
77
|
+
<CardOrganization
|
78
|
+
v-if="orderOrganization[0]"
|
79
|
+
:organization="orderOrganization[0]"
|
80
|
+
:showRating="true"
|
81
|
+
:showFollowers="false"
|
82
|
+
:showProducts="false"
|
83
|
+
class="bg-grey mn-b-thin w-100 o-hidden radius-big pd-small "
|
84
|
+
/>
|
85
|
+
|
86
|
+
|
87
|
+
<div
|
88
|
+
class="mn-b-thin bg-grey w-100 o-hidden radius-medium "
|
89
|
+
>
|
90
|
+
<div class="pd-small flex-nowrap flex">
|
91
|
+
<div class="mn-r-auto">
|
92
|
+
<span class="d-block t-medium p-medium">Your order is</span>
|
93
|
+
<span class=" t-lh-075 h2 d-block mn-b-small">{{order.status}}</span>
|
94
|
+
<p class="pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max">as on 29 aug 2021, Friday</p>
|
95
|
+
</div>
|
96
|
+
<div class="t-right">
|
97
|
+
Cancel order<br>
|
98
|
+
Exchange item
|
99
|
+
<hr class="mn-b-thin mn-t-thin">
|
100
|
+
For Delivery Queries Contact Us
|
101
|
+
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<div class="pd-small cols-2 br-t br-black-transp-10 br-solid">
|
106
|
+
<p class="w-100 t-medium p-medium">
|
107
|
+
Phone
|
108
|
+
</p>
|
109
|
+
|
110
|
+
<p class="w-100 t-right ">
|
111
|
+
{{order.user?.number}}
|
112
|
+
</p>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div v-if="order.user?.messenger.type" class="pd-small cols-2 br-t br-black-transp-10 br-solid">
|
116
|
+
<p class="w-100 t-medium p-medium">
|
117
|
+
{{order.user?.messenger.type}}
|
118
|
+
</p>
|
119
|
+
|
120
|
+
<p class="w-100 t-right ">
|
121
|
+
{{order.user?.messenger.value}}
|
122
|
+
</p>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div class="pd-small cols-2 br-t br-black-transp-10 br-solid">
|
126
|
+
<p class="t-medium p-medium">
|
127
|
+
Address
|
128
|
+
</p>
|
129
|
+
|
130
|
+
<p class="w-100 t-right">
|
131
|
+
<!-- {{order.delivery?.address.slice(0,64)}} -->
|
132
|
+
</p>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<div class="pd-small cols-2 br-t br-black-transp-10 br-solid">
|
136
|
+
<p class="mn-b-small t-medium p-medium">
|
137
|
+
Delivery
|
138
|
+
</p>
|
139
|
+
|
140
|
+
<p class="w-100 t-right mn-b-small">
|
141
|
+
{{order.delivery?.type}}
|
142
|
+
</p>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
<StatusHistory
|
148
|
+
v-if="orders.state.current.status_history"
|
149
|
+
:statuses="statuses"
|
150
|
+
:statusHistory="orders.state.current.status_history"
|
151
|
+
:statusCurrent="orders.state.current.status"
|
152
|
+
:edit="route.name === 'Order Edit'"
|
153
|
+
/>
|
154
|
+
|
155
|
+
<!-- <button
|
156
|
+
@click="requestPayment(order)"
|
157
|
+
v-if="
|
158
|
+
order.status === 'Подтвержден'
|
159
|
+
&& order.payment.type === 'Online'
|
160
|
+
&& payment.Status !== 'CONFIRMED'
|
161
|
+
&& payment.Status !== 'REFUNDED'
|
162
|
+
"
|
163
|
+
class='w-100 button'>Оплатить заказ</button> -->
|
164
|
+
<span class="t-transp" v-if="payment && payment.Status === 'CONFIRMED'">Paid</span>
|
165
|
+
</div>
|
166
|
+
|
167
|
+
<div class="bg-grey radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100">
|
168
|
+
<h3 class="mn-b-small">Order Summary</h3>
|
169
|
+
|
170
|
+
<ul class="flex gap-thin flex-column mn-b-semi">
|
171
|
+
<CardOrderItem
|
172
|
+
v-for="(product, index) in orderProducts" :key="product._id"
|
173
|
+
:editable="false"
|
174
|
+
:product="product"
|
175
|
+
/>
|
176
|
+
</ul>
|
177
|
+
|
178
|
+
<div class="mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100">
|
179
|
+
<div class="pd-small br-solid br-b br-black-transp-10 flex">
|
180
|
+
<p class="mn-r-auto t-transp">In total</p>
|
181
|
+
<p>{{ cartTotalPrice }} {{returnCurrency()}} </p>
|
182
|
+
</div>
|
183
|
+
<div class="pd-small br-solid br-b br-black-transp-10 flex">
|
184
|
+
<p class="mn-r-auto t-transp">Delivery</p>
|
185
|
+
<p>{{returnCurrency()}} {{ Math.trunc(100 + 20 * orderOrganization[0]?.distance - 7,5 * (orderOrganization[0]?.distance / 10))}} </p>
|
186
|
+
</div>
|
187
|
+
<div class="pd-small flex-bottom flex">
|
188
|
+
<p class="mn-r-auto t-transp">In total to pay</p>
|
189
|
+
<p class="p-big t-semi">{{returnCurrency()}} {{ Math.trunc(100 + 20 * orderOrganization[0]?.distance - 7,5 * (orderOrganization[0]?.distance / 10)) + cartTotalPrice }}</p>
|
190
|
+
</div>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
<h3 class="mn-b-small">Chat With Us</h3>
|
194
|
+
|
195
|
+
<ChatWindow
|
196
|
+
:username="
|
197
|
+
route.name === 'Order Status' ? order.user?.name || 'User' : 'Weeder Support'
|
198
|
+
"
|
199
|
+
:chatID="route.params.order"
|
200
|
+
class="radius-semi bg-white o-hidden"
|
201
|
+
/>
|
202
|
+
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
</template>
|
208
|
+
|
209
|
+
|
210
|
+
<script setup="props">
|
211
|
+
import { computed, ref, onMounted } from 'vue'
|
212
|
+
import { useRouter, useRoute } from 'vue-router'
|
213
|
+
|
214
|
+
import SectionPageTitle from '@pf/src/modules/globals/components/sections/SectionPageTitle.vue'
|
215
|
+
|
216
|
+
import Popup from "@pf/src/components/Popup/Popup.vue";
|
217
|
+
|
218
|
+
import IconTime from '@pf/src/modules/icons/entities/IconTime.vue'
|
219
|
+
|
220
|
+
// Block
|
221
|
+
import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'
|
222
|
+
import CardOrganization from '@pf/src/modules/organizations/components/blocks/CardOrganization.vue'
|
223
|
+
|
224
|
+
import ChatWindow from '@pf/src/modules/chats/components/pages/ChatPage.vue';
|
225
|
+
|
226
|
+
import StatusHistory from '@pf/src/modules/orders/components/blocks/StatusHistory.vue'
|
227
|
+
|
228
|
+
import * as globals from '@pf/src/modules/globals/store/globals'
|
229
|
+
import * as orders from '@pf/src/modules/orders/store/orders'
|
230
|
+
import * as products from '@pf/src/modules/products/store/products'
|
231
|
+
import * as organizations from '@pf/src/modules/organizations/store/organizations'
|
232
|
+
|
233
|
+
|
234
|
+
const router = useRouter()
|
235
|
+
const route = useRoute()
|
236
|
+
|
237
|
+
const order = ref(null)
|
238
|
+
const productsOrganization = ref(null)
|
239
|
+
const orderOrganization = ref(null)
|
240
|
+
|
241
|
+
const statuses = ['created', 'confirmed', 'packing', 'in delivery', 'delivered'];
|
242
|
+
const statusLabels = ['Order Confirming', 'Order Confirmed', 'Packing', 'In Delivery', 'Delivered'];
|
243
|
+
|
244
|
+
const isActiveStatus = (index) => {
|
245
|
+
return statuses.slice(index).includes(order.value.status);
|
246
|
+
};
|
247
|
+
|
248
|
+
// description: 'Your order has been successfully created. Our manager will contact you within five minutes to confirm your order.'
|
249
|
+
// description: 'Your order has been confirmed. We are now processing your items and preparing them for shipment.'
|
250
|
+
// description: 'Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information.'
|
251
|
+
// description: 'Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information.'
|
252
|
+
// description: 'Your order is currently in transit. Our delivery team is working hard to get your items to you as soon as possible.'
|
253
|
+
// description: 'Congratulations! Your order has been successfully delivered. If you have any concerns or feedback, feel free to contact us.'
|
254
|
+
|
255
|
+
|
256
|
+
const isOpeStatusPopup = ref(false);
|
257
|
+
const selectedMember = ref(null);
|
258
|
+
const orderProducts = ref([]);
|
259
|
+
|
260
|
+
function openStatusPopup(member) {
|
261
|
+
isOpeStatusPopup.value = true;
|
262
|
+
if (typeof member === "number") selectedMember.value = member;
|
263
|
+
}
|
264
|
+
|
265
|
+
function closeStatusPopup() {
|
266
|
+
isOpeStatusPopup.value = false;
|
267
|
+
selectedMember.value = null;
|
268
|
+
}
|
269
|
+
|
270
|
+
onMounted(async()=>{
|
271
|
+
order.value = await orders.actions.read({_id: route.params.order})
|
272
|
+
order.value = order.value[0]
|
273
|
+
|
274
|
+
productsOrganization.value = await products.actions.read({
|
275
|
+
organization: order.value.owner.target._id,
|
276
|
+
limit: 1000,
|
277
|
+
});
|
278
|
+
|
279
|
+
console.log(productsOrganization.value)
|
280
|
+
|
281
|
+
const productsMap = productsOrganization.value.reduce((map, product) => {
|
282
|
+
map[product._id] = product;
|
283
|
+
return map;
|
284
|
+
}, {});
|
285
|
+
|
286
|
+
console.log(productsMap)
|
287
|
+
|
288
|
+
// Сопоставление продуктов с позициями заказа
|
289
|
+
orderProducts.value = order.value.positions.map(({ _id, quantity }) => {
|
290
|
+
const product = productsMap[_id];
|
291
|
+
return {
|
292
|
+
name: product.name,
|
293
|
+
images: product.images,
|
294
|
+
price: product.price,
|
295
|
+
_id: product._id,
|
296
|
+
quantity
|
297
|
+
};
|
298
|
+
});
|
299
|
+
|
300
|
+
orderOrganization.value = await organizations.actions.read({
|
301
|
+
_id: order.value?.owner.target._id,
|
302
|
+
location: globals.state.position?.location,
|
303
|
+
});
|
304
|
+
|
305
|
+
})
|
306
|
+
|
307
|
+
let cartTotalPrice = computed(() => {
|
308
|
+
return Number(order.value?.positions.reduce((total, product) => {
|
309
|
+
return total + product.price * product.quantity;
|
310
|
+
}, 0));
|
311
|
+
})
|
312
|
+
|
313
|
+
let cartTotalAmount = computed(() => {
|
314
|
+
return Number(order.value?.positions.reduce((total, product) => {
|
315
|
+
return total + product.quantity;
|
316
|
+
}, 0));
|
317
|
+
})
|
318
|
+
|
319
|
+
// Функция установки нового статуса
|
320
|
+
async function setStatus (newStatus) {
|
321
|
+
orders.state.current.status = newStatus
|
322
|
+
|
323
|
+
await orders.actions.update(orders.state.current)
|
324
|
+
}
|
325
|
+
|
326
|
+
function getNextStatus(currentStatus) {
|
327
|
+
const currentIndex = statuses.indexOf(currentStatus);
|
328
|
+
|
329
|
+
if (currentIndex !== -1 && currentIndex + 1 < statuses.length) {
|
330
|
+
return statuses[currentIndex + 1];
|
331
|
+
}
|
332
|
+
return null; // Если следующий статус не существует
|
333
|
+
}
|
334
|
+
|
335
|
+
function getStatusLabel(status) {
|
336
|
+
const index = statuses.indexOf(status);
|
337
|
+
|
338
|
+
return status ? statusLabels[index] : "";
|
339
|
+
}
|
340
|
+
async function setNextStatus() {
|
341
|
+
const nextStatus = getNextStatus(orders.state.current.status);
|
342
|
+
|
343
|
+
if (nextStatus) {
|
344
|
+
orders.state.current.status = nextStatus;
|
345
|
+
|
346
|
+
await orders.actions.update(orders.state.current)
|
347
|
+
} else {
|
348
|
+
console.error('Next status is void. Must handle somehow.');
|
349
|
+
}
|
350
|
+
|
351
|
+
closeStatusPopup()
|
352
|
+
}
|
353
|
+
|
354
|
+
|
355
|
+
function requestPayment(order) {
|
356
|
+
// store.dispatch("payments/newPayment", order);
|
357
|
+
}
|
358
|
+
|
359
|
+
function calculateDeliveryTime(distance, date) {
|
360
|
+
if (!distance) {
|
361
|
+
return null;
|
362
|
+
}
|
363
|
+
|
364
|
+
const basePreparationTime = 10 * 60 * 1000; // Convert to milliseconds
|
365
|
+
const travelTime = Math.ceil((15 + 5 + 3 * distance) / 5) * 5 * 60 * 1000;
|
366
|
+
|
367
|
+
// Преобразование даты начала в миллисекунды и добавление времени подготовки и доставки
|
368
|
+
const startTime = new Date(date).getTime();
|
369
|
+
const estimatedDeliveryTime = new Date(startTime + basePreparationTime + travelTime);
|
370
|
+
|
371
|
+
console.log(date)
|
372
|
+
console.log(estimatedDeliveryTime)
|
373
|
+
|
374
|
+
return estimatedDeliveryTime;
|
375
|
+
}
|
376
|
+
|
377
|
+
|
378
|
+
</script>
|
379
|
+
|
380
|
+
<style lang="scss" scoped>
|
381
|
+
.blink {
|
382
|
+
animation: blink-animation 1s ease infinite;
|
383
|
+
}
|
384
|
+
|
385
|
+
@keyframes blink-animation {
|
386
|
+
0%, 100% {
|
387
|
+
opacity: 1;
|
388
|
+
}
|
389
|
+
50% {
|
390
|
+
opacity: 0.8;
|
391
|
+
}
|
392
|
+
}
|
393
|
+
</style>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
class="order-form col"
|
23
23
|
>
|
24
24
|
<FormCustomerDetails
|
25
|
-
:
|
25
|
+
:customer="orders.state.current.customer"
|
26
26
|
/>
|
27
27
|
<FormDelivery
|
28
28
|
v-if="orders.state.current.status !== true && shopcart.state.positions.length > 0"
|
@@ -148,7 +148,6 @@ const cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)
|
|
148
148
|
// Organization
|
149
149
|
const orderOrganization = ref({})
|
150
150
|
|
151
|
-
import Radio from '@pf/src/components/Radio/Radio.vue'
|
152
151
|
|
153
152
|
onMounted(async()=> {
|
154
153
|
orderOrganization.value = await organizations.actions.read({
|
@@ -201,14 +200,14 @@ async function handleCreate() {
|
|
201
200
|
orders.state.current.status = 'created';
|
202
201
|
|
203
202
|
orders.state.current.owner = {
|
204
|
-
target:
|
203
|
+
target: shopcart.state.organization,
|
205
204
|
type: 'organization'
|
206
205
|
}
|
207
206
|
|
208
207
|
if (auth.state.user._id) {
|
209
208
|
orders.state.current.creator = {
|
210
209
|
target: auth.state.user._id,
|
211
|
-
type: '
|
210
|
+
type: 'User'
|
212
211
|
}
|
213
212
|
}
|
214
213
|
|
@@ -223,6 +222,8 @@ async function handleCreate() {
|
|
223
222
|
let order = await orders.actions.create(orders.state.current);
|
224
223
|
|
225
224
|
if (order) {
|
225
|
+
shopcart.actions.resetShopcart()
|
226
|
+
|
226
227
|
router.push({
|
227
228
|
name: 'Order Status',
|
228
229
|
params: {
|
@@ -27,12 +27,12 @@
|
|
27
27
|
<Popup
|
28
28
|
@close-popup="closeProductsPopup"
|
29
29
|
:isPopupOpen="isOpenProductsPopup"
|
30
|
-
class="bg-white w-min-30r w-max-30r radius-big pd-medium"
|
30
|
+
class="bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"
|
31
31
|
>
|
32
32
|
|
33
33
|
<h3 class="mn-b-small">Add to order</h3>
|
34
34
|
|
35
|
-
<div class="h-100
|
35
|
+
<div class="bg-grey h-max-100 mn-b-thin o-scroll pd-medium radius-big">
|
36
36
|
<Feed
|
37
37
|
:search="{
|
38
38
|
placeholder: 'Search products...',
|
@@ -221,7 +221,6 @@
|
|
221
221
|
|
222
222
|
import customers from '@pf/src/modules/orders/store/customers.store';
|
223
223
|
|
224
|
-
|
225
224
|
// Accessing router
|
226
225
|
const route = useRoute()
|
227
226
|
const router = useRouter()
|
@@ -6,13 +6,13 @@
|
|
6
6
|
:tabs_current="tab"
|
7
7
|
:tabs="[
|
8
8
|
{ name: 'All', value: 'all' },
|
9
|
-
{ name: 'Created', value: '
|
10
|
-
{ name: 'Confirmed', value: '
|
11
|
-
{ name: 'Preparing', value: '
|
12
|
-
{ name: 'Prepared', value: '
|
13
|
-
{ name: 'In delivery', value: '
|
14
|
-
{ name: 'Delivered', value: '
|
15
|
-
{ name: 'Closed', value: '
|
9
|
+
{ name: 'Created', value: 'created' },
|
10
|
+
{ name: 'Confirmed', value: 'confirmed' },
|
11
|
+
{ name: 'Preparing', value: 'preparing' },
|
12
|
+
{ name: 'Prepared', value: 'prepared' },
|
13
|
+
{ name: 'In delivery', value: 'in delivery' },
|
14
|
+
{ name: 'Delivered', value: 'delivered' },
|
15
|
+
{ name: 'Closed', value: 'closed' }
|
16
16
|
]"
|
17
17
|
:actions="[
|
18
18
|
{ to: { name: 'AdminOrderAdd'}, label: 'Create Order' }
|
@@ -20,6 +20,29 @@
|
|
20
20
|
class="mn-b-small bg-grey bg-grey radius-big"
|
21
21
|
/>
|
22
22
|
|
23
|
+
|
24
|
+
|
25
|
+
<Block
|
26
|
+
title="Balance"
|
27
|
+
class="mn-b-thin"
|
28
|
+
>
|
29
|
+
<div class="gap-micro flex-nowrap flex">
|
30
|
+
<div class="w-100 bg-white radius-small pd-small">
|
31
|
+
<p class="mn-b-thin">Total</p>
|
32
|
+
<h3>{{formatPrice(totalPrice)}}</h3>
|
33
|
+
</div>
|
34
|
+
<div class="w-100 bg-white radius-small pd-small">
|
35
|
+
<p class="mn-b-thin">Paid</p>
|
36
|
+
<h3>{{formatPrice(totalPriceUnpaid)}}</h3>
|
37
|
+
</div>
|
38
|
+
<div class="w-100 bg-white radius-small pd-small">
|
39
|
+
<p class="mn-b-thin">Unpaid</p>
|
40
|
+
<h3>{{formatPrice(totalPrice)}}</h3>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
</Block>
|
45
|
+
|
23
46
|
<Feed
|
24
47
|
:search="true"
|
25
48
|
:states="{
|
@@ -34,7 +57,7 @@
|
|
34
57
|
:options="{
|
35
58
|
limit: 15,
|
36
59
|
owner: route.params._id,
|
37
|
-
...(tab !== 'all' && {
|
60
|
+
...(tab !== 'all' && { status: tab })
|
38
61
|
}"
|
39
62
|
v-slot="{
|
40
63
|
items
|
@@ -121,8 +144,8 @@
|
|
121
144
|
|
122
145
|
|
123
146
|
<div class="pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex">
|
124
|
-
<
|
125
|
-
<p class="t-medium mn-r-auto">
|
147
|
+
<IconTime class="i-semi t-transp" fill="rgb(var(--black)" />
|
148
|
+
<p class="t-medium mn-r-auto">{{formatDate(order.deadline)}}</p>
|
126
149
|
|
127
150
|
<span
|
128
151
|
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"
|
@@ -155,6 +178,7 @@
|
|
155
178
|
import '@vuepic/vue-datepicker/dist/main.css'
|
156
179
|
|
157
180
|
import Tab from '@pf/src/components/Tab/Tab.vue'
|
181
|
+
import Block from '@pf/src/components/Block/Block.vue';
|
158
182
|
|
159
183
|
import * as orders from '@pf/src/modules/orders/store/orders';
|
160
184
|
import * as auth from '@pf/src/modules/auth/store/auth';
|
@@ -166,7 +190,7 @@
|
|
166
190
|
|
167
191
|
import Feed from '@pf/src/components/Feed/Feed.vue'
|
168
192
|
|
169
|
-
import
|
193
|
+
import IconTime from '@pf/src/modules/icons/entities/IconTime.vue'
|
170
194
|
|
171
195
|
const route = useRoute();
|
172
196
|
const router = useRouter();
|
@@ -176,6 +200,31 @@
|
|
176
200
|
// Tab logic
|
177
201
|
const tab = ref('all')
|
178
202
|
|
203
|
+
const totalPrice = computed(() => {
|
204
|
+
return calculateTotalSum(orders.state.all)
|
205
|
+
});
|
206
|
+
|
207
|
+
const totalPriceUnpaid = computed(() => {
|
208
|
+
return calculateSum(orders.state.all,'unpaid')
|
209
|
+
});
|
210
|
+
|
211
|
+
|
212
|
+
function calculateTotalSum(orders) {
|
213
|
+
return orders.reduce((totalSum, item) => {
|
214
|
+
return totalSum + item.positions.reduce((sum, position) => sum + position.price, 0);
|
215
|
+
}, 0);
|
216
|
+
}
|
217
|
+
|
218
|
+
function calculateSum(orders, status) {
|
219
|
+
return orders.reduce((totalSum, item) => {
|
220
|
+
if (item.payment.status === status) {
|
221
|
+
return totalSum + item.positions.reduce((sum, position) => sum + position.price, 0);
|
222
|
+
}
|
223
|
+
return totalSum;
|
224
|
+
}, 0);
|
225
|
+
}
|
226
|
+
|
227
|
+
|
179
228
|
onMounted(async () => {
|
180
229
|
|
181
230
|
});
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
</div>
|
8
8
|
|
9
|
-
<h4 class="mn-b-thin">
|
9
|
+
<h4 class="mn-b-thin">Select zone</h4>
|
10
10
|
<div class="mn-b-small flex-nowrap flex">
|
11
11
|
<Radio
|
12
12
|
v-model:radio="order.delivery.type"
|
@@ -22,7 +22,7 @@
|
|
22
22
|
/>
|
23
23
|
<Radio
|
24
24
|
v-model:radio="order.delivery.type"
|
25
|
-
label="
|
25
|
+
label="Post"
|
26
26
|
value="mail"
|
27
27
|
class="bg-white pd-medium radius-small w-100 mn-r-small"
|
28
28
|
/>
|
@@ -88,7 +88,7 @@ async function sendApplication() {
|
|
88
88
|
}
|
89
89
|
</script>
|
90
90
|
|
91
|
-
<style lang="scss">
|
91
|
+
<style lang="scss" scoped>
|
92
92
|
.spiral {
|
93
93
|
background-image: url('https://weeder.delivery/spiral.jpg');
|
94
94
|
background-size: cover;
|
@@ -97,7 +97,7 @@ async function sendApplication() {
|
|
97
97
|
position: absolute;
|
98
98
|
top: 50%;
|
99
99
|
left: 50%;
|
100
|
-
opacity: 0.
|
100
|
+
opacity: 0.066;
|
101
101
|
transform: translate(-50%, -50%) rotate(0deg);
|
102
102
|
transform-origin: center center;
|
103
103
|
animation: spin 5s linear infinite;
|