@ozdao/prometheus-framework 0.2.94 → 0.2.96
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +15 -14
- package/dist/auth.server.mjs +15 -14
- package/dist/main-BJvlNekm.mjs +13631 -0
- package/dist/main-pGo7JpSP.js +92 -0
- package/dist/orders.server.js +26 -22
- package/dist/orders.server.mjs +26 -22
- package/dist/organizations.server.js +31 -10
- package/dist/organizations.server.mjs +31 -10
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +2 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -94
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +19 -19
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +12 -12
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +21 -21
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/router/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/router/auth.js +4 -0
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +8 -8
- 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 +2 -2
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.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/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/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- 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 +60 -60
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.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 +2 -2
- package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.js +22 -21
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -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 +48 -37
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +160 -167
- 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 +50 -49
- 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 +113 -110
- package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +14 -14
- 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 +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/models/order.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/order.js +28 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +25 -43
- 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 +19 -19
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- 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 +47 -47
- 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 +143 -131
- 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 +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- 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 +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +32 -34
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.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 +30 -32
- 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/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- 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 +2 -2
- 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 +155 -187
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- 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 +19 -19
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- 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/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +26 -22
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +68 -65
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- 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 +2 -2
- 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-B2xhKZNK.js +1 -0
- package/dist/web-DTzbVshr.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Block/Block.vue +1 -1
- package/src/components/Completion/Completion.vue +2 -2
- package/src/modules/auth/controllers/auth.controller.js +19 -16
- package/src/modules/auth/router/auth.js +4 -0
- package/src/modules/backoffice/router/backoffice.js +3 -3
- package/src/modules/chats/routes/chats.routes.js +1 -2
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -1
- package/src/modules/globals/services/globals.crud.js +2 -0
- package/src/modules/icons/navigation/IconCross.vue +11 -7
- package/src/modules/orders/components/blocks/StatusHistory.vue +8 -11
- package/src/modules/orders/components/pages/OrderBackoffice.vue +37 -50
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +8 -4
- package/src/modules/orders/components/pages/Orders.vue +1 -1
- package/src/modules/orders/controllers/orders.controller.js +26 -25
- package/src/modules/orders/models/order.model.js +1 -1
- package/src/modules/orders/routes/orders.routes.js +9 -3
- package/src/modules/orders/store/customers.store.js +1 -1
- package/src/modules/orders/store/models/order.js +33 -0
- package/src/modules/orders/store/orders.js +7 -28
- package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -2
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +7 -5
- package/src/modules/organizations/components/pages/Members.vue +50 -38
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/components/pages/Organizations.vue +2 -1
- package/src/modules/organizations/controllers/invites.controller.js +2 -0
- package/src/modules/organizations/controllers/memberships.controller.js +35 -11
- package/src/modules/organizations/controllers/organizations.controller.js +5 -4
- package/src/modules/organizations/models/invite.model.js +4 -0
- package/src/modules/organizations/organizations.client.js +0 -2
- package/src/modules/organizations/router/members.router.js +1 -1
- package/src/modules/organizations/store/departments.js +0 -1
- package/src/modules/organizations/store/memberships.js +1 -8
- package/src/modules/products/components/pages/ProductEdit.vue +39 -33
- package/src/modules/products/components/sections/EditProductInfo.vue +3 -3
- package/src/modules/users/components/blocks/CardUser.vue +9 -5
- package/src/modules/users/components/pages/Profile.vue +5 -3
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/modules/users/components/sections/ProfileCompletion.vue +2 -2
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +0 -126
- package/src/modules/users/components/pages/ProfileOrganizations.vue +0 -97
@@ -1,27 +1,15 @@
|
|
1
1
|
<template>
|
2
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
3
|
|
9
|
-
<div v-if="order" class="mn-b-thin pos-relative w-100 bg-main radius-big pd-
|
4
|
+
<div v-if="order" class="mn-b-thin pos-relative w-100 bg-main radius-big pd-medium">
|
10
5
|
<div class="mn-b-small flex-nowrap flex">
|
11
|
-
<p class="t-medium p-medium mn-r-auto">
|
12
|
-
Progress
|
13
|
-
</p>
|
14
|
-
|
15
6
|
<p class="t-medium p-medium">
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
7
|
+
Order No: <span class="p-small t-transp">#{{order._id}}</span>
|
8
|
+
</p>
|
9
|
+
</div>
|
20
10
|
|
21
|
-
<
|
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">
|
11
|
+
<div class="flex-nowrap flex gap-thin pos-relative ">
|
12
|
+
<div v-for="(status, index) in statuses" :key="index" class="w-20">
|
25
13
|
<div
|
26
14
|
class="bg-grey br-anim br-glow radius-extra h-1r w-100"
|
27
15
|
:class="
|
@@ -32,21 +20,21 @@
|
|
32
20
|
/>
|
33
21
|
<div
|
34
22
|
:class="{ 't-transp': !isActiveStatus(index) }"
|
35
|
-
class="mn-t-thin t-medium uppercase">{{ statusLabels[index] }}</div>
|
23
|
+
class="mn-t-thin p-small t-medium uppercase">{{ statusLabels[index] }}</div>
|
36
24
|
</div>
|
37
25
|
</div>
|
26
|
+
</div>
|
38
27
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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>
|
28
|
+
<div class="bg-grey mn-b-thin pd-thin radius-extra flex-nowrap flex">
|
29
|
+
<div class="w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20">
|
30
|
+
<IconTime class="i-semi t-transp" fill="rgb(var(--black)" />
|
31
|
+
<p class="t-medium mn-r-auto"><span class="p-small t-transp">Estimated Arrival</span><br>{{formatDate(order.deadline)}}</p>
|
48
32
|
</div>
|
49
|
-
|
33
|
+
|
34
|
+
<button v-if="getNextStatus(order.status) && route.name === 'Order Edit'" @click="openStatusPopup" class="mn-l-auto bg-black t-white button">
|
35
|
+
Mark as {{ getStatusLabel(getNextStatus(order.status)) }}
|
36
|
+
</button>
|
37
|
+
</div>
|
50
38
|
|
51
39
|
<Popup
|
52
40
|
title="Change status"
|
@@ -54,7 +42,13 @@
|
|
54
42
|
:isPopupOpen="isOpeStatusPopup"
|
55
43
|
class="bg-white w-min-30r w-max-30r radius-big pd-big"
|
56
44
|
>
|
57
|
-
|
45
|
+
|
46
|
+
<VueDatePicker v-model="order.deadline" :hide-navigation="['calendar']" :flow="['time']" class="z-index-3 bg-grey radius-small pd-small mn-b-thin mn-b-semi" />
|
47
|
+
|
48
|
+
<p class="t-medium p-medium mn-b-thin">
|
49
|
+
Positions
|
50
|
+
</p>
|
51
|
+
|
58
52
|
<ul class="bg-grey pd-small radius-small flex gap-thin flex-column mn-b-semi">
|
59
53
|
<CardOrderItem
|
60
54
|
v-for="(product, index) in orderProducts" :key="product._id"
|
@@ -89,17 +83,17 @@
|
|
89
83
|
>
|
90
84
|
<div class="pd-small flex-nowrap flex">
|
91
85
|
<div class="mn-r-auto">
|
92
|
-
<span class="d-block t-medium p-medium">
|
93
|
-
<span class=" t-lh-075 h2 d-block mn-b-small">
|
94
|
-
<p class="pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max">
|
86
|
+
<span class="d-block t-medium p-medium">Order is</span>
|
87
|
+
<span class=" t-lh-075 h2 d-block mn-b-small">created</span>
|
88
|
+
<p class="pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max">{{formatDate(order.createdAt)}}</p>
|
95
89
|
</div>
|
96
|
-
|
90
|
+
<!-- <div class="t-right">
|
97
91
|
Cancel order<br>
|
98
92
|
Exchange item
|
99
93
|
<hr class="mn-b-thin mn-t-thin">
|
100
94
|
For Delivery Queries Contact Us
|
101
95
|
|
102
|
-
</div>
|
96
|
+
</div> -->
|
103
97
|
</div>
|
104
98
|
|
105
99
|
<div class="pd-small cols-2 br-t br-black-transp-10 br-solid">
|
@@ -108,17 +102,7 @@
|
|
108
102
|
</p>
|
109
103
|
|
110
104
|
<p class="w-100 t-right ">
|
111
|
-
|
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}}
|
105
|
+
{{order.customer.target?.number || 'Not specified'}}
|
122
106
|
</p>
|
123
107
|
</div>
|
124
108
|
|
@@ -128,7 +112,7 @@
|
|
128
112
|
</p>
|
129
113
|
|
130
114
|
<p class="w-100 t-right">
|
131
|
-
|
115
|
+
{{order.delivery.address ? order.delivery.address.slice(0,64) : 'Not specified'}}
|
132
116
|
</p>
|
133
117
|
</div>
|
134
118
|
|
@@ -138,7 +122,7 @@
|
|
138
122
|
</p>
|
139
123
|
|
140
124
|
<p class="w-100 t-right mn-b-small">
|
141
|
-
{{order.delivery
|
125
|
+
{{order.delivery.type ? order.delivery.type : 'Not specified'}}
|
142
126
|
</p>
|
143
127
|
</div>
|
144
128
|
|
@@ -210,7 +194,10 @@
|
|
210
194
|
<script setup="props">
|
211
195
|
import { computed, ref, onMounted } from 'vue'
|
212
196
|
import { useRouter, useRoute } from 'vue-router'
|
213
|
-
|
197
|
+
|
198
|
+
import VueDatePicker from '@vuepic/vue-datepicker';
|
199
|
+
import '@vuepic/vue-datepicker/dist/main.css'
|
200
|
+
|
214
201
|
import SectionPageTitle from '@pf/src/modules/globals/components/sections/SectionPageTitle.vue'
|
215
202
|
|
216
203
|
import Popup from "@pf/src/components/Popup/Popup.vue";
|
@@ -239,7 +226,7 @@
|
|
239
226
|
const orderOrganization = ref(null)
|
240
227
|
|
241
228
|
const statuses = ['created', 'confirmed', 'packing', 'in delivery', 'delivered'];
|
242
|
-
const statusLabels = ['
|
229
|
+
const statusLabels = ['Created', 'Confirmed', 'Packing', 'In Delivery', 'Delivered'];
|
243
230
|
|
244
231
|
const isActiveStatus = (index) => {
|
245
232
|
return statuses.slice(index).includes(order.value.status);
|
@@ -115,7 +115,7 @@
|
|
115
115
|
:photo="orders.state.current.customer.profile.photo"
|
116
116
|
:name="orders.state.current.customer.profile.name || orders.state.current.customer.phone || orders.state.current.customer.email"
|
117
117
|
@click="() => {
|
118
|
-
|
118
|
+
orders.mutations.resetCustomer(orders.state.current.customer)
|
119
119
|
}"
|
120
120
|
class="bg-white pd-thin radius-medium w-100 mn-b-thin"
|
121
121
|
/>
|
@@ -196,6 +196,7 @@
|
|
196
196
|
import { computed, ref, defineProps, onMounted, reactive, toRefs, watch } from 'vue'
|
197
197
|
import { useRoute, useRouter } from 'vue-router'
|
198
198
|
|
199
|
+
|
199
200
|
import Field from '@pf/src/components/Field/Field.vue'
|
200
201
|
import Button from "@pf/src/components/Button/Button.vue";
|
201
202
|
import Tab from '@pf/src/components/Tab/Tab.vue'
|
@@ -225,6 +226,8 @@
|
|
225
226
|
const route = useRoute()
|
226
227
|
const router = useRouter()
|
227
228
|
|
229
|
+
orders.mutations.resetOrder(orders.state.current)
|
230
|
+
|
228
231
|
let cartTotalPrice = computed(() => {
|
229
232
|
return Number(orders.state.current.positions.reduce((total, product) => {
|
230
233
|
return total + product.price * product.quantity;
|
@@ -261,12 +264,12 @@
|
|
261
264
|
function onSubmit() {
|
262
265
|
|
263
266
|
orders.state.current.creator = {
|
264
|
-
type: '
|
267
|
+
type: 'User',
|
265
268
|
target: auth.state.user._id
|
266
269
|
}
|
267
270
|
|
268
271
|
orders.state.current.owner = {
|
269
|
-
type: '
|
272
|
+
type: 'Organization',
|
270
273
|
target: route.params._id,
|
271
274
|
}
|
272
275
|
|
@@ -287,7 +290,8 @@
|
|
287
290
|
})
|
288
291
|
}
|
289
292
|
|
290
|
-
onMounted(
|
293
|
+
onMounted(() => {
|
294
|
+
|
291
295
|
// await orders.actions.fetchOrder(route.params.id) // Implement this action in your store
|
292
296
|
|
293
297
|
// order.value = orders.state.current
|
@@ -87,7 +87,7 @@
|
|
87
87
|
|
88
88
|
<div class="mn-b-small pd-small bg-white radius-small flex-nowrap flex">
|
89
89
|
<div class="w-100">
|
90
|
-
<h3 class="mn-b-thin">{{order.customer.target.profile
|
90
|
+
<h3 class="mn-b-thin">{{order.customer.target.profile?.name || order.customer.target.phone || order.customer.target.email || 'No name'}}</h3>
|
91
91
|
<p class="t-truncate">{{order.delivery.address || 'Not specified'}}</p>
|
92
92
|
</div>
|
93
93
|
|
@@ -1,6 +1,8 @@
|
|
1
|
+
const queryProcessorGlobals = require('@pf/src/modules/globals/controllers/utils/queryProcessor');
|
2
|
+
|
1
3
|
const { sendChatMessageTelegram } = require('@pf/src/modules/globals/utils/mailing');
|
2
4
|
|
3
|
-
|
5
|
+
|
4
6
|
|
5
7
|
function formatPositions(positions) {
|
6
8
|
return positions.map(pos => `🔹 ${pos.name} - Price: $${pos.price}, Quantity: ${pos.quantity}`).join('\n');
|
@@ -22,7 +24,6 @@ function formatOrderMessage(order) {
|
|
22
24
|
`;
|
23
25
|
}
|
24
26
|
|
25
|
-
|
26
27
|
async function findOrCreateCustomer(Customer, customerInfo, orderOwner, orderCreator) {
|
27
28
|
let searchCriteria = {};
|
28
29
|
|
@@ -36,6 +37,8 @@ async function findOrCreateCustomer(Customer, customerInfo, orderOwner, orderCre
|
|
36
37
|
|
37
38
|
let customer = null;
|
38
39
|
|
40
|
+
console.log(searchCriteria)
|
41
|
+
|
39
42
|
// Проверяем, есть ли критерии для поиска
|
40
43
|
if (Object.keys(searchCriteria).length > 0) {
|
41
44
|
customer = await Customer.findOne({ $or: [searchCriteria] });
|
@@ -47,12 +50,12 @@ async function findOrCreateCustomer(Customer, customerInfo, orderOwner, orderCre
|
|
47
50
|
...customerInfo,
|
48
51
|
owner: orderOwner,
|
49
52
|
creator: {
|
50
|
-
type: customerInfo.creator
|
51
|
-
target: customerInfo.creator
|
53
|
+
type: customerInfo.creator?.type || orderCreator.type,
|
54
|
+
target: customerInfo.creator?.target || orderCreator.target,
|
52
55
|
},
|
53
56
|
identity: {
|
54
|
-
type: customerInfo.identity
|
55
|
-
target: customerInfo.identity
|
57
|
+
type: customerInfo.identity?.type || orderCreator.type,
|
58
|
+
target: customerInfo.identity?.target || orderCreator.target,
|
56
59
|
},
|
57
60
|
};
|
58
61
|
customer = await Customer.create(newCustomerData);
|
@@ -70,20 +73,6 @@ async function findOrCreateCustomer(Customer, customerInfo, orderOwner, orderCre
|
|
70
73
|
}
|
71
74
|
}
|
72
75
|
|
73
|
-
function initializeOrder(orderData, userId) {
|
74
|
-
orderData.status = 'created';
|
75
|
-
|
76
|
-
orderData.status_history = orderData.status_history || [];
|
77
|
-
|
78
|
-
orderData.status_history.push({
|
79
|
-
status: orderData.status,
|
80
|
-
changedBy: userId,
|
81
|
-
timestamp: new Date(),
|
82
|
-
comment: ''
|
83
|
-
});
|
84
|
-
}
|
85
|
-
|
86
|
-
|
87
76
|
const controllerFactory = (db) => {
|
88
77
|
const Order = db.order;
|
89
78
|
const Customer = db.customer;
|
@@ -91,9 +80,19 @@ const controllerFactory = (db) => {
|
|
91
80
|
// Создание заказа
|
92
81
|
const create = async (req, res) => {
|
93
82
|
const orderData = req.body;
|
94
|
-
|
83
|
+
|
84
|
+
const userId = req.userId || req.body.creator.target;
|
95
85
|
|
96
|
-
|
86
|
+
orderData.status = 'created';
|
87
|
+
|
88
|
+
orderData.status_history = orderData.status_history || [];
|
89
|
+
|
90
|
+
orderData.status_history.push({
|
91
|
+
status: orderData.status,
|
92
|
+
user: new db.mongoose.Types.ObjectId(req.userId),
|
93
|
+
timestamp: new Date(),
|
94
|
+
comment: ''
|
95
|
+
});
|
97
96
|
|
98
97
|
try {
|
99
98
|
if (!orderData.customer.target) {
|
@@ -173,19 +172,21 @@ const controllerFactory = (db) => {
|
|
173
172
|
|
174
173
|
// Обновление заказа
|
175
174
|
const update = async (req, res) => {
|
176
|
-
console.log(req.body)
|
177
175
|
const order = await Order.findOne({ _id: req.body._id });
|
178
176
|
|
179
177
|
if (!order) {
|
180
178
|
return res.status(404).send({ errorCode: "ORDER_NOT_FOUND", message: "Order not found." });
|
181
179
|
}
|
182
180
|
|
181
|
+
console.log('order status is', req.userId)
|
182
|
+
|
183
|
+
|
183
184
|
if (req.body.status && req.body.status !== order.status) {
|
184
185
|
order.status = req.body.status; // Обновление текущего статуса заказа
|
185
186
|
// Добавление записи в историю изменений статусов
|
186
187
|
order.status_history.push({
|
187
188
|
status: req.body.status,
|
188
|
-
|
189
|
+
user: new db.mongoose.Types.ObjectId(req.userId || req.body.creator.target),
|
189
190
|
timestamp: new Date(),
|
190
191
|
comment: ''
|
191
192
|
});
|
@@ -203,7 +204,7 @@ const controllerFactory = (db) => {
|
|
203
204
|
try {
|
204
205
|
const order = await Order.findOneAndUpdate(
|
205
206
|
{ _id: req.params._id },
|
206
|
-
{ status: '
|
207
|
+
{ status: 'closed', payment: { type: 'Cash', status: 'paid' }},
|
207
208
|
{ new: true }
|
208
209
|
).exec();
|
209
210
|
if (!order) {
|
@@ -9,6 +9,9 @@ module.exports = function(app, db, origins, publicPath) {
|
|
9
9
|
|
10
10
|
app.post(
|
11
11
|
"/api/orders/create",
|
12
|
+
// [
|
13
|
+
// middleware.authJwt.verifyToken
|
14
|
+
// ],
|
12
15
|
controller.create
|
13
16
|
);
|
14
17
|
|
@@ -19,14 +22,17 @@ module.exports = function(app, db, origins, publicPath) {
|
|
19
22
|
|
20
23
|
app.post(
|
21
24
|
"/api/orders/update",
|
22
|
-
[
|
23
|
-
|
24
|
-
],
|
25
|
+
// [
|
26
|
+
// middleware.authJwt.verifyToken
|
27
|
+
// ],
|
25
28
|
controller.update
|
26
29
|
);
|
27
30
|
|
28
31
|
app.post(
|
29
32
|
"/api/orders/delete",
|
33
|
+
// [
|
34
|
+
// middleware.authJwt.verifyToken
|
35
|
+
// ],
|
30
36
|
controller.deleteOrder
|
31
37
|
);
|
32
38
|
};
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import customerInitState from "@pf/src/modules/orders/store/models/customer"
|
2
|
+
|
3
|
+
const orderInitState = {
|
4
|
+
_id: undefined,
|
5
|
+
positions: [],
|
6
|
+
status: null,
|
7
|
+
comment: '',
|
8
|
+
|
9
|
+
owner: {
|
10
|
+
type: 'Organization',
|
11
|
+
target: null,
|
12
|
+
},
|
13
|
+
|
14
|
+
creator: {
|
15
|
+
type: 'Customer',
|
16
|
+
target: null,
|
17
|
+
},
|
18
|
+
|
19
|
+
customer: { ...customerInitState },
|
20
|
+
|
21
|
+
payment: {
|
22
|
+
type: 'Cash',
|
23
|
+
status: 'Unpaid',
|
24
|
+
},
|
25
|
+
|
26
|
+
delivery: {
|
27
|
+
type: null,
|
28
|
+
address: null,
|
29
|
+
status: '',
|
30
|
+
}
|
31
|
+
};
|
32
|
+
|
33
|
+
export default orderInitState
|
@@ -6,39 +6,14 @@ import axios from 'axios';
|
|
6
6
|
const $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true})
|
7
7
|
// Globals
|
8
8
|
import { setError } from '@pf/src/modules/globals/store/globals'
|
9
|
+
// Init State
|
10
|
+
import orderInitState from "@pf/src/modules/orders/store/models/order"
|
9
11
|
|
10
|
-
import customerInitState from "@pf/src/modules/orders/store/models/customer"
|
11
12
|
|
12
13
|
const state = reactive({
|
13
14
|
all: [],
|
14
15
|
current: {
|
15
|
-
|
16
|
-
positions: [],
|
17
|
-
status: null,
|
18
|
-
comment: '',
|
19
|
-
|
20
|
-
owner: {
|
21
|
-
type: 'Organization',
|
22
|
-
target: null,
|
23
|
-
},
|
24
|
-
|
25
|
-
creator: {
|
26
|
-
type: 'Customer',
|
27
|
-
target: null,
|
28
|
-
},
|
29
|
-
|
30
|
-
customer: { ...customerInitState },
|
31
|
-
|
32
|
-
payment: {
|
33
|
-
type: 'Cash',
|
34
|
-
status: 'Unpaid',
|
35
|
-
},
|
36
|
-
|
37
|
-
delivery: {
|
38
|
-
type: null,
|
39
|
-
address: null,
|
40
|
-
status: '',
|
41
|
-
}
|
16
|
+
...orderInitState
|
42
17
|
}
|
43
18
|
});
|
44
19
|
|
@@ -114,6 +89,10 @@ const actions = {
|
|
114
89
|
const mutations = {
|
115
90
|
resetCustomer(stateObject) {
|
116
91
|
Object.assign(stateObject, customerInitState);
|
92
|
+
},
|
93
|
+
resetOrder(stateObject) {
|
94
|
+
state.current = { ...orderInitState }
|
95
|
+
// Object.assign(stateObject, orderInitState);
|
117
96
|
}
|
118
97
|
}
|
119
98
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="
|
2
|
+
<div class="">
|
3
3
|
|
4
4
|
<div class="pd-medium w-100">
|
5
5
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<ul>
|
33
33
|
<li v-if="department.members.length < 1">No members in department</li>
|
34
34
|
<User
|
35
|
-
class="
|
35
|
+
class="pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin"
|
36
36
|
v-for="(member, index) in department.members"
|
37
37
|
:key="index"
|
38
38
|
:user="member.user"
|
@@ -62,7 +62,10 @@
|
|
62
62
|
:name="member.user.profile.name || member.user.phone || member.user.email || member.user._id"
|
63
63
|
:position="member.position"
|
64
64
|
:action="{
|
65
|
-
label:
|
65
|
+
label: {
|
66
|
+
is: IconDelete,
|
67
|
+
props: { class: 'i-medium', fill: 'rgb(var(--white)' }
|
68
|
+
},
|
66
69
|
method: () => removeMember(member)
|
67
70
|
}"
|
68
71
|
/>
|
@@ -120,8 +123,6 @@
|
|
120
123
|
|
121
124
|
<p class="p-medium mn-b-small">Please settings for your department:</p>
|
122
125
|
<div class="cols-1 gap-thin">
|
123
|
-
<h4>Products</h4>
|
124
|
-
|
125
126
|
<Checkbox
|
126
127
|
label="Hidden department"
|
127
128
|
name="hidden"
|
@@ -267,9 +268,10 @@ import Popup from "@pf/src/components/Popup/Popup.vue";
|
|
267
268
|
import Block from '@pf/src/components/Block/Block.vue';
|
268
269
|
import Feed from '@pf/src/components/Feed/Feed.vue'
|
269
270
|
|
271
|
+
import IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'
|
272
|
+
|
270
273
|
import EditArray from "@pf/src/modules/organizations/components/blocks/EditArray.vue";
|
271
274
|
import DepartmentSub from "@pf/src/modules/organizations/components/blocks/DepartmentSub.vue";
|
272
|
-
import DepartmentSubDepartmentModify from "@pf/src/modules/organizations/components/blocks/DepartmentMemberModify.vue";
|
273
275
|
|
274
276
|
import CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'
|
275
277
|
|
@@ -332,7 +334,7 @@ async function onSubmit() {
|
|
332
334
|
}
|
333
335
|
|
334
336
|
function redirectTo() {
|
335
|
-
router.
|
337
|
+
router.push({ name: "Organization Members", params: { _id: route.params._id } });
|
336
338
|
}
|
337
339
|
|
338
340
|
async function onDelete() {
|
@@ -5,7 +5,7 @@
|
|
5
5
|
@update:tabs_current="(update) => tab = update"
|
6
6
|
:tabs_current="tab"
|
7
7
|
:tabs="[
|
8
|
-
{ name: `Members (${organization.state.current.numberOfMembers})`, value: 'members' },
|
8
|
+
{ name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },
|
9
9
|
{ name: 'Departments', value: 'departments' },
|
10
10
|
{ name: 'Invites', value: 'invites' }
|
11
11
|
]"
|
@@ -28,46 +28,49 @@
|
|
28
28
|
/>
|
29
29
|
</Popup>
|
30
30
|
|
31
|
-
<
|
31
|
+
<Feed
|
32
32
|
v-if="tab === 'departments'"
|
33
|
-
|
33
|
+
:states="{
|
34
|
+
empty: {
|
35
|
+
title: 'No Departments Found',
|
36
|
+
description: 'Currently, there are no departments available.',
|
37
|
+
action: 'Add department',
|
38
|
+
callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)
|
39
|
+
}
|
40
|
+
}"
|
41
|
+
:store="{
|
42
|
+
read: (options) => departments.actions.read(options),
|
43
|
+
state: null
|
44
|
+
}"
|
45
|
+
:options="{
|
46
|
+
organization: route.params._id,
|
47
|
+
user: auth.state.user._id,
|
48
|
+
}"
|
49
|
+
v-slot="{
|
50
|
+
items
|
51
|
+
}"
|
34
52
|
>
|
35
|
-
<
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
:options="{
|
49
|
-
organization: route.params._id,
|
50
|
-
user: auth.state.user._id,
|
51
|
-
hidden: false,
|
52
|
-
}"
|
53
|
-
v-slot="{
|
54
|
-
items
|
53
|
+
<CardDepartment
|
54
|
+
v-for="(department, index) in items"
|
55
|
+
:key="index"
|
56
|
+
:department="department"
|
57
|
+
:organization="route.params._id"
|
58
|
+
class="radius-semi bg-grey pos-relative mn-b-thin"
|
59
|
+
/>
|
60
|
+
|
61
|
+
</Feed>
|
62
|
+
<router-link
|
63
|
+
v-if="tab === 'departments' && departments.state.departments.length > 0"
|
64
|
+
:to="{
|
65
|
+
path: `/organizations/${route.params._id}/departments/create`
|
55
66
|
}"
|
67
|
+
class="d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"
|
56
68
|
>
|
57
|
-
|
58
|
-
|
59
|
-
:key="index"
|
60
|
-
:department="department"
|
61
|
-
:organization="route.params._id"
|
62
|
-
class="radius-big bg-white pos-relative mn-b-thin"
|
63
|
-
/>
|
64
|
-
</Feed>
|
65
|
-
</Block>
|
66
|
-
|
67
|
-
<section class="mn-b-big radius-medium bg-white">
|
69
|
+
Add department
|
70
|
+
</router-link>
|
68
71
|
<!-- Members -->
|
69
72
|
<div
|
70
|
-
|
73
|
+
v-if="tab === 'members'"
|
71
74
|
class="cols-1 gap-thin"
|
72
75
|
>
|
73
76
|
<Feed
|
@@ -102,7 +105,10 @@
|
|
102
105
|
:role="member.label || member.role"
|
103
106
|
@click="$router.push(`/profile/${member.user._id}`)"
|
104
107
|
:action=" member.role !== 'owner' ? {
|
105
|
-
label:
|
108
|
+
label: {
|
109
|
+
is: IconDelete,
|
110
|
+
props: { class: 'i-medium', fill: 'rgb(var(--white)' }
|
111
|
+
},
|
106
112
|
method: () => removeMember(index, member)
|
107
113
|
} : null"
|
108
114
|
class="w-100 bg-grey radius-big flex-nowrap flex pd-medium"
|
@@ -139,14 +145,17 @@
|
|
139
145
|
:name="invite.email || invite.phone"
|
140
146
|
:role="invite.status"
|
141
147
|
:action="{
|
142
|
-
label:
|
148
|
+
label: {
|
149
|
+
is: IconDelete,
|
150
|
+
props: { class: 'i-medium', fill: 'rgb(var(--white)' }
|
151
|
+
},
|
143
152
|
method: () => removeInvite(index, invite)
|
144
153
|
}"
|
145
154
|
class="w-100 bg-grey radius-big flex-nowrap flex pd-medium"
|
146
155
|
/>
|
147
156
|
</Feed>
|
148
157
|
</div>
|
149
|
-
|
158
|
+
|
150
159
|
</div>
|
151
160
|
</template>
|
152
161
|
|
@@ -171,6 +180,8 @@ import MenuItem from '@pf/src/modules/mobile/components/Menu/MenuItem.vue'
|
|
171
180
|
import CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue';
|
172
181
|
import CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';
|
173
182
|
|
183
|
+
import IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'
|
184
|
+
|
174
185
|
import * as auth from '@pf/src/modules/auth/store/auth'
|
175
186
|
import * as invites from '@pf/src/modules/organizations/store/invites';
|
176
187
|
import * as memberships from '@pf/src/modules/organizations/store/memberships';
|
@@ -212,6 +223,7 @@ const FirstLevelDepartments = computed(() => {
|
|
212
223
|
});
|
213
224
|
|
214
225
|
async function handleSendInvite(list) {
|
226
|
+
console.log('invite.list')
|
215
227
|
await invites.actions.create({
|
216
228
|
owner: {
|
217
229
|
type: 'Organization',
|