@ozdao/prometheus-framework 0.2.52 → 0.2.53

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. package/dist/main-0a2437f4.js +91 -0
  2. package/dist/main-4fnApBsF.js +91 -0
  3. package/dist/main-cdd0be68.mjs +13628 -0
  4. package/dist/main-kjbLXQEa.mjs +13606 -0
  5. package/dist/main.css +1 -1
  6. package/dist/products.server.js +61 -49
  7. package/dist/products.server.mjs +61 -49
  8. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  9. package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -223
  10. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +223 -2
  12. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
  14. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +78 -2
  16. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  18. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  20. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  22. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  28. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  30. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  36. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  38. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  44. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  48. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  56. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  74. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  78. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  80. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  82. package/dist/prometheus-framework/src/modules/organizations/router/products.router.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/router/products.router.js +22 -0
  84. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -0
  85. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js +45 -0
  86. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.cjs +1 -0
  87. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.js +4 -0
  88. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -0
  95. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +79 -0
  96. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -0
  97. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +193 -0
  98. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.cjs +1 -0
  99. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.js +4 -0
  100. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  104. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +67 -57
  106. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +21 -18
  114. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/products/products.client.js +2 -2
  118. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/products/store/categories.js +39 -27
  120. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  124. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  128. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +1 -1
  132. package/dist/prometheus-framework.cjs.js +1 -1
  133. package/dist/prometheus-framework.es.js +1 -1
  134. package/dist/style.css +1 -1
  135. package/dist/web-0066fd51.mjs +55 -0
  136. package/dist/web-6b9fa713.js +1 -0
  137. package/dist/web-ngl7bNhF.js +1 -0
  138. package/dist/web-t91TrxXa.mjs +55 -0
  139. package/package.json +1 -1
  140. package/src/components/Button/Button.vue +1 -3
  141. package/src/components/Field/Field.vue +3 -1
  142. package/src/modules/marketplace/components/sections/Filters.vue +7 -1
  143. package/src/modules/organizations/router/products.router.js +24 -4
  144. package/src/modules/products/components/blocks/CardCategory.vue +53 -0
  145. package/src/modules/products/components/pages/Categories.vue +90 -0
  146. package/src/modules/products/components/pages/CategoryEdit.vue +214 -0
  147. package/src/modules/products/components/pages/ProductEdit.vue +9 -1
  148. package/src/modules/products/components/sections/FilterProducts.vue +4 -1
  149. package/src/modules/products/controllers/categories.controller.js +30 -13
  150. package/src/modules/products/models/category.model.js +42 -32
  151. package/src/modules/products/products.client.js +4 -2
  152. package/src/modules/products/store/categories.js +17 -3
  153. package/src/modules/backoffice/components/admin/Categories.vue +0 -53
  154. package/src/modules/backoffice/components/admin/CategoryEdit.vue +0 -98
  155. package/src/modules/products/components/blocks/CategoryCard.vue +0 -42
  156. package/src/modules/products/router/products.router.js +0 -48
  157. /package/src/modules/{products → organizations}/components/pages/OrganizationCreate.vue +0 -0
  158. /package/src/modules/{products → organizations}/components/pages/OrganizationDetails.vue +0 -0
  159. /package/src/modules/{products → organizations}/components/pages/OrganizationDocuments.vue +0 -0
  160. /package/src/modules/{products → organizations}/components/pages/OrganizationPeople.vue +0 -0
@@ -1,32 +1,31 @@
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";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import d from "../../../../components/Block/Block.vue.js";
7
- import "../../../../components/Tab/Tab.vue2.js";
8
- import p from "../../../../components/Field/Field.vue.js";
9
- import "../../../../components/Select/Select.vue.js";
7
+ import "../../../../components/Tab/Tab.vue.js";
8
+ import p from "../../../../components/Field/Field.vue2.js";
10
9
  import R from "../../../../components/Checkbox/Checkbox.vue.js";
