@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.
Files changed (93) hide show
  1. package/dist/products.server.js +8 -1
  2. package/dist/products.server.mjs +8 -1
  3. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +55 -1
  5. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -55
  7. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +20 -20
  9. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Select/Select.vue.js +97 -1
  11. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -97
  13. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  22. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  23. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  24. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  25. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  43. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  45. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  63. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +54 -48
  69. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +18 -18
  71. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +28 -33
  73. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +58 -44
  75. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +8 -8
  79. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  83. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  85. package/dist/style.css +1 -1
  86. package/package.json +1 -1
  87. package/src/components/Feed/Feed.vue +2 -1
  88. package/src/modules/products/components/pages/EditLeftover.vue +98 -86
  89. package/src/modules/products/components/pages/Leftovers.vue +3 -3
  90. package/src/modules/products/components/pages/Product.vue +2 -2
  91. package/src/modules/products/components/pages/Products.vue +12 -11
  92. package/src/modules/products/controllers/leftovers.controller.js +10 -1
  93. 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: 'AddProduct'
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="tab"
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
- status: tab === 'all' ? '' : tab ? tab : ''
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
- // const tab = ref(route.query.tab ? route.query.tab : 'all')
108
+ const tabProducts = ref(route.query.tabProducts ? route.query.tabProducts : 'all')
108
109
 
109
- // route.query.tab = tab.value
110
+ route.query.tabProducts = tabProducts.value
110
111
 
111
- // watch(tab, (newValue) => {
112
- // router.replace({ query: { ...route.query, tab: newValue } });
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) {