@ozdao/prometheus-framework 0.2.51 → 0.2.53

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/dist/main-0a2437f4.js +91 -0
  2. package/dist/main-482dc398.mjs +13626 -0
  3. package/dist/main-4fnApBsF.js +91 -0
  4. package/dist/main-b2JI9sFg.js +91 -0
  5. package/dist/main-c56d4c09.js +91 -0
  6. package/dist/main-cdd0be68.mjs +13628 -0
  7. package/dist/main-kjbLXQEa.mjs +13606 -0
  8. package/dist/main-x-9D8zvb.mjs +13604 -0
  9. package/dist/main.css +1 -1
  10. package/dist/organizations.server.js +2 -2
  11. package/dist/organizations.server.mjs +2 -2
  12. package/dist/products.server.js +81 -56
  13. package/dist/products.server.mjs +81 -56
  14. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +18 -20
  16. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +19 -19
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +28 -26
  20. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +2 -2
  22. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Map/Map.vue.js +35 -2
  24. package/dist/prometheus-framework/src/components/Map/Map.vue2.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Map/Map.vue2.js +2 -35
  26. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  28. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -0
  29. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +37 -0
  30. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -14
  32. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.cjs +1 -0
  33. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.js +24 -0
  34. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  38. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  40. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +49 -101
  42. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +25 -25
  43. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +68 -39
  45. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +38 -48
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +69 -62
  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 +131 -126
  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 +117 -146
  55. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +13 -13
  57. package/dist/prometheus-framework/src/modules/organizations/router/products.router.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/router/products.router.js +22 -0
  59. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -0
  60. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js +45 -0
  61. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.cjs +1 -0
  62. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.js +4 -0
  63. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -0
  64. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +79 -0
  65. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -0
  66. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +193 -0
  67. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.cjs +1 -0
  68. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.js +4 -0
  69. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +43 -43
  71. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +65 -55
  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 +64 -51
  75. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +35 -33
  77. package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/products.client.js +2 -2
  79. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/store/categories.js +39 -27
  81. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/store/products.js +23 -23
  83. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  87. package/dist/prometheus-framework.cjs.js +1 -1
  88. package/dist/prometheus-framework.es.js +1 -1
  89. package/dist/style.css +1 -1
  90. package/dist/web-0066fd51.mjs +55 -0
  91. package/dist/web-6b9fa713.js +1 -0
  92. package/dist/web-6dcbb74b.mjs +55 -0
  93. package/dist/web-caJAdsxy.js +1 -0
  94. package/dist/web-ee302c1d.js +1 -0
  95. package/dist/web-i08OVMw9.mjs +55 -0
  96. package/dist/web-ngl7bNhF.js +1 -0
  97. package/dist/web-t91TrxXa.mjs +55 -0
  98. package/package.json +1 -1
  99. package/src/components/Button/Button.vue +4 -6
  100. package/src/components/Feed/Feed.vue +2 -1
  101. package/src/components/Field/Field.vue +3 -1
  102. package/src/components/LocationMarker/LocationMarker.vue +1 -0
  103. package/src/modules/applications/applications.client.js +0 -1
  104. package/src/modules/globals/components/blocks/BlockSearch.vue +42 -0
  105. package/src/modules/icons/entities/IconProfile.vue +10 -1
  106. package/src/modules/icons/entities/IconShopcart.vue +12 -2
  107. package/src/modules/marketplace/components/layouts/Marketplace.vue +7 -14
  108. package/src/modules/marketplace/components/sections/Filters.vue +7 -1
  109. package/src/modules/mobile/components/NavigationBar/NavigationBar.vue +27 -7
  110. package/src/modules/orders/components/partials/ShopCart.vue +4 -1
  111. package/src/modules/organizations/components/blocks/CardDepartment.vue +34 -66
  112. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +50 -13
  113. package/src/modules/organizations/components/blocks/User.vue +18 -9
  114. package/src/modules/organizations/components/pages/Department.vue +19 -3
  115. package/src/modules/organizations/components/pages/DepartmentEdit.vue +14 -10
  116. package/src/modules/organizations/components/pages/Organization.vue +38 -71
  117. package/src/modules/organizations/components/sections/Feed.vue +1 -1
  118. package/src/modules/organizations/controllers/memberships.controller.js +2 -2
  119. package/src/modules/organizations/controllers/organizations.controller.js +0 -1
  120. package/src/modules/organizations/router/products.router.js +24 -4
  121. package/src/modules/products/components/blocks/CardCategory.vue +53 -0
  122. package/src/modules/products/components/pages/Categories.vue +90 -0
  123. package/src/modules/products/components/pages/CategoryEdit.vue +214 -0
  124. package/src/modules/products/components/pages/EditLeftover.vue +6 -4
  125. package/src/modules/products/components/pages/ProductEdit.vue +9 -1
  126. package/src/modules/products/components/pages/Products.vue +58 -38
  127. package/src/modules/products/components/sections/FilterProducts.vue +9 -6
  128. package/src/modules/products/controllers/categories.controller.js +30 -13
  129. package/src/modules/products/controllers/leftovers.controller.js +12 -5
  130. package/src/modules/products/controllers/products.controller.js +18 -0
  131. package/src/modules/products/models/category.model.js +42 -32
  132. package/src/modules/products/products.client.js +4 -2
  133. package/src/modules/products/store/categories.js +17 -3
  134. package/src/modules/products/store/products.js +4 -0
  135. package/src/modules/backoffice/components/admin/Categories.vue +0 -53
  136. package/src/modules/backoffice/components/admin/CategoryEdit.vue +0 -98
  137. package/src/modules/products/components/blocks/CategoryCard.vue +0 -42
  138. package/src/modules/products/router/products.router.js +0 -48
  139. /package/src/modules/{products → organizations}/components/pages/OrganizationCreate.vue +0 -0
  140. /package/src/modules/{products → organizations}/components/pages/OrganizationDetails.vue +0 -0
  141. /package/src/modules/{products → organizations}/components/pages/OrganizationDocuments.vue +0 -0
  142. /package/src/modules/{products → organizations}/components/pages/OrganizationPeople.vue +0 -0