11
- import D from "../../../../components/Button/Button.vue.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"),l=require("vue-router"),n=require("../../store/products.cjs"),d=require("../../../../components/Feed/Feed.vue.cjs"),i=require("../blocks/CardProduct.vue.cjs"),m=require("../../../../components/Tab/Tab.vue.cjs"),p={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),v={__name:"ProductsBackoffice",setup(h){const r=l.useRoute(),c=l.useRouter(),o=e.ref(r.query.tab?r.query.tab:"posts");return r.query.tab=o.value,e.watch(o,u=>{c.replace({query:{...r.query,tab:u}})}),e.onMounted(async()=>{await n.actions.fetchProducts()}),(u,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",p,[b,e.createElementVNode("button",{onClick:a[0]||(a[0]=t=>u.$router.push({name:"AddProduct"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(m.default,{selected:o.value,"onUpdate:selected":a[1]||(a[1]=t=>o.value=t),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(d.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:t=>n.actions.read(t),state:n.state},options:{limit:15,organization:e.unref(r).params._id,status:o.value}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,s=>(e.openBlock(),e.createBlock(i.default,{key:s._id,product:s,onClick:f=>u.$router.push({name:"ProductEdit",params:{product:s._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])],64))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),n=require("../../store/products.cjs"),d=require("../../../../components/Feed/Feed.vue.cjs"),i=require("../blocks/CardProduct.vue.cjs"),m=require("../../../../components/Tab/Tab.vue2.cjs"),p={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),v={__name:"ProductsBackoffice",setup(h){const r=l.useRoute(),c=l.useRouter(),o=e.ref(r.query.tab?r.query.tab:"posts");return r.query.tab=o.value,e.watch(o,u=>{c.replace({query:{...r.query,tab:u}})}),e.onMounted(async()=>{await n.actions.fetchProducts()}),(u,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",p,[b,e.createElementVNode("button",{onClick:a[0]||(a[0]=t=>u.$router.push({name:"AddProduct"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(m.default,{selected:o.value,"onUpdate:selected":a[1]||(a[1]=t=>o.value=t),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(d.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:t=>n.actions.read(t),state:n.state},options:{limit:15,organization:e.unref(r).params._id,status:o.value}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,s=>(e.openBlock(),e.createBlock(i.default,{key:s._id,product:s,onClick:f=>u.$router.push({name:"ProductEdit",params:{product:s._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])],64))}};exports.default=v;
@@ -3,7 +3,7 @@ import { useRoute as k, useRouter as g } from "vue-router";
3
3
  import { actions as c, state as P } from "../../store/products.js";
4
4
  import $ from "../../../../components/Feed/Feed.vue.js";
5
5
  import q from "../blocks/CardProduct.vue.js";
6
- import w from "../../../../components/Tab/Tab.vue.js";
6
+ import w from "../../../../components/Tab/Tab.vue2.js";
7
7
  const C = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, x = /* @__PURE__ */ u("h2", { class: "mn-r-medium" }, "Products", -1), z = {
8
8
  __name: "ProductsBackoffice",
9
9
  setup(B) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Field/Field.vue.cjs"),L={key:0,class:"mn-b-small w-100"},k={class:"w-100 flex-nowrap flex"},w=["onClick"],E=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),g=[E],N=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),V=["onClick"],B=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),x=[B],C=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),U=["onClick"],y={__name:"EditModifications",props:{product:Object},emits:["add-modification","delete-modification","add-characteristic","delete-characteristic","submit"],setup(u,{emit:m}){const o=m,f=u,{product:r}=e.toRefs(f);function p(){o("add-modification")}function h(l){o("delete-modification",l)}function b(l){o("add-characteristic",l)}function _(l,d){o("delete-characteristic",{modIndex:l,charIndex:d})}function v(){o("submit")}return(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.unref(r).modifications.length==0?(e.openBlock(),e.createElementBlock("p",L,"У продукта еще не заданы модификации.")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).modifications,(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small flex-column flex-wrap block",key:i},[e.createElementVNode("div",k,[e.createVNode(c.default,{field:n.quantity,"onUpdate:field":t=>n.quantity=t,disabled:!0,placeholder:"Количество",class:"mn-b-medium input-text input",type:"number"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:n.name,"onUpdate:field":t=>n.name=t,placeholder:"Новая модификация",class:"mn-b-medium input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:t=>h(i),class:"mn-l-small i-normal pd-regular button-delete button"},g,8,w)]),N,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.characteristics,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-medium w-100 flex-nowrap flex variants-wrapper",key:s},[e.createVNode(c.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Название параметра",class:"input-text input"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:t.value,"onUpdate:field":a=>t.value=a,placeholder:"Значение параметра",class:"mn-l-small input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:a=>_(i,s),class:"mn-l-small i-normal pd-regular button-delete button"},x,8,V)]))),128)),C,e.createElementVNode("button",{onClick:t=>b(i),class:"button"},"Добавить характеристику",8,U)]))),128)),e.createElementVNode("div",{class:"mn-b-big t-center flex-center flex block"},[e.createElementVNode("button",{onClick:p,class:"w-100"},"Добавить модификацю")]),e.createElementVNode("button",{onClick:d[0]||(d[0]=n=>v()),class:"button"},"Сохранить модификации")]))}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Field/Field.vue2.cjs"),L={key:0,class:"mn-b-small w-100"},k={class:"w-100 flex-nowrap flex"},w=["onClick"],E=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),g=[E],N=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),V=["onClick"],B=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),x=[B],C=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),U=["onClick"],y={__name:"EditModifications",props:{product:Object},emits:["add-modification","delete-modification","add-characteristic","delete-characteristic","submit"],setup(u,{emit:m}){const o=m,f=u,{product:r}=e.toRefs(f);function p(){o("add-modification")}function h(l){o("delete-modification",l)}function b(l){o("add-characteristic",l)}function _(l,d){o("delete-characteristic",{modIndex:l,charIndex:d})}function v(){o("submit")}return(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.unref(r).modifications.length==0?(e.openBlock(),e.createElementBlock("p",L,"У продукта еще не заданы модификации.")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).modifications,(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small flex-column flex-wrap block",key:i},[e.createElementVNode("div",k,[e.createVNode(c.default,{field:n.quantity,"onUpdate:field":t=>n.quantity=t,disabled:!0,placeholder:"Количество",class:"mn-b-medium input-text input",type:"number"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:n.name,"onUpdate:field":t=>n.name=t,placeholder:"Новая модификация",class:"mn-b-medium input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:t=>h(i),class:"mn-l-small i-normal pd-regular button-delete button"},g,8,w)]),N,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.characteristics,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-medium w-100 flex-nowrap flex variants-wrapper",key:s},[e.createVNode(c.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Название параметра",class:"input-text input"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:t.value,"onUpdate:field":a=>t.value=a,placeholder:"Значение параметра",class:"mn-l-small input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:a=>_(i,s),class:"mn-l-small i-normal pd-regular button-delete button"},x,8,V)]))),128)),C,e.createElementVNode("button",{onClick:t=>b(i),class:"button"},"Добавить характеристику",8,U)]))),128)),e.createElementVNode("div",{class:"mn-b-big t-center flex-center flex block"},[e.createElementVNode("button",{onClick:p,class:"w-100"},"Добавить модификацю")]),e.createElementVNode("button",{onClick:d[0]||(d[0]=n=>v()),class:"button"},"Сохранить модификации")]))}};exports.default=y;
