@ozdao/prometheus-framework 0.2.95 → 0.2.96
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/components/Completion/Completion.vue +2 -2
- package/src/modules/globals/services/globals.crud.js +2 -0
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +1 -1
- package/src/modules/orders/controllers/orders.controller.js +3 -2
- package/src/modules/orders/routes/orders.routes.js +9 -9
- package/src/modules/orders/store/customers.store.js +1 -1
- package/src/modules/organizations/components/pages/Organizations.vue +2 -1
- package/src/modules/organizations/controllers/organizations.controller.js +5 -4
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/modules/users/components/sections/ProfileCompletion.vue +2 -2
- package/src/modules/users/components/pages/ProfileOrganizations.vue +0 -97
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<section class="w-100 radius-big pd-medium bg-
|
2
|
+
<section class="w-100 radius-big pd-medium bg-second t-black">
|
3
3
|
<div class="mn-b-thin flex-v-center flex-nowrap flex">
|
4
4
|
<h3>
|
5
5
|
{{text}}
|
@@ -22,7 +22,7 @@
|
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class=" w-100 h-2r pos-relative pd-nano bg-black radius-big">
|
25
|
-
<div :style="`width: ${completionPercentage}%`"class="h-100 bg-
|
25
|
+
<div :style="`width: ${completionPercentage}%`"class="h-100 bg-second mn-b-thin radius-big">
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
|
@@ -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
|
/>
|
@@ -80,7 +80,8 @@ const controllerFactory = (db) => {
|
|
80
80
|
// Создание заказа
|
81
81
|
const create = async (req, res) => {
|
82
82
|
const orderData = req.body;
|
83
|
-
|
83
|
+
|
84
|
+
const userId = req.userId || req.body.creator.target;
|
84
85
|
|
85
86
|
orderData.status = 'created';
|
86
87
|
|
@@ -185,7 +186,7 @@ const controllerFactory = (db) => {
|
|
185
186
|
// Добавление записи в историю изменений статусов
|
186
187
|
order.status_history.push({
|
187
188
|
status: req.body.status,
|
188
|
-
user: new db.mongoose.Types.ObjectId(req.userId),
|
189
|
+
user: new db.mongoose.Types.ObjectId(req.userId || req.body.creator.target),
|
189
190
|
timestamp: new Date(),
|
190
191
|
comment: ''
|
191
192
|
});
|
@@ -9,9 +9,9 @@ module.exports = function(app, db, origins, publicPath) {
|
|
9
9
|
|
10
10
|
app.post(
|
11
11
|
"/api/orders/create",
|
12
|
-
[
|
13
|
-
|
14
|
-
],
|
12
|
+
// [
|
13
|
+
// middleware.authJwt.verifyToken
|
14
|
+
// ],
|
15
15
|
controller.create
|
16
16
|
);
|
17
17
|
|
@@ -22,17 +22,17 @@ module.exports = function(app, db, origins, publicPath) {
|
|
22
22
|
|
23
23
|
app.post(
|
24
24
|
"/api/orders/update",
|
25
|
-
[
|
26
|
-
|
27
|
-
],
|
25
|
+
// [
|
26
|
+
// middleware.authJwt.verifyToken
|
27
|
+
// ],
|
28
28
|
controller.update
|
29
29
|
);
|
30
30
|
|
31
31
|
app.post(
|
32
32
|
"/api/orders/delete",
|
33
|
-
[
|
34
|
-
|
35
|
-
],
|
33
|
+
// [
|
34
|
+
// middleware.authJwt.verifyToken
|
35
|
+
// ],
|
36
36
|
controller.deleteOrder
|
37
37
|
);
|
38
38
|
};
|
@@ -371,10 +371,11 @@ const create = async (req, res) => {
|
|
371
371
|
const savedOrganization = await organization.save();
|
372
372
|
|
373
373
|
const membership = new Membership({
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
374
|
+
user: savedOrganization.owner,
|
375
|
+
type: 'organization',
|
376
|
+
target: savedOrganization._id,
|
377
|
+
role: 'owner',
|
378
|
+
label: 'owner',
|
378
379
|
});
|
379
380
|
|
380
381
|
const savedMembership = await membership.save();
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<section class="w-100 mn-b-semi radius-medium pd-medium bg-
|
2
|
+
<section class="w-100 mn-b-semi radius-medium pd-medium bg-second t-black">
|
3
3
|
<div class="mn-b-thin flex-v-center flex-nowrap flex">
|
4
4
|
<h4>
|
5
5
|
{{text}}
|
@@ -22,7 +22,7 @@
|
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class=" w-100 h-2r pos-relative pd-nano bg-black radius-big">
|
25
|
-
<div :style="`width: ${completionPercentage}%`"class="h-100 bg-
|
25
|
+
<div :style="`width: ${completionPercentage}%`"class="h-100 bg-second mn-b-thin radius-big">
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
|
@@ -1,97 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="pd-thin">
|
3
|
-
<header class="mn-b-medium flex-v-center flex-nowrap flex">
|
4
|
-
<h2 class="mn-r-medium">Groups</h2>
|
5
|
-
<button
|
6
|
-
v-if="auth.state.user._id === route.params._id"
|
7
|
-
@click="$router.push({
|
8
|
-
name: 'Create Organization'
|
9
|
-
})"
|
10
|
-
class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second">
|
11
|
-
+
|
12
|
-
</button>
|
13
|
-
</header>
|
14
|
-
|
15
|
-
<Tab
|
16
|
-
v-model:selected="tabOrganization"
|
17
|
-
:tabs="[
|
18
|
-
{ name: 'Member', value: 'member' },
|
19
|
-
{ name: 'Follower', value: 'follower' }
|
20
|
-
]"
|
21
|
-
class="mn-b-medium mn-r-medium o-hidden h5 radius-big bg-grey"
|
22
|
-
/>
|
23
|
-
|
24
|
-
<transition name="slide-fade">
|
25
|
-
<Feed
|
26
|
-
v-if="tabOrganization === 'member'"
|
27
|
-
:states="{
|
28
|
-
empty: {
|
29
|
-
title: 'No Organization Found',
|
30
|
-
description: 'Currently, there are no organization available.'
|
31
|
-
}
|
32
|
-
}"
|
33
|
-
:store="{
|
34
|
-
read: (options) => organizations.actions.read(options),
|
35
|
-
state: organizations.state
|
36
|
-
}"
|
37
|
-
:options="{
|
38
|
-
user: auth.state.user._id,
|
39
|
-
member: auth.state.user._id,
|
40
|
-
limit: 10
|
41
|
-
}"
|
42
|
-
v-slot="{
|
43
|
-
items
|
44
|
-
}"
|
45
|
-
>
|
46
|
-
<CardOrganization
|
47
|
-
v-for="organization in items"
|
48
|
-
:key="organization._id"
|
49
|
-
:organization="organization"
|
50
|
-
:user="auth.state.user"
|
51
|
-
:showProducts="false"
|
52
|
-
:showRating="false"
|
53
|
-
:showFeatured="false"
|
54
|
-
:showFollowers="false"
|
55
|
-
@updateMembership="handleMembershipUpdate"
|
56
|
-
class="mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"
|
57
|
-
/>
|
58
|
-
</Feed>
|
59
|
-
</transition>
|
60
|
-
|
61
|
-
<!-- <transition name="slide-fade">
|
62
|
-
<Feed
|
63
|
-
v-if="tabOrganization === 'follower'"
|
64
|
-
:user="auth.state.user._id"
|
65
|
-
:subscriber="route.params._id"
|
66
|
-
/>
|
67
|
-
</transition> -->
|
68
|
-
</div>
|
69
|
-
</template>
|
70
|
-
|
71
|
-
<script setup>
|
72
|
-
import { watch, ref } from 'vue'
|
73
|
-
import { useRoute, useRouter } from 'vue-router'
|
74
|
-
// Components
|
75
|
-
import Tab from '@pf/src/components/Tab/Tab.vue'
|
76
|
-
import Feed from '@pf/src/components/Feed/Feed.vue'
|
77
|
-
|
78
|
-
import CardOrganization from '@pf/src/modules/organizations/components/blocks/CardOrganization.vue'
|
79
|
-
|
80
|
-
// import Feed from '@pf/src/modules/organizations/components/sections/Feed.vue';
|
81
|
-
|
82
|
-
import * as auth from '@pf/src/modules/auth/store/auth';
|
83
|
-
import * as organizations from '@pf/src/modules/organizations/store/organizations'
|
84
|
-
// Accessing router
|
85
|
-
const route = useRoute()
|
86
|
-
const router = useRouter()
|
87
|
-
// State
|
88
|
-
let tab = route.query.tab ? route.query.tab : 'member';
|
89
|
-
|
90
|
-
const tabOrganization = ref(tab)
|
91
|
-
|
92
|
-
route.query.tab = tabOrganization.value
|
93
|
-
|
94
|
-
watch(tabOrganization, (newValue) => {
|
95
|
-
router.replace({ query: { ...route.query, tab: newValue } });
|
96
|
-
});
|
97
|
-
</script>
|