@ozdao/prometheus-framework 0.2.58 → 0.2.60
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +23 -3
- package/dist/events.server.mjs +23 -3
- package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
- package/dist/metadata.schema-doiYQfuO.js +209 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -373
- package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +51 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +1 -51
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.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/community/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +1 -1
- 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/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
- 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/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/Event.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +44 -44
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.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 +31 -31
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +166 -123
- 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 +56 -45
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +19 -24
- 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 +1 -1
- 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 +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 +1 -1
- 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 +2 -2
- 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/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.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 +15 -15
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.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 +8 -8
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- 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 +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/events/components/elements/ButtonCheck.vue +106 -0
- package/src/modules/events/components/pages/Event.vue +10 -1
- package/src/modules/events/controllers/tickets.controller.js +31 -2
- package/src/modules/events/models/ticket.model.js +8 -0
- package/src/modules/globals/components/blocks/CardHeader.vue +1 -1
- package/src/modules/globals/models/ownership.schema.js +1 -1
- package/src/modules/orders/components/pages/EditOrder.vue +84 -29
- package/src/modules/orders/components/pages/Order.vue +10 -9
- package/src/modules/orders/components/pages/Orders.vue +30 -21
- package/src/modules/orders/controllers/orders.controller.js +1 -1
- package/src/modules/orders/models/order.model.js +10 -1
- package/src/modules/orders/store/orders.js +1 -6
- package/src/modules/products/components/blocks/CardPosition.vue +1 -1
- package/src/modules/products/components/pages/EditLeftover.vue +2 -2
@@ -149,7 +149,7 @@
|
|
149
149
|
v-if="orders.state.current.status_history"
|
150
150
|
:statusHistory="orders.state.current.status_history"
|
151
151
|
:statusCurrent="orders.state.current.status"
|
152
|
-
:edit="route.name === '
|
152
|
+
:edit="route.name === 'Order Edit'"
|
153
153
|
/>
|
154
154
|
|
155
155
|
<!-- <button
|
@@ -196,7 +196,7 @@
|
|
196
196
|
:username="
|
197
197
|
route.name === 'Order Status' ? order.user?.name || 'User' : 'Weeder Support'
|
198
198
|
"
|
199
|
-
:chatID="order
|
199
|
+
:chatID="route.params.order"
|
200
200
|
class="radius-semi bg-white o-hidden"
|
201
201
|
/>
|
202
202
|
|
@@ -232,37 +232,38 @@
|
|
232
232
|
|
233
233
|
onMounted(async()=>{
|
234
234
|
order.value = await orders.actions.read({_id: route.params.order})
|
235
|
+
order.value = order.value[0]
|
235
236
|
|
236
237
|
productsOrganization.value = await products.actions.read({
|
237
|
-
organization: order.value
|
238
|
+
organization: order.value?.owner.target._id
|
238
239
|
});
|
239
240
|
|
240
241
|
orderOrganization.value = await organizations.actions.read({
|
241
|
-
_id: order.value
|
242
|
-
|
242
|
+
_id: order.value?.owner.target._id,
|
243
|
+
location: globals.state.position?.location,
|
243
244
|
});
|
244
245
|
|
245
246
|
})
|
246
247
|
|
247
248
|
let cartTotalPrice = computed(() => {
|
248
|
-
return Number(order.value
|
249
|
+
return Number(order.value?.positions.reduce((total, product) => {
|
249
250
|
return total + product.price * product.quantity;
|
250
251
|
}, 0));
|
251
252
|
})
|
252
253
|
|
253
254
|
let cartTotalAmount = computed(() => {
|
254
|
-
return Number(order.value
|
255
|
+
return Number(order.value?.positions.reduce((total, product) => {
|
255
256
|
return total + product.quantity;
|
256
257
|
}, 0));
|
257
258
|
})
|
258
259
|
|
259
260
|
let orderProducts = computed(() => {
|
260
|
-
return order.value
|
261
|
+
return order.value?.positions.map(({ _id, quantity }) => {
|
261
262
|
|
262
263
|
const product = productsOrganization.value.find(product => product._id === _id)
|
263
264
|
|
264
265
|
console.log(product)
|
265
|
-
console.log(
|
266
|
+
console.log(productsOrganization)
|
266
267
|
|
267
268
|
return {
|
268
269
|
name: product.name,
|
@@ -26,18 +26,39 @@
|
|
26
26
|
class="cols-3 gap-thin"
|
27
27
|
>
|
28
28
|
|
29
|
-
<
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
<router-link
|
30
|
+
v-for="order in orders.state.all"
|
31
|
+
:to="{
|
32
|
+
name: 'Order Edit',
|
33
|
+
params: {
|
34
|
+
order: order._id
|
34
35
|
|
36
|
+
}
|
37
|
+
}"
|
38
|
+
class="bg-grey radius-big"
|
39
|
+
>
|
40
|
+
<CardHeader
|
41
|
+
:class="{
|
42
|
+
'mn-b-small pd-medium': type !== 'short',
|
43
|
+
'flex-child-order-last flex-child mn-l-small': type === 'short',
|
44
|
+
}"
|
45
|
+
:entity="order"
|
46
|
+
:entityType="'order'"
|
47
|
+
:user="auth.state.user"
|
48
|
+
:owner="order.creator"
|
49
|
+
:creator="order.creator"
|
50
|
+
:date="order.createdAt"
|
51
|
+
/>
|
52
|
+
<div class="pd-small">
|
35
53
|
<p
|
36
54
|
class="w-100 mn-b-thin p-big"
|
37
55
|
>
|
38
56
|
Order No.: #{{order._id}}
|
39
57
|
</p>
|
40
58
|
|
59
|
+
<span class="mn-b-thin pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase">
|
60
|
+
{{order.status}}
|
61
|
+
</span>
|
41
62
|
<p
|
42
63
|
class="mn-b-small t-transp w-100"
|
43
64
|
>
|
@@ -49,23 +70,9 @@
|
|
49
70
|
class="mn-b-small"
|
50
71
|
>
|
51
72
|
|
52
|
-
Order Created: {{formatDate(order.createdAt)}}
|
53
|
-
|
54
|
-
<router-link
|
55
|
-
:to="{
|
56
|
-
name: 'AdminOrderEdit',
|
57
|
-
params: {
|
58
|
-
order: order._id
|
59
|
-
|
60
|
-
}
|
61
|
-
}"
|
62
|
-
class="i-small"
|
63
|
-
>
|
64
|
-
EDIT
|
65
|
-
</router-link>
|
66
73
|
</p>
|
67
|
-
|
68
|
-
|
74
|
+
</div>
|
75
|
+
</router-link>
|
69
76
|
</section>
|
70
77
|
</template>
|
71
78
|
|
@@ -76,8 +83,10 @@
|
|
76
83
|
import Tab from '@pf/src/components/Tab/Tab.vue'
|
77
84
|
|
78
85
|
import * as orders from '@pf/src/modules/orders/store/orders';
|
86
|
+
import * as auth from '@pf/src/modules/auth/store/auth';
|
79
87
|
|
80
88
|
import CardOrder from '@pf/src/modules/orders/components/blocks/CardOrder.vue'
|
89
|
+
import CardHeader from '@pf/src/modules/globals/components/blocks/CardHeader.vue'
|
81
90
|
|
82
91
|
const route = useRoute();
|
83
92
|
const router = useRouter();
|
@@ -64,7 +64,7 @@ const controllerFactory = (db) => {
|
|
64
64
|
req.query
|
65
65
|
),
|
66
66
|
// For creator
|
67
|
-
queryProcessorGlobals.getCreatorUserLookupStage(),
|
67
|
+
queryProcessorGlobals.getCreatorUserLookupStage(),
|
68
68
|
queryProcessorGlobals.getCreatorOrganizationLookupStage(),
|
69
69
|
// For owner
|
70
70
|
queryProcessorGlobals.getOwnerUserLookupStage(),
|
@@ -4,6 +4,15 @@ module.exports = (db) => {
|
|
4
4
|
|
5
5
|
const OrderSchema = new db.mongoose.Schema({
|
6
6
|
client: {
|
7
|
+
type: {
|
8
|
+
type: String,
|
9
|
+
trim: true
|
10
|
+
},
|
11
|
+
target: {
|
12
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
13
|
+
refPath: 'client.type',
|
14
|
+
},
|
15
|
+
table: { type: String, trim: true },
|
7
16
|
name: { type: String, trim: true },
|
8
17
|
phone: { type: Object, trim: true },
|
9
18
|
email: { type: String, trim: true },
|
@@ -72,7 +81,7 @@ module.exports = (db) => {
|
|
72
81
|
}
|
73
82
|
});
|
74
83
|
|
75
|
-
|
84
|
+
applyOwnershipSchema(OrderSchema,db);
|
76
85
|
|
77
86
|
const Order = db.mongoose.model("Order", OrderSchema);
|
78
87
|
|
@@ -50,13 +50,8 @@ const state = reactive({
|
|
50
50
|
});
|
51
51
|
|
52
52
|
const actions = {
|
53
|
-
async create(
|
53
|
+
async create(order) {
|
54
54
|
try {
|
55
|
-
let order = {
|
56
|
-
positions: positions,
|
57
|
-
owner: owner,
|
58
|
-
creator: creator
|
59
|
-
}
|
60
55
|
const response = await $axios.post('/api/orders/create', order);
|
61
56
|
|
62
57
|
state.all.push(response.data);
|
@@ -111,9 +111,9 @@
|
|
111
111
|
const productNew = ref(null);
|
112
112
|
|
113
113
|
const totalPrice = computed(() => {
|
114
|
-
return leftovers.state.current.positions.reduce((sum, position) => {
|
114
|
+
return Number(leftovers.state.current.positions.reduce((sum, position) => {
|
115
115
|
return sum + position.price;
|
116
|
-
}, 0);
|
116
|
+
}, 0));
|
117
117
|
});
|
118
118
|
|
119
119
|
onMounted(async () => {
|