@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.
- package/dist/main-CXObXjv-.js +92 -0
- package/dist/main-DPsHxX0l.mjs +13633 -0
- package/dist/main-DfD5hLQo.mjs +13633 -0
- package/dist/main-DwyUYWFX.js +92 -0
- package/dist/orders.server.js +16 -0
- package/dist/orders.server.mjs +16 -0
- package/dist/organizations.server.js +14 -3
- package/dist/organizations.server.mjs +14 -3
- package/dist/products.server.js +7 -1
- package/dist/products.server.mjs +7 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +43 -41
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +1 -36
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +36 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- 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/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.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/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.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/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.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 +1 -1
- 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/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- 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 +2 -2
- 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 +21 -21
- 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/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- 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 +87 -67
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.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 +30 -31
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +120 -88
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.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/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- 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/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-BNKN7kk3.mjs +54 -0
- package/dist/web-C0sFgeYh.mjs +54 -0
- package/dist/web-Douq6xn6.js +1 -0
- package/dist/web-kg3KgbAF.js +1 -0
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +11 -10
- package/src/modules/orders/controllers/orders.controller.js +20 -1
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +22 -10
- package/src/modules/products/components/blocks/CardPosition.vue +32 -7
- package/src/modules/products/components/pages/EditLeftover.vue +0 -3
- package/src/modules/products/components/pages/ProductEdit.vue +51 -15
- package/src/modules/products/controllers/products.controller.js +1 -2
- package/src/modules/products/models/product.model.js +6 -0
- 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
|
-
|
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
|
-
|
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
|