@@ -1,4 +1,4 @@
1
- import { ref as U, onMounted as V, openBlock as r, createElementBlock as s, createVNode as a, withCtx as i, createElementVNode as c, toDisplayString as q, unref as C, createBlock as x, createTextVNode as P, createCommentVNode as A, Fragment as m, renderList as f } from "vue";
1
+ import { ref as P, onMounted as V, openBlock as i, createElementBlock as s, createVNode as a, withCtx as r, createElementVNode as c, toDisplayString as q, unref as b, createBlock as y, createTextVNode as D, createCommentVNode as A, Fragment as m, renderList as f } from "vue";
2
2
  import { useRoute as B, useRouter as E } from "vue-router";
3
3
  import "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
@@ -6,27 +6,26 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import d from "../../../../components/Block/Block.vue.js";
7
7
  import "../../../../components/Tab/Tab.vue.js";
8
8
  import p from "../../../../components/Field/Field.vue2.js";
9
- import "../../../../components/Select/Select.vue.js";
10
9
  import R from "../../../../components/Checkbox/Checkbox.vue.js";
11
- import D from "../../../../components/Button/Button.vue2.js";
10
+ import $ from "../../../../components/Button/Button.vue2.js";
12
11
  import S from "../../../../components/Popup/Popup.vue2.js";
13
12
  import T from "../../../../components/EditImages/EditImages.vue.js";
14
- import y from "../../../icons/navigation/IconDelete.vue.js";
15
- import $ from "../blocks/CardPosition.vue.js";
13
+ import k from "../../../icons/navigation/IconDelete.vue.js";
14
+ import z from "../blocks/CardPosition.vue.js";
16
15
  import F from "../sections/EditProductInfo.vue.js";
17
- import { actions as b } from "../../../globals/store/globals.js";
16
+ import { actions as v } from "../../../globals/store/globals.js";
18
17
  import { state as e, actions as g } from "../../store/products.js";
19
18
  import { actions as L, state as Q } from "../../store/categories.js";
20
19
  import "./ProductEdit.vue2.js";
21
- const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class: "mn-r-auto" }, G = { class: "cols-2 gap-thin" }, H = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, J = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, K = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, W = { class: "cols-1 gap-thin" }, be = {
20
+ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class: "mn-r-auto" }, G = { class: "cols-2 gap-thin" }, H = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, J = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, K = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, W = { class: "cols-1 gap-thin" }, he = {
22
21
  __name: "ProductEdit",
23
22
  setup(X) {
24
- const o = B(), z = E(), v = U(e.all), w = U(!1);
23
+ const o = B(), U = E(), w = P(e.all), x = P(!1);
25
24
  function N(h) {
26
- w.value = !0;
25
+ x.value = !0;
27
26
  }
28
27
  function _() {
29
- w.value = !1;
28
+ x.value = !1;
30
29
  }
31
30
  V(async () => {
32
31
  await L.fetchCategories();
@@ -35,48 +34,48 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
35
34
  organization: o.params._id,
36
35
  limit: 100
37
36
  });
38
- v.value = h;
37
+ w.value = h;
39
38
  } catch {
40
39
  console.error("error");
41
40
  }
42
41
  o.params.product && await g.read({ _id: o.params.product }), e.current.ingredients || (e.current.ingredients = []);
43
42
  });
