@ozdao/prometheus-framework 0.2.62 → 0.2.64
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/products.server.js +8 -1
- package/dist/products.server.mjs +8 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +55 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -55
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +20 -20
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +97 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -97
- 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/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
- 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/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.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/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
- 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/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.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 +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 +54 -48
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +28 -33
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +58 -44
- 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/store/leftovers.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +8 -8
- 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 +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 +2 -2
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +2 -1
- package/src/modules/products/components/pages/EditLeftover.vue +98 -86
- package/src/modules/products/components/pages/Leftovers.vue +3 -3
- package/src/modules/products/components/pages/Product.vue +2 -2
- package/src/modules/products/components/pages/Products.vue +12 -11
- package/src/modules/products/controllers/leftovers.controller.js +10 -1
- package/src/modules/products/store/leftovers.js +2 -2
@@ -41,8 +41,7 @@
|
|
41
41
|
:tabs="[
|
42
42
|
{ name: 'All', value: 'all' },
|
43
43
|
{ name: 'Stock-In', value: 'stock-in' },
|
44
|
-
{ name: 'Stock-Out', value: 'stock-out' }
|
45
|
-
{ name: 'Write-Off', value: 'write-off' },
|
44
|
+
{ name: 'Stock-Out', value: 'stock-out' }
|
46
45
|
]"
|
47
46
|
class="mn-b-small o-hidden h5 radius-big bg-grey"
|
48
47
|
/>
|
@@ -59,7 +58,8 @@
|
|
59
58
|
}"
|
60
59
|
:options="{
|
61
60
|
limit: 15,
|
62
|
-
organization: route.params._id
|
61
|
+
organization: route.params._id,
|
62
|
+
...(tab !== 'all' && { type: tab })
|
63
63
|
// user: user
|
64
64
|
}"
|
65
65
|
v-slot="{
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="flex flex-column w-100 o-hidden gap-thin pd-thin">
|
3
3
|
<!-- <Breadcrumbs class="bg-grey radius-big pd-small"/> -->
|
4
|
-
{{product.quantity}}
|
4
|
+
<!-- {{product.quantity}}
|
5
5
|
<div v-if="product.ingredients">
|
6
6
|
{{product?.ingredients[0]?._id}}
|
7
7
|
{{product?.ingredients[0]?.quantity}}
|
8
8
|
{{product?.ingredients[1]?.quantity}}
|
9
|
-
</div>
|
9
|
+
</div> -->
|
10
10
|
<SectionProduct v-if="product" :product="product" :user="auth.state.user" class="pos-relative"/>
|
11
11
|
|
12
12
|
<PopularProducts />
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<template>
|
2
|
+
<div class="pd-thin">
|
2
3
|
<header
|
3
4
|
v-if="route.name !== 'Organization'"
|
4
5
|
class="mn-b-medium flex-v-center flex-nowrap flex"
|
@@ -6,16 +7,16 @@
|
|
6
7
|
<h2 class="mn-r-medium">Products</h2>
|
7
8
|
<button
|
8
9
|
@click="$router.push({
|
9
|
-
name: '
|
10
|
+
name: 'ProductAdd'
|
10
11
|
})"
|
11
12
|
class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second">
|
12
13
|
+
|
13
14
|
</button>
|
14
15
|
</header>
|
15
|
-
|
16
|
+
|
16
17
|
<Tab
|
17
18
|
v-if="route.name !== 'Organization'"
|
18
|
-
v-model:selected="
|
19
|
+
v-model:selected="tabProducts"
|
19
20
|
:tabs="[
|
20
21
|
{ name: 'All', value: 'all' },
|
21
22
|
{ name: 'Published', value: 'published' },
|
@@ -24,7 +25,7 @@
|
|
24
25
|
]"
|
25
26
|
class="mn-b-small o-hidden h5 radius-big bg-grey"
|
26
27
|
/>
|
27
|
-
|
28
|
+
|
28
29
|
<div class="cols-2-1_3 bg-grey pd-thin radius-big gap-thin">
|
29
30
|
|
30
31
|
<FilterProducts
|
@@ -37,7 +38,6 @@
|
|
37
38
|
placeholder="Enter product name"
|
38
39
|
class="bg-white mn-b-thin"
|
39
40
|
/>
|
40
|
-
{{tab}}
|
41
41
|
<Feed
|
42
42
|
:states="{
|
43
43
|
empty: {
|
@@ -56,7 +56,7 @@
|
|
56
56
|
prices: route.query.prices,
|
57
57
|
delivery: route.query.delivery,
|
58
58
|
search: route.query.search,
|
59
|
-
|
59
|
+
...(tabProducts !== 'all' && { status: tabProducts })
|
60
60
|
// user: user
|
61
61
|
}"
|
62
62
|
v-slot="{
|
@@ -80,6 +80,7 @@
|
|
80
80
|
</Feed>
|
81
81
|
</div>
|
82
82
|
</div>
|
83
|
+
</div>
|
83
84
|
</template>
|
84
85
|
|
85
86
|
|
@@ -104,13 +105,13 @@
|
|
104
105
|
const router = useRouter()
|
105
106
|
|
106
107
|
// Tab logic
|
107
|
-
|
108
|
+
const tabProducts = ref(route.query.tabProducts ? route.query.tabProducts : 'all')
|
108
109
|
|
109
|
-
|
110
|
+
route.query.tabProducts = tabProducts.value
|
110
111
|
|
111
|
-
|
112
|
-
|
113
|
-
|
112
|
+
watch(tabProducts, (newValue) => {
|
113
|
+
router.replace({ query: { ...route.query, tabProducts: newValue } });
|
114
|
+
});
|
114
115
|
|
115
116
|
function updateSearch(search) {
|
116
117
|
let query = { ...route.query}
|
@@ -12,6 +12,10 @@ const controllerFactory = (db) => {
|
|
12
12
|
query.organization = new db.mongoose.Types.ObjectId(req.query.organization);
|
13
13
|
}
|
14
14
|
|
15
|
+
if (req.query.type) {
|
16
|
+
query.type = req.query.type;
|
17
|
+
}
|
18
|
+
|
15
19
|
console.log(query);
|
16
20
|
|
17
21
|
const leftoveres = await Leftover.find(query, null, options)
|
@@ -31,17 +35,22 @@ const controllerFactory = (db) => {
|
|
31
35
|
|
32
36
|
const create = async (req, res) => {
|
33
37
|
try {
|
38
|
+
|
39
|
+
console.log(req.body)
|
34
40
|
const leftover = await Leftover.create({
|
35
41
|
organization: req.body.organization,
|
36
42
|
type: req.body.type,
|
37
43
|
order: req.body.order,
|
38
|
-
positions: req.body.positions
|
44
|
+
positions: req.body.positions,
|
45
|
+
creator: req.body.creator,
|
46
|
+
owner: req.body.owner
|
39
47
|
});
|
40
48
|
if (!leftover) {
|
41
49
|
return res.status(404).send({ message: "ERROR_CREATING_LEFTOVER" });
|
42
50
|
}
|
43
51
|
res.status(200).send(leftover);
|
44
52
|
} catch (err) {
|
53
|
+
console.log(err)
|
45
54
|
res.status(500).send({ message: "ERROR_CREATE_LEFTOVER" });
|
46
55
|
}
|
47
56
|
};
|
@@ -41,9 +41,9 @@ const actions = {
|
|
41
41
|
}
|
42
42
|
},
|
43
43
|
|
44
|
-
async create({ organization, type, order, positions }) {
|
44
|
+
async create({ organization, type, order, positions, creator, owner }) {
|
45
45
|
try {
|
46
|
-
const response = await $axios.post('/leftovers', { organization, type, order, positions });
|
46
|
+
const response = await $axios.post('/leftovers', { organization, type, order, positions, creator, owner });
|
47
47
|
state.all.push(response.data);
|
48
48
|
return response.data;
|
49
49
|
} catch (error) {
|