@ozdao/prometheus-framework 0.2.101 → 0.2.103

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/main-DfD5hLQo.mjs +13633 -0
  2. package/dist/main-DwyUYWFX.js +92 -0
  3. package/dist/orders.server.js +16 -0
  4. package/dist/orders.server.mjs +16 -0
  5. package/dist/products.server.js +7 -1
  6. package/dist/products.server.mjs +7 -1
  7. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  9. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -94
  11. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +94 -1
  13. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +23 -21
  15. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
  17. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
  19. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  21. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +1 -36
  23. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +36 -1
  25. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
  27. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -1
  29. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  43. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  63. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  69. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  73. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  75. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  81. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  85. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  107. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +87 -67
  109. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +30 -31
  119. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +120 -88
  123. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  129. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  131. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  135. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  139. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  143. package/dist/prometheus-framework.cjs.js +1 -1
  144. package/dist/prometheus-framework.es.js +1 -1
  145. package/dist/style.css +1 -1
  146. package/dist/web-C0sFgeYh.mjs +54 -0
  147. package/dist/web-kg3KgbAF.js +1 -0
  148. package/package.json +1 -1
  149. package/src/components/Feed/Feed.vue +9 -10
  150. package/src/modules/orders/controllers/orders.controller.js +20 -1
  151. package/src/modules/products/components/blocks/CardPosition.vue +32 -7
  152. package/src/modules/products/components/pages/EditLeftover.vue +0 -3
  153. package/src/modules/products/components/pages/ProductEdit.vue +51 -15
  154. package/src/modules/products/controllers/products.controller.js +1 -2
  155. package/src/modules/products/models/product.model.js +6 -0
  156. package/src/modules/products/routes/products.routes.js +1 -10
@@ -61,6 +61,7 @@
61
61
  :product="product"
62
62
  :array="products.state.current.ingredients"
63
63
  :products="Products"
64
+ :showPrice="false"
64
65
  @add="(item) => {
65
66
  globals.actions.add(products.state.current.ingredients, item);
66
67
  closeIngredientPopup();
@@ -77,6 +78,53 @@
77
78
  </div>
78
79
  </Block>
79
80
 
81
+ <Popup
82
+ title="Add ingredient"
83
+ @close-popup="closeIngredientPopup"
84
+ :isPopupOpen="isOpenIngredientPopup"
85
+ class="bg-white w-min-30r w-max-30r radius-big pd-medium"
86
+ >
87
+ <div class="bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big">
88
+ <Feed
89
+ :search="{
90
+ class: 'bg-white mn-b-thin'
91
+ }"
92
+ :states="{
93
+ empty: {
94
+ title: 'No Products Found',
95
+ description: 'Currently, there are no such products available.'
96
+ }
97
+ }"
98
+ :store="{
99
+ read: (options) => products.actions.read(options),
100
+ state: null
101
+ }"
102
+ :options="{
103
+ organization: route.params._id
104
+ }"
105
+ v-slot="{
106
+ items
107
+ }"
108
+ class=""
109
+ >
110
+ <CardOrderItem
111
+ v-for="(product, index) in items" :key="product._id"
112
+ :editable="false"
113
+ :product="product"
114
+ @click="() => {
115
+ let p = { ...product };
116
+ p.quantity = 1;
117
+ p.type = 'pcs'
118
+ globals.actions.add(products.state.current.ingredients,p)
119
+ closeIngredientPopup();
120
+ }"
121
+ class="bg-white pd-thin radius-medium w-100 mn-b-thin"
122
+ />
123
+ </Feed>
124
+ </div>
125
+ </Popup>
126
+
127
+
80
128
  </div>
81
129
 
82
130
  <Block
@@ -207,21 +255,7 @@
207
255
  :product="products.state.current"
208
256
  /> -->
209
257
 
210
- <Popup
211
- title="Add ingredient"
212
- @close-popup="closeIngredientPopup"
213
- :isPopupOpen="isOpenIngredientPopup"
214
- class="bg-white pd-big radius-big"
215
- >
216
- <CardPosition
217
- @add="(item) => globals.actions.add(
218
- products.state.current.ingredients,
219
- item
220
- )"
221
- :products="Products"
222
- class="flex-column"
223
- />
224
- </Popup>
258
+
225
259
 
226
260
 
227
261
 
@@ -242,12 +276,14 @@
242
276
  import Checkbox from "@pf/src/components/Checkbox/Checkbox.vue";
243
277
  import Button from "@pf/src/components/Button/Button.vue";
244
278
  import Popup from "@pf/src/components/Popup/Popup.vue";
279
+ import Feed from "@pf/src/components/Feed/Feed.vue";
245
280
 
246
281
  import EditImages from '@pf/src/components/EditImages/EditImages.vue';
247
282
 
248
283
  import IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue';
249
284
 
250
285
  import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';
286
+ import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'
251
287
 
252
288
 
253
289
  import EditProductInfo from '@pf/src/modules/products/components/sections/EditProductInfo.vue';
@@ -10,7 +10,6 @@ const openai = new OpenAI({
10
10
  apiKey: process.env.OPENAI_API_KEY,
11
11
  });
12
12
 
13
-
14
13
  // Factory
15
14
  const controllerFactory = (db) => {
16
15
  const Product = db.product;
@@ -126,7 +125,7 @@ const controllerFactory = (db) => {
126
125
  console.log(query)
127
126
 
128
127
  // Fetching products
129
- const products = await Product.find(query, null, options);
128
+ const products = await Product.find(query, null, options).populate('ingredients._id')
130
129
 
131
130
  if (!products.length) {
132
131
  return res.status(200).json([]);
@@ -35,6 +35,7 @@ module.exports = (mongoose) => {
35
35
  price: {
36
36
  type: Number,
37
37
  required: true,
38
+ default: 0,
38
39
  min: [0, 'Price cannot be less than 0']
39
40
  },
40
41
  quantity: {
@@ -42,6 +43,11 @@ module.exports = (mongoose) => {
42
43
  required: true,
43
44
  min: [1, 'Quantity cannot be less than 1']
44
45
  },
46
+ type: {
47
+ type: String,
48
+ required: true,
49
+ default: 'g'
50
+ },
45
51
  }],
46
52
  quantityDiscount: [{
47
53
  quantity: {
@@ -23,16 +23,7 @@ module.exports = function(app, db, allowedOrigins) {
23
23
  "/api/products/:_id",
24
24
  controller.Delete
25
25
  );
26
- // Get products
27
- // app.get(
28
- // "/products",
29
- // controller.getProducts
30
- // );
31
- // app.get(
32
- // "/products/popular",
33
- // controller.getProductsPopular
34
- // );
35
- // // Get recommendation
26
+
36
27
  app.post(
37
28
  "/api/product/recommended",
38
29
  controller.getProductRecommendation