@ozdao/prometheus-framework 0.2.102 → 0.2.104

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. package/dist/main-CXObXjv-.js +92 -0
  2. package/dist/main-DPsHxX0l.mjs +13633 -0
  3. package/dist/main-DfD5hLQo.mjs +13633 -0
  4. package/dist/main-DwyUYWFX.js +92 -0
  5. package/dist/orders.server.js +16 -0
  6. package/dist/orders.server.mjs +16 -0
  7. package/dist/organizations.server.js +14 -3
  8. package/dist/organizations.server.mjs +14 -3
  9. package/dist/products.server.js +7 -1
  10. package/dist/products.server.mjs +7 -1
  11. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -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 +43 -41
  15. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
  17. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
  19. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
  21. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
  23. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +1 -36
  25. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +36 -1
  27. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  29. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  31. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.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 +1 -1
  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/OrderBackoffice.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +21 -21
  75. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  79. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  85. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +87 -67
  87. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +30 -31
  93. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +120 -88
  95. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  105. package/dist/prometheus-framework.cjs.js +1 -1
  106. package/dist/prometheus-framework.es.js +1 -1
  107. package/dist/style.css +1 -1
  108. package/dist/web-BNKN7kk3.mjs +54 -0
  109. package/dist/web-C0sFgeYh.mjs +54 -0
  110. package/dist/web-Douq6xn6.js +1 -0
  111. package/dist/web-kg3KgbAF.js +1 -0
  112. package/package.json +1 -1
  113. package/src/components/Feed/Feed.vue +11 -10
  114. package/src/modules/orders/controllers/orders.controller.js +20 -1
  115. package/src/modules/organizations/components/pages/Members.vue +1 -1
  116. package/src/modules/organizations/controllers/memberships.controller.js +22 -10
  117. package/src/modules/products/components/blocks/CardPosition.vue +32 -7
  118. package/src/modules/products/components/pages/EditLeftover.vue +0 -3
  119. package/src/modules/products/components/pages/ProductEdit.vue +51 -15
  120. package/src/modules/products/controllers/products.controller.js +1 -2
  121. package/src/modules/products/models/product.model.js +6 -0
  122. 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