@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.
Files changed (104) hide show
  1. package/dist/community.server.js +1 -1
  2. package/dist/community.server.mjs +1 -1
  3. package/dist/events.server.js +23 -3
  4. package/dist/events.server.mjs +23 -3
  5. package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
  6. package/dist/metadata.schema-doiYQfuO.js +209 -0
  7. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  9. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -373
  11. package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +51 -1
  13. package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +1 -51
  15. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  17. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  19. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  21. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  36. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  37. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  42. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +44 -44
  43. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +31 -31
  51. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  55. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +166 -123
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +56 -45
  61. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/orders/store/orders.js +19 -24
  63. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +15 -15
  77. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +8 -8
  81. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  89. package/dist/style.css +1 -1
  90. package/package.json +1 -1
  91. package/src/modules/events/components/elements/ButtonCheck.vue +106 -0
  92. package/src/modules/events/components/pages/Event.vue +10 -1
  93. package/src/modules/events/controllers/tickets.controller.js +31 -2
  94. package/src/modules/events/models/ticket.model.js +8 -0
  95. package/src/modules/globals/components/blocks/CardHeader.vue +1 -1
  96. package/src/modules/globals/models/ownership.schema.js +1 -1
  97. package/src/modules/orders/components/pages/EditOrder.vue +84 -29
  98. package/src/modules/orders/components/pages/Order.vue +10 -9
  99. package/src/modules/orders/components/pages/Orders.vue +30 -21
  100. package/src/modules/orders/controllers/orders.controller.js +1 -1
  101. package/src/modules/orders/models/order.model.js +10 -1
  102. package/src/modules/orders/store/orders.js +1 -6
  103. package/src/modules/products/components/blocks/CardPosition.vue +1 -1
  104. 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 === 'AdminOrderEdit'"
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._id"
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[0].owner.target
238
+ organization: order.value?.owner.target._id
238
239
  });
239
240
 
240
241
  orderOrganization.value = await organizations.actions.read({
241
- _id: order.value[0].owner.target,
242
- // location: globals.state.position?.location,
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[0]?.positions.reduce((total, product) => {
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[0]?.positions.reduce((total, product) => {
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[0]?.positions.map(({ _id, quantity }) => {
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(productOrganization)
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
- <div
30
- v-for="order in orders.state.all"
31
- class="bg-grey pd-small radius-big"
32
- >
33
- Status: {{order.status}}
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
- </div>
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
- // applyOwnershipSchema(OrderSchema,db);
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(positions, owner, creator) {
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);
@@ -19,7 +19,7 @@
19
19
  <Field
20
20
  v-model:field="productQuantity"
21
21
  type="number"
22
- label="Quantity"
22
+ label="Qty"
23
23
  class="bg-white pd-small radius-small"
24
24
  >
25
25
  <Select
@@ -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 () => {