44
- function I() {
43
+ function O() {
45
44
  o.params.product ? g.update(o.params.product, e.current) : g.create(o.params._id, e.current);
46
45
  }
47
- function O() {
46
+ function I() {
48
47
  g.deleteProduct(e.current._id);
49
48
  }
50
- function k() {
51
- z.push({
49
+ function C() {
50
+ U.push({
52
51
  name: "Organization",
53
52
  params: {
54
53
  _id: o.params._id
55
54
  }
56
55
  });
57
56
  }
58
- return (h, u) => (r(), s("div", M, [
57
+ return (h, u) => (i(), s("div", M, [
59
58
  a(d, { class: "flex-nowrap flex-v-center flex" }, {
60
- default: i(() => [
61
- c("h1", j, q(C(o).params.product ? e.current.name : "Create Product"), 1),
62
- C(o).params.product ? (r(), x(D, {
59
+ default: r(() => [
60
+ c("h1", j, q(b(o).params.product ? e.current.name : "Create Product"), 1),
61
+ b(o).params.product ? (i(), y($, {
63
62
  key: 0,
64
- submit: O,
65
- callback: k,
63
+ submit: I,
64
+ callback: C,
66
65
  class: "bg-red mn-r-thin"
67
66
  }, {
68
- default: i(() => [
69
- P(" Delete ")
67
+ default: r(() => [
68
+ D(" Delete ")
70
69
  ]),
71
70
  _: 1
72
71
  })) : A("", !0),
73
- a(D, {
74
- submit: I,
75
- callback: k,
72
+ a($, {
73
+ submit: O,
74
+ callback: C,
76
75
  class: "bg-main"
77
76
  }, {
78
- default: i(() => [
79
- P(" Save ")
77
+ default: r(() => [
78
+ D(" Save ")
80
79
  ]),
81
80
  _: 1
82
81
  })
@@ -87,7 +86,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
87
86
  placeholder: "The product doesn't have any images yet.",
88
87
  class: "h-min"
89
88
  }, {
90
- default: i(() => [
89
+ default: r(() => [
91
90
  a(T, {
92
91
  images: e.current.images,
93
92
  uploadPath: "photos",
@@ -100,16 +99,27 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
100
99
  }),
101
100
  c("div", G, [
102
101
  a(d, { title: "Profile" }, {
103
- default: i(() => [
102
+ default: r(() => [
104
103
  a(F, {
105
104
  product: e.current
106
105
  }, null, 8, ["product"])
107
106
  ]),
108
107
  _: 1
109
108
  }),
110
- a(d, { title: "Categories" }, {
111
- default: i(() => [
112
- (r(!0), s(m, null, f(Q.all, (t, n) => (r(), x(R, {
109
+ a(d, {
110
+ title: "Categories",
111
+ actions: [{
112
+ label: "+",
113
+ function: () => b(U).push({
114
+ name: "Categories Organization",
115
+ params: {
116
+ _id: b(o).params._id
117
+ }
118
+ })
119
+ }]
120
+ }, {
121
+ default: r(() => [
122
+ (i(!0), s(m, null, f(Q.all, (t, n) => (i(), y(R, {
113
123
  label: t.name,
114
124
  name: "categories",
115
125
  value: t.url,
@@ -119,7 +129,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
119
129
  }, null, 8, ["label", "value", "radio", "onUpdate:radio"]))), 256))
120
130
  ]),
121
131
  _: 1
122
- }),
132
+ }, 8, ["actions"]),
123
133
  a(d, {
124
134
  title: "Parameters",
125
135
  placeholder: "No parameters added yet",
@@ -129,8 +139,8 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
129
139
  }],
130
140
  class: "cols-1 gap-thin"
131
141
  }, {
132
- default: i(() => [
133
- (r(!0), s(m, null, f(e.current.information, (t, n) => (r(), s("div", {
142
+ default: r(() => [
143
+ (i(!0), s(m, null, f(e.current.information, (t, n) => (i(), s("div", {
134
144
  class: "gap-thin flex-nowrap flex",
135
145
  key: n
136
146
  }, [
@@ -147,7 +157,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
147
157
  class: "w-100 bg-white radius-small pd-medium"
148
158
  }, null, 8, ["field", "onUpdate:field"]),
149
159
  c("div", H, [
150
- a(y, {
160
+ a(k, {
151
161
  onClick: () => e.current.information.splice(n, 1),
152
162
  class: "i-medium"
153
163
  }, null, 8, ["onClick"])
@@ -164,8 +174,8 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
164
174
  function: () => e.current.localization.push({ name: "", value: "" })
165
175
  }]
166
176
  }, {
167
- default: i(() => [
168
- (r(!0), s(m, null, f(e.current.localization, (t, n) => (r(), s("div", {
177
+ default: r(() => [
178
+ (i(!0), s(m, null, f(e.current.localization, (t, n) => (i(), s("div", {
169
179
  class: "gap-thin mn-b-thin flex-nowrap flex",
170
180
  key: n
171
181
  }, [
@@ -182,7 +192,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
182
192
  class: "w-100 bg-white radius-small pd-medium"
183
193
  }, null, 8, ["field", "onUpdate:field"]),
184
194
  c("div", J, [
185
- a(y, {
195
+ a(k, {
186
196
  onClick: () => e.current.localization.splice(n, 1),
187
197
  class: "i-medium"
188
198
  }, null, 8, ["onClick"])
@@ -200,8 +210,8 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
200
210
  function: () => e.current.quantityDiscount.push({ name: "", value: "" })
201
211
  }]
202
212
  }, {
203
- default: i(() => [
204
- (r(!0), s(m, null, f(e.current.quantityDiscount, (t, n) => (r(), s("div", {
213
+ default: r(() => [
214
+ (i(!0), s(m, null, f(e.current.quantityDiscount, (t, n) => (i(), s("div", {
205
215
  class: "gap-thin mn-b-thin flex-nowrap flex",
206
216
  key: n
207
217
  }, [
@@ -218,7 +228,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
218
228
  class: "w-100 bg-white radius-small pd-medium"
219
229
  }, null, 8, ["field", "onUpdate:field"]),
220
230
  c("div", K, [
221
- a(y, {
231
+ a(k, {
222
232
  onClick: () => e.current.quantityDiscount.splice(n, 1),
223
233
  class: "i-medium"
224
234
  }, null, 8, ["onClick"])
@@ -230,16 +240,16 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
230
240
  a(S, {
231
241
  title: "Add ingredient",
232
242
  onClosePopup: _,
233
- isPopupOpen: w.value,
243
+ isPopupOpen: x.value,
234
244
  class: "bg-white pd-big radius-big"
235
245
  }, {
236
- default: i(() => [
237
- a($, {
238
- onAdd: u[1] || (u[1] = (t) => b.add(
246
+ default: r(() => [
247
+ a(z, {
248
+ onAdd: u[1] || (u[1] = (t) => v.add(
239
249
  e.current.ingredients,
240
250
  t
241
251
  )),
242
- products: v.value,
252
+ products: w.value,
243
253
  class: "flex-column"
244
254
  }, null, 8, ["products"])
245
255
  ]),
@@ -253,21 +263,21 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
253
263
  function: () => N()
254
264
  }]
255
265
  }, {
256
- default: i(() => [
266
+ default: r(() => [
257
267
  c("div", W, [
258
- (r(!0), s(m, null, f(e.current.ingredients, (t, n) => (r(), x($, {
268
+ (i(!0), s(m, null, f(e.current.ingredients, (t, n) => (i(), y(z, {
259
269
  key: t._id,
260
270
  product: t,
261
271
  array: e.current.ingredients,
262
- products: v.value,
272
+ products: w.value,
263
273
  onAdd: u[2] || (u[2] = (l) => {
264
- b.add(e.current.ingredients, l), _();
274
+ v.add(e.current.ingredients, l), _();
265
275
  }),
266
276
  onUpdate: (l) => {
267
- b.update(e.current.ingredients, l, n), _();
277
+ v.update(e.current.ingredients, l, n), _();
268
278
  },
269
279
  onDelete: (l) => {
270
- b.delete(e.current.ingredients, l, n), _();
280
+ v.delete(e.current.ingredients, l, n), _();
271
281
  }
272
282
  }, null, 8, ["product", "array", "products", "onUpdate", "onDelete"]))), 128))
273
283
  ])
@@ -278,5 +288,5 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
278
288
  }
279
289
  };
280
290
  export {
281
- be as default
291
+ he as default
282
292
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),n=require("../sections/FilterProducts.vue.cjs"),i=require("../../../../components/Feed/Feed.vue.cjs"),c=require("../blocks/CardProduct.vue.cjs"),u=require("../../store/products.cjs"),l={class:"cols-2-1_3 bg-grey radius-big gap-thin pd-thin"},d={__name:"Products",setup(p){const t=s.useRoute();return s.useRouter(),(a,_)=>(e.openBlock(),e.createElementBlock("div",l,[e.createVNode(n.default),e.createVNode(i.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:r=>u.actions.read(r),state:u.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery},class:"cols-3 gap-thin"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,o=>(e.openBlock(),e.createBlock(c.default,{key:o._id,product:o,class:"h-max",onClick:m=>a.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:o._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])]))}};exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),l=require("../sections/FilterProducts.vue.cjs"),d=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../blocks/CardProduct.vue.cjs"),c=require("../../store/products.cjs"),_={class:"cols-2-1_3 bg-grey pd-thin radius-big gap-thin"},m={__name:"Products",setup(f){function n(t){let o={...r.query};o.search=t,i.push({query:o})}const r=s.useRoute(),i=s.useRouter();return(t,o)=>(e.openBlock(),e.createElementBlock("div",_,[e.createVNode(l.default),e.createElementVNode("div",null,[e.createVNode(d.default,{onSearch:n,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:u=>c.actions.read(u),state:c.state},options:{limit:15,organization:e.unref(r).params._id,categories:e.unref(r).query.categories,prices:e.unref(r).query.prices,delivery:e.unref(r).query.delivery,search:e.unref(r).query.search},class:"cols-3 gap-thin"},{default:e.withCtx(({items:u})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u,a=>(e.openBlock(),e.createBlock(h.default,{key:a._id,product:a,class:"h-max",onClick:g=>t.$router.push({name:"Product Organization",params:{_id:e.unref(r).params._id,product:a._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])])]))}};exports.default=m;
@@ -1,57 +1,70 @@
1
- import { openBlock as s, createElementBlock as i, createVNode as a, unref as t, withCtx as c, Fragment as u, renderList as m, createBlock as p } from "vue";
2
- import { useRoute as d, useRouter as l } from "vue-router";
3
- import _ from "../sections/FilterProducts.vue.js";
4
- import f from "../../../../components/Feed/Feed.vue.js";
5
- import g from "../blocks/CardProduct.vue.js";
6
- import { actions as h, state as y } from "../../store/products.js";
7
- const k = { class: "cols-2-1_3 bg-grey radius-big gap-thin pd-thin" }, F = {
1
+ import { openBlock as i, createElementBlock as c, createVNode as n, createElementVNode as l, unref as r, withCtx as p, Fragment as d, renderList as _, createBlock as h } from "vue";
2
+ import { useRoute as f, useRouter as y } from "vue-router";
3
+ import g from "../sections/FilterProducts.vue.js";
4
+ import k from "../../../globals/components/blocks/BlockSearch.vue.js";
5
+ import q from "../../../../components/Feed/Feed.vue.js";
6
+ import v from "../blocks/CardProduct.vue.js";
7
+ import { actions as $, state as b } from "../../store/products.js";
8
+ const C = { class: "cols-2-1_3 bg-grey pd-thin radius-big gap-thin" }, S = {
8
9
  __name: "Products",
9
- setup(v) {
10
- const e = d();
11
- return l(), (n, $) => (s(), i("div", k, [
12
- a(_),
13
- a(f, {
14
- states: {
15
- empty: {
16
- title: "No Products Found",
17
- description: "Currently, there are no products available."
18
- }
19
- },
20
- store: {
21
- read: (r) => h.read(r),
22
- state: y
23
- },
24
- options: {
25
- limit: 15,
26
- organization: t(e).params._id,
27
- categories: t(e).query.categories,
28
- prices: t(e).query.prices,
29
- delivery: t(e).query.delivery
30
- // user: user
31
- },
32
- class: "cols-3 gap-thin"
33
- }, {
34
- default: c(({
35
- items: r
36
- }) => [
37
- (s(!0), i(u, null, m(r, (o) => (s(), p(g, {
38
- key: o._id,
39
- product: o,
40
- class: "h-max",
41
- onClick: (C) => n.$router.push({
42
- name: "Product Organization",
43
- params: {
44
- _id: t(e).params._id,
45
- product: o._id
46
- }
47
- })
48
- }, null, 8, ["product", "onClick"]))), 128))
49
- ]),
50
- _: 1
51
- }, 8, ["states", "store", "options"])
10
+ setup(x) {
11
+ function u(t) {
12
+ let o = { ...e.query };
13
+ o.search = t, m.push({ query: o });
14
+ }
15
+ const e = f(), m = y();
16
+ return (t, o) => (i(), c("div", C, [
17
+ n(g),
18
+ l("div", null, [
19
+ n(k, {
20
+ onSearch: u,
21
+ placeholder: "Enter product name",
22
+ class: "bg-white mn-b-thin"
23
+ }),
24
+ n(q, {
25
+ states: {
26
+ empty: {
27
+ title: "No Products Found",
28
+ description: "Currently, there are no products available."
29
+ }
30
+ },
31
+ store: {
32
+ read: (a) => $.read(a),
33
+ state: b
34
+ },
35
+ options: {
36
+ limit: 15,
37
+ organization: r(e).params._id,
38
+ categories: r(e).query.categories,
39
+ prices: r(e).query.prices,
40
+ delivery: r(e).query.delivery,
41
+ search: r(e).query.search
42
+ // user: user
43
+ },
44
+ class: "cols-3 gap-thin"
45
+ }, {
46
+ default: p(({
47
+ items: a
48
+ }) => [
49
+ (i(!0), c(d, null, _(a, (s) => (i(), h(v, {
50
+ key: s._id,
51
+ product: s,
52
+ class: "h-max",
53
+ onClick: (B) => t.$router.push({
54
+ name: "Product Organization",
55
+ params: {
56
+ _id: r(e).params._id,
57
+ product: s._id
58
+ }
59
+ })
60
+ }, null, 8, ["product", "onClick"]))), 128))
61
+ ]),
62
+ _: 1
63
+ }, 8, ["states", "store", "options"])
64
+ ])
52
65
  ]));
53
66
  }
54
67
  };
55
68
  export {
56
- F as default
69
+ S as default
57
70
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),f=require("../../../../components/Checkbox/Checkbox.vue.cjs"),x=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const w={class:"pd-medium bg-grey radius-big"},q={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),F={class:"cursor-pointer mn-r-auto t-medium p-big"},B=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),C={__name:"FilterProducts",props:{selectedFilters:Object,prices:{type:Array,default:()=>[{label:"Under 300฿",value:"<300"},{label:"300฿ to 600฿",value:"300-600"},{label:"600฿ to 1200฿",value:"600-1200"},{label:"$1200 and above",value:">1200"}]},deliveryOptions:{type:Array,default:()=>[{label:"Pickup",value:{min:0,max:25}},{label:"Courier",value:{min:25,max:50}},{label:"Post",value:{min:50,max:100}}]}},emits:["updateFilters","resetFilters"],async setup(y,{emit:h}){let d,m;const n=g.useRoute(),v=g.useRouter();[d,m]=e.withAsyncContext(()=>u.actions.fetchCategories()),await d,m(),e.ref({categories:[],prices:[],delivery:[],extra:[]}),e.watch(()=>a.state.filter,(t,r)=>{const l={...n.query};Object.keys(r).forEach(s=>{l[s]&&delete l[s]});const i=Object.fromEntries(Object.entries(t).filter(([s,o])=>Array.isArray(o)&&o.length>0).map(([s,o])=>[s,o.join(",")]));Object.assign(l,i),v.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(n.query){const t=n.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};a.state.filter=r}});const _=h,k=()=>{_("resetFilters")},p={locale:"en",messages:{en:{categoriesTitle:"Category",categories:[],filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{categoriesTitle:"Категория",categories:[],filters:{title:"Фильтры",price:{title:"Цена",from:"От",to:"До"},filters:[],reset:"Сбросить фильтры"}}}};u.state.all.forEach(t=>{t.localization.forEach(r=>{p.messages[r.locale].categories.push(r.text)})});const{t:c}=x.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",q,e.toDisplayString(e.unref(c)("categoriesTitle")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.state.all,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.name,value:l.url,class:"w-100 mn-t-small mn-b-small bg-white radius-small pd-small",radio:a.state.filter.categories,"onUpdate:radio":r[0]||(r[0]=s=>a.state.filter.categories=s)},null,8,["label","value","radio"]))),128))]),_:1}),E,e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",F,e.toDisplayString(e.unref(c)("filters.price.title")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.prices,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.prices,"onUpdate:radio":r[1]||(r[1]=s=>a.state.filter.prices=s)},null,8,["label","value","radio"]))),128))]),_:1}),B,e.createElementVNode("button",{onClick:k,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),b=require("../../../../components/Checkbox/Checkbox.vue.cjs"),q=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const x={class:"pd-medium bg-white-transp-50 radius-big"},F={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small t-transp"},null,-1),B={class:"cursor-pointer mn-r-auto t-medium p-big"},C={__name:"FilterProducts",props:{selectedFilters:Object,prices:{type:Array,default:()=>[{label:"Under 300฿",value:"<300"},{label:"300฿ to 600฿",value:"300-600"},{label:"600฿ to 1200฿",value:"600-1200"},{label:"$1200 and above",value:">1200"}]},deliveryOptions:{type:Array,default:()=>[{label:"Pickup",value:{min:0,max:25}},{label:"Courier",value:{min:25,max:50}},{label:"Post",value:{min:50,max:100}}]}},emits:["updateFilters","resetFilters"],async setup(y,{emit:h}){let d,m;const n=g.useRoute(),v=g.useRouter();let _={status:"published"};[d,m]=e.withAsyncContext(()=>u.actions.fetchCategories(_)),await d,m(),e.ref({categories:[],prices:[],delivery:[],extra:[]}),e.watch(()=>a.state.filter,(t,r)=>{const l={...n.query};Object.keys(r).forEach(s=>{l[s]&&delete l[s]});const i=Object.fromEntries(Object.entries(t).filter(([s,o])=>Array.isArray(o)&&o.length>0).map(([s,o])=>[s,o.join(",")]));Object.assign(l,i),v.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(n.query){const t=n.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};a.state.filter=r}});const k=h,w=()=>{k("resetFilters")},p={locale:"en",messages:{en:{categoriesTitle:"Category",categories:[],filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{categoriesTitle:"Категория",categories:[],filters:{title:"Фильтры",price:{title:"Цена",from:"От",to:"До"},filters:[],reset:"Сбросить фильтры"}}}};u.state.all.forEach(t=>{t.localization.forEach(r=>{p.messages[r.locale].categories.push(r.text)})});const{t:c}=q.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",F,e.toDisplayString(e.unref(c)("categoriesTitle")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.state.all,(l,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,label:l.name,value:l.url,class:"w-100 mn-t-small mn-b-small bg-white radius-small pd-small",radio:a.state.filter.categories,"onUpdate:radio":r[0]||(r[0]=s=>a.state.filter.categories=s)},null,8,["label","value","radio"]))),128))]),_:1}),E,e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",B,e.toDisplayString(e.unref(c)("filters.price.title")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.prices,(l,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.prices,"onUpdate:radio":r[1]||(r[1]=s=>a.state.filter.prices=s)},null,8,["label","value","radio"]))),128))]),_:1}),e.createElementVNode("button",{onClick:w,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=C;
@@ -1,12 +1,12 @@
1
- import { withAsyncContext as A, ref as P, watch as T, onMounted as V, openBlock as a, createElementBlock as d, createVNode as h, withCtx as c, createElementVNode as o, toDisplayString as p, unref as b, Fragment as _, renderList as v, createBlock as x } from "vue";
2
- import w from "../../../../components/Spoiler/Spoiler.vue2.js";
1
+ import { withAsyncContext as P, ref as T, watch as V, onMounted as B, openBlock as a, createElementBlock as p, createVNode as h, withCtx as n, createElementVNode as c, toDisplayString as d, unref as f, Fragment as v, renderList as _, createBlock as w } from "vue";
2
+ import x from "../../../../components/Spoiler/Spoiler.vue2.js";
3
3
  import F from "../../../../components/Checkbox/Checkbox.vue.js";
4
- import { useI18n as B } from "vue-i18n";
5
- import { useRoute as R, useRouter as U } from "vue-router";
6
- import { actions as $, state as k } from "../../store/categories.js";
4
+ import { useI18n as R } from "vue-i18n";
5
+ import { useRoute as U, useRouter as $ } from "vue-router";
6
+ import { actions as N, state as k } from "../../store/categories.js";
7
7
  import { state as l } from "../../../marketplace/store/marketplace.js";
8
8
  import "./FilterProducts.vue2.js";
9
- const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointer mn-r-auto t-medium p-big" }, I = /* @__PURE__ */ o("hr", { class: "mn-b-small" }, null, -1), L = { class: "cursor-pointer mn-r-auto t-medium p-big" }, M = /* @__PURE__ */ o("hr", { class: "mn-b-small" }, null, -1), X = {
9
+ const D = { class: "pd-medium bg-white-transp-50 radius-big" }, I = { class: "cursor-pointer mn-r-auto t-medium p-big" }, L = /* @__PURE__ */ c("hr", { class: "mn-b-small t-transp" }, null, -1), M = { class: "cursor-pointer mn-r-auto t-medium p-big" }, X = {
10
10
  __name: "FilterProducts",
11
11
  props: {
12
12
  selectedFilters: Object,
@@ -30,23 +30,26 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
30
30
  },
31
31
  emits: ["updateFilters", "resetFilters"],
32
32
  async setup(C, { emit: j }) {
33
- let f, g;
34
- const u = R(), E = U();
35
- [f, g] = A(() => $.fetchCategories()), await f, g(), P({
33
+ let b, g;
34
+ const u = U(), E = $();
35
+ let O = {
36
+ status: "published"
37
+ };
38
+ [b, g] = P(() => N.fetchCategories(O)), await b, g(), T({
36
39
  categories: [],
37
40
  prices: [],
38
41
  delivery: [],
39
42
  extra: []
40
- }), T(() => l.filter, (e, t) => {
43
+ }), V(() => l.filter, (e, t) => {
41
44
  const r = { ...u.query };
42
45
  Object.keys(t).forEach((s) => {
43
46
  r[s] && delete r[s];
44
47
  });
45
48
  const i = Object.fromEntries(
46
- Object.entries(e).filter(([s, n]) => Array.isArray(n) && n.length > 0).map(([s, n]) => [s, n.join(",")])
49
+ Object.entries(e).filter(([s, o]) => Array.isArray(o) && o.length > 0).map(([s, o]) => [s, o.join(",")])
47
50
  );
48
51
  Object.assign(r, i), E.push({ query: r });
49
- }, { deep: !0 }), V(async () => {
52
+ }, { deep: !0 }), B(async () => {
50
53
  if (u.query) {
51
54
  const e = u.query, t = {
52
55
  categories: e.categories ? e.categories.split(",") : [],
@@ -57,8 +60,8 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
57
60
  l.filter = t;
58
61
  }
59
62
  });
60
- const O = j, q = () => {
61
- O("resetFilters");
63
+ const q = j, A = () => {
64
+ q("resetFilters");
62
65
  }, y = {
63
66
  locale: "en",
64
67
  messages: {
@@ -97,17 +100,17 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
97
100
  y.messages[t.locale].categories.push(t.text);
98
101
  });
99
102
  });
100
- const { t: m } = B(y);
101
- return (e, t) => (a(), d("div", N, [
102
- h(w, {
103
- class: "radius-small o-hidden br-1px br-solid br-grey mn-b-small",
103
+ const { t: m } = R(y);
104
+ return (e, t) => (a(), p("div", D, [
105
+ h(x, {
106
+ class: "radius-small o-hidden mn-b-small",
104
107
  status: !0
105
108
  }, {
106
- header: c(() => [
107
- o("p", D, p(b(m)("categoriesTitle")), 1)
109
+ header: n(() => [
110
+ c("p", I, d(f(m)("categoriesTitle")), 1)
108
111
  ]),
109
- content: c(() => [
110
- (a(!0), d(_, null, v(k.all, (r, i) => (a(), x(F, {
112
+ content: n(() => [
113
+ (a(!0), p(v, null, _(k.all, (r, i) => (a(), w(F, {
111
114
  key: i,
112
115
  label: r.name,
113
116
  value: r.url,
@@ -118,16 +121,16 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
118
121
  ]),
119
122
  _: 1
120
123
  }),
121
- I,
122
- h(w, {
123
- class: "radius-small o-hidden br-1px br-solid br-grey mn-b-small",
124
+ L,
125
+ h(x, {
126
+ class: "radius-small o-hidden mn-b-small",
124
127
  status: !1
125
128
  }, {
126
- header: c(() => [
127
- o("p", L, p(b(m)("filters.price.title")), 1)
129
+ header: n(() => [
130
+ c("p", M, d(f(m)("filters.price.title")), 1)
128
131
  ]),
129
- content: c(() => [
130
- (a(!0), d(_, null, v(C.prices, (r, i) => (a(), x(F, {
132
+ content: n(() => [
133
+ (a(!0), p(v, null, _(C.prices, (r, i) => (a(), w(F, {
131
134
  key: i,
132
135
  label: r.label,
133
136
  value: r.value,
@@ -138,11 +141,10 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
138
141
  ]),
139
142
  _: 1
140
143
  }),
141
- M,
142
- o("button", {
143
- onClick: q,
144
+ c("button", {
145
+ onClick: A,
144
146
  class: "bg-main w-100 button"
145
- }, p(b(m)("filters.reset")), 1)
147
+ }, d(f(m)("filters.reset")), 1)
146
148
  ]));
147
149
  }
148
150
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/blocks/ImagesThumbnails.vue.cjs"),t=require("./components/blocks/LeftoverPositions.vue.cjs"),r=require("./components/blocks/ListPositions.vue.cjs"),o=require("./components/blocks/CategoryCard.vue.cjs"),u=require("./components/blocks/CardProduct.vue.cjs"),i=require("./components/blocks/CardLeftover.vue.cjs"),d=require("./components/blocks/Images360.vue.cjs"),c=require("./components/blocks/CardPosition.vue.cjs"),s=require("./components/sections/SectionProduct.vue.cjs"),a=require("./components/sections/HeroRecommendation.vue.cjs"),n=require("./components/sections/FilterProducts.vue.cjs"),f=require("./components/sections/SortProducts.vue.cjs"),l=require("./components/sections/EditModifications.vue.cjs"),P=require("./components/sections/PopularProducts.vue.cjs"),q=require("./components/sections/EditProductInfo.vue.cjs"),m=require("./components/elements/Price.vue.cjs"),C=require("./components/elements/THC.vue.cjs"),v=require("./components/pages/Product.vue.cjs"),g=require("./components/pages/ProductsBackoffice.vue.cjs"),L=require("./components/pages/ProductEdit.vue.cjs"),S=require("./components/pages/EditLeftover.vue.cjs"),E=require("./components/pages/ProductRecommmendation.vue.cjs"),I=require("./components/pages/Products.vue.cjs"),p=require("./components/pages/Leftovers.vue.cjs"),T=require("./store/categories.cjs"),b=require("./store/leftovers.cjs"),y=require("./store/products.cjs");exports.ImagesThumbnails=e.default;exports.LeftoverPositions=t.default;exports.ListPositions=r.default;exports.CategoryCard=o.default;exports.CardProduct=u.default;exports.CardLeftover=i.default;exports.Images360=d.default;exports.CardPosition=c.default;exports.SectionProduct=s.default;exports.HeroRecommendation=a.default;exports.FilterProducts=n.default;exports.SortProducts=f.default;exports.EditModifications=l.default;exports.PopularProducts=P.default;exports.EditProductInfo=q.default;exports.Price=m.default;exports.THC=C.default;exports.Product=v.default;exports.ProductsBackoffice=g.default;exports.ProductEdit=L.default;exports.EditLeftover=S.default;exports.ProductRecommendation=E.default;exports.Products=I.default;exports.Leftovers=p.default;exports.categoriesStore=T;exports.leftoversStore=b;exports.productsStore=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/blocks/ImagesThumbnails.vue.cjs"),t=require("./components/blocks/LeftoverPositions.vue.cjs"),r=require("./components/blocks/ListPositions.vue.cjs"),o=require("./components/blocks/CardCategory.vue.cjs"),u=require("./components/blocks/CardProduct.vue.cjs"),i=require("./components/blocks/CardLeftover.vue.cjs"),d=require("./components/blocks/Images360.vue.cjs"),c=require("./components/blocks/CardPosition.vue.cjs"),s=require("./components/sections/SectionProduct.vue.cjs"),a=require("./components/sections/HeroRecommendation.vue.cjs"),n=require("./components/sections/FilterProducts.vue.cjs"),f=require("./components/sections/SortProducts.vue.cjs"),l=require("./components/sections/EditModifications.vue.cjs"),P=require("./components/sections/PopularProducts.vue.cjs"),q=require("./components/sections/EditProductInfo.vue.cjs"),m=require("./components/elements/Price.vue.cjs"),C=require("./components/elements/THC.vue.cjs"),v=require("./components/pages/Product.vue.cjs"),g=require("./components/pages/ProductsBackoffice.vue.cjs"),L=require("./components/pages/ProductEdit.vue.cjs"),S=require("./components/pages/EditLeftover.vue.cjs"),E=require("./components/pages/ProductRecommmendation.vue.cjs"),I=require("./components/pages/Products.vue.cjs"),p=require("./components/pages/Leftovers.vue.cjs"),T=require("./store/categories.cjs"),b=require("./store/leftovers.cjs"),y=require("./store/products.cjs");exports.ImagesThumbnails=e.default;exports.LeftoverPositions=t.default;exports.ListPositions=r.default;exports.CardCategory=o.default;exports.CardProduct=u.default;exports.CardLeftover=i.default;exports.Images360=d.default;exports.CardPosition=c.default;exports.SectionProduct=s.default;exports.HeroRecommendation=a.default;exports.FilterProducts=n.default;exports.SortProducts=f.default;exports.EditModifications=l.default;exports.PopularProducts=P.default;exports.EditProductInfo=q.default;exports.Price=m.default;exports.THC=C.default;exports.Product=v.default;exports.ProductsBackoffice=g.default;exports.ProductEdit=L.default;exports.EditLeftover=S.default;exports.ProductRecommendation=E.default;exports.Products=I.default;exports.Leftovers=p.default;exports.categoriesStore=T;exports.leftoversStore=b;exports.productsStore=y;
@@ -1,7 +1,7 @@
1
1
  import { default as f } from "./components/blocks/ImagesThumbnails.vue.js";
2
2
  import { default as d } from "./components/blocks/LeftoverPositions.vue.js";
3
3
  import { default as m } from "./components/blocks/ListPositions.vue.js";
4
- import { default as l } from "./components/blocks/CategoryCard.vue.js";
4
+ import { default as l } from "./components/blocks/CardCategory.vue.js";
5
5
  import { default as i } from "./components/blocks/CardProduct.vue.js";
6
6
  import { default as P } from "./components/blocks/CardLeftover.vue.js";
7
7
  import { default as v } from "./components/blocks/Images360.vue.js";
@@ -26,10 +26,10 @@ import * as o from "./store/categories.js";
26
26
  import * as t from "./store/leftovers.js";
27
27
  import * as r from "./store/products.js";
28
28
  export {
29
+ l as CardCategory,
29
30
  P as CardLeftover,
30
31
  g as CardPosition,
31
32
  i as CardProduct,
32
- l as CategoryCard,
33
33
  Q as EditLeftover,
34
34
  k as EditModifications,
35
35
  M as EditProductInfo,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),u=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),a=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=n.reactive({all:[],current:{order:"1",name:"",url:"",subcategories:[],filters:[],localization:[]}}),c={async fetchCategories(){return await a.get("/categories").then(e=>(r.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},updateCategories(e){return a.post("/categories",e).then(t=>(r.all=e,Promise.resolve(e)),t=>(s.setError(t),Promise.reject(t)))},fetchCategory(e){return a.get("/categories/"+e).then(t=>(r.current=t.data,Promise.resolve(t.data)),t=>(s.setError(t),Promise.reject(t)))},addCategory(){return a.post("/categories/add",r.current).then(e=>(r.all.push(e.data),Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},updateCategory(e){return a.post("/categories/"+e,r.current).then(t=>(r.current=t.data,Promise.resolve(t.data)),t=>(s.setError(t),Promise.reject(t)))},deleteCategory(e){return a.delete("/categories/"+e).then(t=>{const o=r.all.findIndex(i=>i.url===e);r.all.splice(o,1)},t=>{s.setError(t)})}};n.watch(r,e=>{});exports.actions=c;exports.state=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("../../../../node_modules/axios/lib/axios.cjs"),a=require("../../globals/store/globals.cjs"),s=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=o.reactive({all:[],current:{order:1,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}}),l={async fetchCategories(t){return console.log(t),await s.get("/categories",{params:t}).then(e=>(r.all=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},updateCategories(t){return s.post("/categories",t).then(e=>(r.all=t,Promise.resolve(t)),e=>(a.setError(e),Promise.reject(e)))},fetchCategory(t){return s.get("/categories/"+t).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},addCategory(){return s.post("/categories/add",r.current).then(t=>(r.all.push(t.data),Promise.resolve(t.data)),t=>(a.setError(t),Promise.reject(t)))},updateCategory(t){return s.post("/categories/"+t,r.current).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},resetCategory(){r.current={order:0,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}},deleteCategory(t){return s.delete("/categories/"+t).then(e=>{const n=r.all.findIndex(i=>i.url===t);r.all.splice(n,1)},e=>{a.setError(e)})}};o.watch(r,t=>{});exports.actions=l;exports.state=r;