@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.
- package/dist/main-0a2437f4.js +91 -0
- package/dist/main-482dc398.mjs +13626 -0
- package/dist/main-4fnApBsF.js +91 -0
- package/dist/main-b2JI9sFg.js +91 -0
- package/dist/main-c56d4c09.js +91 -0
- package/dist/main-cdd0be68.mjs +13628 -0
- package/dist/main-kjbLXQEa.mjs +13606 -0
- package/dist/main-x-9D8zvb.mjs +13604 -0
- package/dist/main.css +1 -1
- package/dist/organizations.server.js +2 -2
- package/dist/organizations.server.mjs +2 -2
- package/dist/products.server.js +81 -56
- package/dist/products.server.mjs +81 -56
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +18 -20
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +19 -19
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +28 -26
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +2 -2
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +35 -2
- package/dist/prometheus-framework/src/components/Map/Map.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue2.js +2 -35
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +37 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -14
- package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.js +24 -0
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +49 -101
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +25 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +68 -39
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +38 -48
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +69 -62
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +131 -126
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +117 -146
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/organizations/router/products.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/products.router.js +22 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js +45 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +79 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +193 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +43 -43
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +65 -55
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +64 -51
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +35 -33
- package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.js +2 -2
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +39 -27
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +23 -23
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-0066fd51.mjs +55 -0
- package/dist/web-6b9fa713.js +1 -0
- package/dist/web-6dcbb74b.mjs +55 -0
- package/dist/web-caJAdsxy.js +1 -0
- package/dist/web-ee302c1d.js +1 -0
- package/dist/web-i08OVMw9.mjs +55 -0
- package/dist/web-ngl7bNhF.js +1 -0
- package/dist/web-t91TrxXa.mjs +55 -0
- package/package.json +1 -1
- package/src/components/Button/Button.vue +4 -6
- package/src/components/Feed/Feed.vue +2 -1
- package/src/components/Field/Field.vue +3 -1
- package/src/components/LocationMarker/LocationMarker.vue +1 -0
- package/src/modules/applications/applications.client.js +0 -1
- package/src/modules/globals/components/blocks/BlockSearch.vue +42 -0
- package/src/modules/icons/entities/IconProfile.vue +10 -1
- package/src/modules/icons/entities/IconShopcart.vue +12 -2
- package/src/modules/marketplace/components/layouts/Marketplace.vue +7 -14
- package/src/modules/marketplace/components/sections/Filters.vue +7 -1
- package/src/modules/mobile/components/NavigationBar/NavigationBar.vue +27 -7
- package/src/modules/orders/components/partials/ShopCart.vue +4 -1
- package/src/modules/organizations/components/blocks/CardDepartment.vue +34 -66
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +50 -13
- package/src/modules/organizations/components/blocks/User.vue +18 -9
- package/src/modules/organizations/components/pages/Department.vue +19 -3
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +14 -10
- package/src/modules/organizations/components/pages/Organization.vue +38 -71
- package/src/modules/organizations/components/sections/Feed.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +2 -2
- package/src/modules/organizations/controllers/organizations.controller.js +0 -1
- package/src/modules/organizations/router/products.router.js +24 -4
- package/src/modules/products/components/blocks/CardCategory.vue +53 -0
- package/src/modules/products/components/pages/Categories.vue +90 -0
- package/src/modules/products/components/pages/CategoryEdit.vue +214 -0
- package/src/modules/products/components/pages/EditLeftover.vue +6 -4
- package/src/modules/products/components/pages/ProductEdit.vue +9 -1
- package/src/modules/products/components/pages/Products.vue +58 -38
- package/src/modules/products/components/sections/FilterProducts.vue +9 -6
- package/src/modules/products/controllers/categories.controller.js +30 -13
- package/src/modules/products/controllers/leftovers.controller.js +12 -5
- package/src/modules/products/controllers/products.controller.js +18 -0
- package/src/modules/products/models/category.model.js +42 -32
- package/src/modules/products/products.client.js +4 -2
- package/src/modules/products/store/categories.js +17 -3
- package/src/modules/products/store/products.js +4 -0
- package/src/modules/backoffice/components/admin/Categories.vue +0 -53
- package/src/modules/backoffice/components/admin/CategoryEdit.vue +0 -98
- package/src/modules/products/components/blocks/CategoryCard.vue +0 -42
- package/src/modules/products/router/products.router.js +0 -48
- /package/src/modules/{products → organizations}/components/pages/OrganizationCreate.vue +0 -0
- /package/src/modules/{products → organizations}/components/pages/OrganizationDetails.vue +0 -0
- /package/src/modules/{products → organizations}/components/pages/OrganizationDocuments.vue +0 -0
- /package/src/modules/{products → organizations}/components/pages/OrganizationPeople.vue +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as
|
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
|
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
|
15
|
-
import
|
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
|
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" },
|
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(),
|
23
|
+
const o = B(), U = E(), w = P(e.all), x = P(!1);
|
25
24
|
function N(h) {
|
26
|
-
|
25
|
+
x.value = !0;
|
27
26
|
}
|
28
27
|
function _() {
|
29
|
-
|
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
|
-
|
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
|
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
|
46
|
+
function I() {
|
48
47
|
g.deleteProduct(e.current._id);
|
49
48
|
}
|
50
|
-
function
|
51
|
-
|
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) => (
|
57
|
+
return (h, u) => (i(), s("div", M, [
|
59
58
|
a(d, { class: "flex-nowrap flex-v-center flex" }, {
|
60
|
-
default:
|
61
|
-
c("h1", j, q(
|
62
|
-
|
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:
|
65
|
-
callback:
|
63
|
+
submit: I,
|
64
|
+
callback: C,
|
66
65
|
class: "bg-red mn-r-thin"
|
67
66
|
}, {
|
68
|
-
default:
|
69
|
-
|
67
|
+
default: r(() => [
|
68
|
+
D(" Delete ")
|
70
69
|
]),
|
71
70
|
_: 1
|
72
71
|
})) : A("", !0),
|
73
|
-
a(
|
74
|
-
submit:
|
75
|
-
callback:
|
72
|
+
a($, {
|
73
|
+
submit: O,
|
74
|
+
callback: C,
|
76
75
|
class: "bg-main"
|
77
76
|
}, {
|
78
|
-
default:
|
79
|
-
|
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:
|
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:
|
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, {
|
111
|
-
|
112
|
-
|
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:
|
133
|
-
(
|
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(
|
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:
|
168
|
-
(
|
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(
|
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:
|
204
|
-
(
|
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(
|
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:
|
243
|
+
isPopupOpen: x.value,
|
234
244
|
class: "bg-white pd-big radius-big"
|
235
245
|
}, {
|
236
|
-
default:
|
237
|
-
a(
|
238
|
-
onAdd: u[1] || (u[1] = (t) =>
|
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:
|
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:
|
266
|
+
default: r(() => [
|
257
267
|
c("div", W, [
|
258
|
-
(
|
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:
|
272
|
+
products: w.value,
|
263
273
|
onAdd: u[2] || (u[2] = (l) => {
|
264
|
-
|
274
|
+
v.add(e.current.ingredients, l), _();
|
265
275
|
}),
|
266
276
|
onUpdate: (l) => {
|
267
|
-
|
277
|
+
v.update(e.current.ingredients, l, n), _();
|
268
278
|
},
|
269
279
|
onDelete: (l) => {
|
270
|
-
|
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
|
-
|
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"),
|
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
|
2
|
-
import { useRoute as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
|
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(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
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
|
-
|
69
|
+
S as default
|
57
70
|
};
|
package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
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;
|
package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import { withAsyncContext as
|
2
|
-
import
|
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
|
5
|
-
import { useRoute as
|
6
|
-
import { actions as
|
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
|
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
|
34
|
-
const u =
|
35
|
-
|
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
|
-
}),
|
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,
|
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 }),
|
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
|
61
|
-
|
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 } =
|
101
|
-
return (e, t) => (a(),
|
102
|
-
h(
|
103
|
-
class: "radius-small o-hidden
|
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:
|
107
|
-
|
109
|
+
header: n(() => [
|
110
|
+
c("p", I, d(f(m)("categoriesTitle")), 1)
|
108
111
|
]),
|
109
|
-
content:
|
110
|
-
(a(!0),
|
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
|
-
|
122
|
-
h(
|
123
|
-
class: "radius-small o-hidden
|
124
|
+
L,
|
125
|
+
h(x, {
|
126
|
+
class: "radius-small o-hidden mn-b-small",
|
124
127
|
status: !1
|
125
128
|
}, {
|
126
|
-
header:
|
127
|
-
|
129
|
+
header: n(() => [
|
130
|
+
c("p", M, d(f(m)("filters.price.title")), 1)
|
128
131
|
]),
|
129
|
-
content:
|
130
|
-
(a(!0),
|
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
|
-
|
142
|
-
|
143
|
-
onClick: q,
|
144
|
+
c("button", {
|
145
|
+
onClick: A,
|
144
146
|
class: "bg-main w-100 button"
|
145
|
-
},
|
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/
|
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/
|
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
|
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;
|