@@ -1,5 +1,5 @@
1
1
  import { toRefs as U, openBlock as i, createElementBlock as o, unref as p, createCommentVNode as y, Fragment as h, renderList as b, createElementVNode as e, createVNode as r } from "vue";
2
- import u from "../../../../components/Field/Field.vue.js";
2
+ import u from "../../../../components/Field/Field.vue2.js";
3
3
  const M = {
4
4
  key: 0,
5
5
  class: "mn-b-small w-100"
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Button/Button.vue2.cjs");const r=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/Select/Select.vue2.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,l)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":l[0]||(l[0]=t=>e.product.status=t),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":l[1]||(l[1]=t=>e.product.name=t),label:"Name",placeholder:"Введите название",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":l[3]||(l[3]=t=>e.product.price=t),label:"Price",placeholder:"Введите цену",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":l[2]||(l[2]=t=>e.product.price.currency=t),placeholder:"฿",options:["฿"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":l[4]||(l[4]=t=>e.product.description=t),label:"Description",placeholder:"Введите описание",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Button/Button.vue.cjs");const r=require("../../../../components/Field/Field.vue2.cjs"),u=require("../../../../components/Select/Select.vue2.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,l)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":l[0]||(l[0]=t=>e.product.status=t),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":l[1]||(l[1]=t=>e.product.name=t),label:"Name",placeholder:"Введите название",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":l[3]||(l[3]=t=>e.product.price=t),label:"Price",placeholder:"Введите цену",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":l[2]||(l[2]=t=>e.product.price.currency=t),placeholder:"฿",options:["฿"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":l[4]||(l[4]=t=>e.product.description=t),label:"Description",placeholder:"Введите описание",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
@@ -1,6 +1,6 @@
1
1
  import { openBlock as a, createElementBlock as u, Fragment as s, createVNode as d, withCtx as o } from "vue";
2
- import "../../../../components/Button/Button.vue2.js";
3
- import i from "../../../../components/Field/Field.vue.js";
2
+ import "../../../../components/Button/Button.vue.js";
3
+ import i from "../../../../components/Field/Field.vue2.js";
4
4
  import r from "../../../../components/Select/Select.vue2.js";
5
5
  const f = {
6
6
  __name: "EditProductInfo",
@@ -1 +1 @@
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"),w=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const q={class:"pd-medium bg-white-transp-50 radius-big"},x={class:"cursor-pointer mn-r-auto t-medium p-big"},F=e.createElementVNode("hr",{class:"mn-b-small t-transp"},null,-1),E={class:"cursor-pointer mn-r-auto t-medium p-big"},B={__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}=w.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",x,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}),F,e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",E,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:k,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=B;
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 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";
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
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-white-transp-50 radius-big" }, D = { class: "cursor-pointer mn-r-auto t-medium p-big" }, I = /* @__PURE__ */ c("hr", { class: "mn-b-small t-transp" }, null, -1), L = { class: "cursor-pointer mn-r-auto t-medium p-big" }, W = {
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,
@@ -31,13 +31,16 @@ const N = { class: "pd-medium bg-white-transp-50 radius-big" }, D = { class: "cu
31
31
  emits: ["updateFilters", "resetFilters"],
32
32
  async setup(C, { emit: j }) {
33
33
  let b, g;
34
- const u = R(), E = U();
35
- [b, g] = A(() => $.fetchCategories()), await b, g(), P({
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];
@@ -46,7 +49,7 @@ const N = { class: "pd-medium bg-white-transp-50 radius-big" }, D = { class: "cu
46
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-white-transp-50 radius-big" }, D = { class: "cu
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,14 +100,14 @@ const N = { class: "pd-medium bg-white-transp-50 radius-big" }, D = { class: "cu
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(), p("div", N, [
103
+ const { t: m } = R(y);
104
+ return (e, t) => (a(), p("div", D, [
102
105
  h(x, {
103
106
  class: "radius-small o-hidden mn-b-small",
104
107
  status: !0
105
108
  }, {
106
109
  header: n(() => [
107
- c("p", D, d(f(m)("categoriesTitle")), 1)
110
+ c("p", I, d(f(m)("categoriesTitle")), 1)
108
111
  ]),
109
112
  content: n(() => [
110
113
  (a(!0), p(v, null, _(k.all, (r, i) => (a(), w(F, {
@@ -118,13 +121,13 @@ const N = { class: "pd-medium bg-white-transp-50 radius-big" }, D = { class: "cu
118
121
  ]),
119
122
  _: 1
120
123
  }),
121
- I,
124
+ L,
122
125
  h(x, {
123
126
  class: "radius-small o-hidden mn-b-small",
124
127
  status: !1
125
128
  }, {
126
129
  header: n(() => [
127
- c("p", L, d(f(m)("filters.price.title")), 1)
130
+ c("p", M, d(f(m)("filters.price.title")), 1)
128
131
  ]),
129
132
  content: n(() => [
130
133
  (a(!0), p(v, null, _(C.prices, (r, i) => (a(), w(F, {
@@ -139,12 +142,12 @@ const N = { class: "pd-medium bg-white-transp-50 radius-big" }, D = { class: "cu
139
142
  _: 1
140
143
  }),
141
144
  c("button", {
142
- onClick: q,
145
+ onClick: A,
143
146
  class: "bg-main w-100 button"
144
147
  }, d(f(m)("filters.reset")), 1)
145
148
  ]));
146
149
  }
147
150
  };
148
151
  export {
149
- W as default
152
+ X as default
150
153
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../../components/Button/Button.vue.cjs"),u=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),g=require("../blocks/Images360.vue.cjs"),h=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const k=require("../elements/Price.vue.cjs"),f=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),p={class:"cols-2-1_2 w-100 gap-big"},y={class:"flex-nowrap flex-column flex pos-relative"},b={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},B=["src"],v={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},V={key:0,class:"t-main t-semi p-big"},N={class:"w-100 h1-product mn-b-thin"},E={key:1,class:"mn-b-semi"},w={key:2,class:"w-100 mn-b-medium t-transp"},C={key:3,class:"w-100 mn-b-medium t-transp"},S={class:"cols-2 w-100 gap-small mn-b-semi"},x={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},q={class:"t-demi"},z={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},D={__name:"SectionProduct",props:{product:{type:Object,required:!0},user:{type:String},recommendation:{type:String}},setup(t){const i=t,a=e.computed(()=>i.product.images),s={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI Рекомендует вам",description:"",addtoorder:"Добавить в корзину",fastorder:"Быстрый заказ"}}},{t:c}=f.useI18n(s);function l(o){return!(o.quantity>0)}function d(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,I)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",y,[e.createElementVNode("div",b,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(g.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,B)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(u.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(h.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v,[t.recommendation?(e.openBlock(),e.createElementBlock("h2",V,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",N,e.toDisplayString(t.product.name),1),e.createVNode(k.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",E,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",w,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",S,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("p",q,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",z,[e.createVNode(m.default,{submit:r=>d(t.product),disabled:l(t.product),text:{success:" ✔ Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=D;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs"),u=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),g=require("../blocks/Images360.vue.cjs"),h=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const k=require("../elements/Price.vue.cjs"),f=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),p={class:"cols-2-1_2 w-100 gap-big"},y={class:"flex-nowrap flex-column flex pos-relative"},b={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},B=["src"],v={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},V={key:0,class:"t-main t-semi p-big"},N={class:"w-100 h1-product mn-b-thin"},E={key:1,class:"mn-b-semi"},w={key:2,class:"w-100 mn-b-medium t-transp"},C={key:3,class:"w-100 mn-b-medium t-transp"},S={class:"cols-2 w-100 gap-small mn-b-semi"},x={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},q={class:"t-demi"},z={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},D={__name:"SectionProduct",props:{product:{type:Object,required:!0},user:{type:String},recommendation:{type:String}},setup(t){const i=t,a=e.computed(()=>i.product.images),s={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI Рекомендует вам",description:"",addtoorder:"Добавить в корзину",fastorder:"Быстрый заказ"}}},{t:c}=f.useI18n(s);function l(o){return!(o.quantity>0)}function d(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,I)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",y,[e.createElementVNode("div",b,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(g.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,B)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(u.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(h.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v,[t.recommendation?(e.openBlock(),e.createElementBlock("h2",V,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",N,e.toDisplayString(t.product.name),1),e.createVNode(k.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",E,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",w,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",S,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("p",q,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",z,[e.createVNode(m.default,{submit:r=>d(t.product),disabled:l(t.product),text:{success:" ✔ Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=D;
@@ -1,5 +1,5 @@
1
1
  import { computed as y, openBlock as t, createElementBlock as a, createElementVNode as r, createBlock as m, createCommentVNode as o, toDisplayString as s, unref as l, createVNode as g, Fragment as v, renderList as w, withCtx as x, createTextVNode as k } from "vue";
2
- import z from "../../../../components/Button/Button.vue.js";
2
+ import z from "../../../../components/Button/Button.vue2.js";
3
3
  import I from "../../../icons/placeholders/PlaceholderImage.vue.js";
4
4
  import C from "../blocks/Images360.vue.js";
5
5
  import E from "../blocks/ImagesThumbnails.vue.js";
@@ -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;