@ozdao/prometheus-framework 0.2.102 → 0.2.104
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main-CXObXjv-.js +92 -0
- package/dist/main-DPsHxX0l.mjs +13633 -0
- package/dist/main-DfD5hLQo.mjs +13633 -0
- package/dist/main-DwyUYWFX.js +92 -0
- package/dist/orders.server.js +16 -0
- package/dist/orders.server.mjs +16 -0
- package/dist/organizations.server.js +14 -3
- package/dist/organizations.server.mjs +14 -3
- package/dist/products.server.js +7 -1
- package/dist/products.server.mjs +7 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +43 -41
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +1 -36
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +36 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- 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 +21 -21
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +87 -67
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +30 -31
- 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 +120 -88
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- 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/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- 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-BNKN7kk3.mjs +54 -0
- package/dist/web-C0sFgeYh.mjs +54 -0
- package/dist/web-Douq6xn6.js +1 -0
- package/dist/web-kg3KgbAF.js +1 -0
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +11 -10
- package/src/modules/orders/controllers/orders.controller.js +20 -1
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +22 -10
- package/src/modules/products/components/blocks/CardPosition.vue +32 -7
- package/src/modules/products/components/pages/EditLeftover.vue +0 -3
- package/src/modules/products/components/pages/ProductEdit.vue +51 -15
- package/src/modules/products/controllers/products.controller.js +1 -2
- package/src/modules/products/models/product.model.js +6 -0
- package/src/modules/products/routes/products.routes.js +1 -10
package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js
CHANGED
@@ -1,99 +1,119 @@
|
|
1
|
-
import { ref as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
const _ = { class: "gap-thin" }, N = { class: "gap-thin mn-b-thin flex-nowrap flex" },
|
1
|
+
import { ref as n, computed as q, watch as v, openBlock as o, createElementBlock as p, createElementVNode as y, toDisplayString as U, createBlock as B, withCtx as f, createVNode as d, createCommentVNode as c, unref as w } from "vue";
|
2
|
+
import b from "../../../../components/Field/Field.vue2.js";
|
3
|
+
import g from "../../../../components/Select/Select.vue2.js";
|
4
|
+
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
5
|
+
import Q from "../../../icons/navigation/IconAdd.vue.js";
|
6
|
+
import V from "../../../icons/navigation/IconDelete.vue.js";
|
7
|
+
const _ = { class: "gap-thin" }, N = { class: "gap-thin mn-b-thin flex-nowrap flex" }, S = { class: "bg-white w-100 w-min-15r br-solid br-1px br-black-transp-5 pd-small radius-small" }, A = ["disabled"], E = {
|
8
|
+
key: 0,
|
9
|
+
class: "gap-thin flex-nowrap flex"
|
10
|
+
}, z = {
|
8
11
|
__name: "CardPosition",
|
9
12
|
props: {
|
10
13
|
product: Object,
|
14
|
+
products: Array,
|
11
15
|
array: Array,
|
12
|
-
|
16
|
+
showPrice: {
|
17
|
+
type: Boolean,
|
18
|
+
default: !0
|
19
|
+
}
|
13
20
|
},
|
14
21
|
emits: [
|
15
22
|
"add",
|
16
23
|
"delete",
|
17
24
|
"update"
|
18
25
|
],
|
19
|
-
setup(
|
20
|
-
const
|
21
|
-
() =>
|
26
|
+
setup(i, { emit: h }) {
|
27
|
+
const t = i, m = h, r = n(null), e = n(1), l = n("pcs"), s = n(0), k = q(
|
28
|
+
() => r.value && e.value > 0 && s.value >= 0
|
22
29
|
);
|
23
|
-
|
24
|
-
|
25
|
-
}),
|
26
|
-
|
27
|
-
...
|
28
|
-
price:
|
29
|
-
quantity:
|
30
|
-
type:
|
30
|
+
v(t.array, () => {
|
31
|
+
r.value = t.product, e.value = t.product.quantity || 1, s.value = t.product.price, l.value = t.product.type;
|
32
|
+
}), t.product && (r.value = t.product, e.value = t.product.quantity || 1, s.value = t.product.price, l.value = t.product.type), v([r, e, s, l], () => {
|
33
|
+
m("update", {
|
34
|
+
...r.value,
|
35
|
+
price: s.value,
|
36
|
+
quantity: e.value || 1,
|
37
|
+
type: l.value
|
31
38
|
});
|
32
39
|
});
|
33
|
-
function
|
34
|
-
|
35
|
-
...
|
36
|
-
price:
|
37
|
-
quantity:
|
38
|
-
type:
|
40
|
+
function x() {
|
41
|
+
m("add", {
|
42
|
+
...r.value,
|
43
|
+
price: s.value,
|
44
|
+
quantity: e.value || 1,
|
45
|
+
type: l.value
|
39
46
|
});
|
40
47
|
}
|
41
|
-
function
|
42
|
-
|
43
|
-
...
|
44
|
-
price:
|
45
|
-
quantity:
|
46
|
-
type:
|
48
|
+
function P() {
|
49
|
+
m("delete", {
|
50
|
+
...r.value,
|
51
|
+
price: s.value,
|
52
|
+
quantity: e.value || 1,
|
53
|
+
type: l.value
|
47
54
|
});
|
48
55
|
}
|
49
|
-
return (
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
"onUpdate:modelValue": r[0] || (r[0] = (o) => t.value = o),
|
54
|
-
options: d.products,
|
55
|
-
label: "name",
|
56
|
-
multiple: !1,
|
57
|
-
taggable: !1,
|
58
|
-
placeholder: "Select a product",
|
59
|
-
class: "bg-white br-solid br-1px br-black-transp-5 pd-small radius-small"
|
60
|
-
}, null, 8, ["modelValue", "options"]),
|
61
|
-
d.product ? f("", !0) : (n(), c("button", {
|
56
|
+
return (C, a) => (o(), p("div", _, [
|
57
|
+
y("div", N, [
|
58
|
+
y("div", S, U(r.value.name || r.value._id.name), 1),
|
59
|
+
i.showPrice ? c("", !0) : (o(), B(b, {
|
62
60
|
key: 0,
|
63
|
-
|
64
|
-
|
61
|
+
field: e.value,
|
62
|
+
"onUpdate:field": a[1] || (a[1] = (u) => e.value = u),
|
63
|
+
type: "number",
|
64
|
+
label: "Qty",
|
65
|
+
class: "bg-white w-100 w-max-10r br-solid br-1px br-black-transp-5 pd-small radius-small"
|
66
|
+
}, {
|
67
|
+
default: f(() => [
|
68
|
+
d(g, {
|
69
|
+
select: l.value,
|
70
|
+
"onUpdate:select": a[0] || (a[0] = (u) => l.value = u),
|
71
|
+
options: [
|
72
|
+
"pcs",
|
73
|
+
"g",
|
74
|
+
"ml"
|
75
|
+
],
|
76
|
+
class: "bg-grey pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"
|
77
|
+
}, null, 8, ["select"])
|
78
|
+
]),
|
79
|
+
_: 1
|
80
|
+
}, 8, ["field"])),
|
81
|
+
i.product ? c("", !0) : (o(), p("button", {
|
82
|
+
key: 1,
|
83
|
+
disabled: !k.value,
|
84
|
+
onClick: x,
|
65
85
|
class: "bg-main aspect-1x1 radius-small pd-small"
|
66
86
|
}, [
|
67
|
-
|
68
|
-
], 8,
|
69
|
-
|
70
|
-
key:
|
71
|
-
onClick:
|
87
|
+
d(w(Q), { class: "i-semi" })
|
88
|
+
], 8, A)),
|
89
|
+
i.product ? (o(), p("button", {
|
90
|
+
key: 2,
|
91
|
+
onClick: P,
|
72
92
|
class: "bg-red aspect-1x1 radius-small pd-small"
|
73
93
|
}, [
|
74
|
-
|
75
|
-
])) :
|
94
|
+
d(w(V), { class: "i-semi" })
|
95
|
+
])) : c("", !0)
|
76
96
|
]),
|
77
|
-
|
78
|
-
|
79
|
-
field:
|
80
|
-
"onUpdate:field":
|
97
|
+
i.showPrice ? (o(), p("div", E, [
|
98
|
+
d(b, {
|
99
|
+
field: s.value,
|
100
|
+
"onUpdate:field": a[2] || (a[2] = (u) => s.value = u),
|
81
101
|
type: "number",
|
82
102
|
label: "Price",
|
83
|
-
symbol:
|
103
|
+
symbol: C.returnCurrency(),
|
84
104
|
class: "bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"
|
85
105
|
}, null, 8, ["field", "symbol"]),
|
86
|
-
|
87
|
-
field:
|
88
|
-
"onUpdate:field":
|
106
|
+
d(b, {
|
107
|
+
field: e.value,
|
108
|
+
"onUpdate:field": a[4] || (a[4] = (u) => e.value = u),
|
89
109
|
type: "number",
|
90
110
|
label: "Qty",
|
91
111
|
class: "bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"
|
92
112
|
}, {
|
93
|
-
default:
|
94
|
-
|
95
|
-
select:
|
96
|
-
"onUpdate:select":
|
113
|
+
default: f(() => [
|
114
|
+
d(g, {
|
115
|
+
select: l.value,
|
116
|
+
"onUpdate:select": a[3] || (a[3] = (u) => l.value = u),
|
97
117
|
options: [
|
98
118
|
"pcs",
|
99
119
|
"g",
|
@@ -104,10 +124,10 @@ const _ = { class: "gap-thin" }, N = { class: "gap-thin mn-b-thin flex-nowrap fl
|
|
104
124
|
]),
|
105
125
|
_: 1
|
106
126
|
}, 8, ["field"])
|
107
|
-
])
|
127
|
+
])) : c("", !0)
|
108
128
|
]));
|
109
129
|
}
|
110
130
|
};
|
111
131
|
export {
|
112
|
-
|
132
|
+
z as default
|
113
133
|
};
|
package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.vue2.cjs"),c=require("../../../../components/Magnifier/Magnifier.vue.cjs");require("./ImagesThumbnails.vue2.cjs");const d=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),p={class:"product-images"},m={class:"no-responsive cols-4 gap-thin"},_=["src","onClick"],g={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(o){const t=e.ref(!1),n=e.ref(0),a=s=>{n.value=s,t.value=!0},i=()=>{t.value=!1};return(s,v)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.images,(l,r)=>(e.openBlock(),e.createElementBlock("img",{key:r,src:(s.FILE_SERVER_URL||"")+l,onClick:h=>a(r),class:"radius-medium bg-white o-hidden thumbnail"},null,8,_))),128))]),e.createVNode(u.default,{onClosePopup:i,isPopupOpen:t.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(c.default,{imageSrc:(s.FILE_SERVER_URL||"")+o.images[n.value],class:"magnifier z-index-4"},null,8,["imageSrc"])]),_:1},8,["isPopupOpen"])]))}},f=d.default(g,[["__scopeId","data-v-5058c750"]]);exports.default=f;
|
package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as r, openBlock as o, createElementBlock as i, createElementVNode as p, Fragment as d, renderList as _, createVNode as c, withCtx as g } from "vue";
|
2
|
-
import f from "../../../../components/Popup/Popup.
|
2
|
+
import f from "../../../../components/Popup/Popup.vue2.js";
|
3
3
|
import h from "../../../../components/Magnifier/Magnifier.vue.js";
|
4
4
|
import "./ImagesThumbnails.vue2.js";
|
5
5
|
import v from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/Select/Select.vue2.cjs"),d=require("../../../../components/Field/Field.vue2.cjs"),n=require("../../../../components/Block/Block.vue.cjs"),l=require("../../store/categories.cjs");require("./CategoryEdit.vue2.cjs");const b={class:"mn-r-auto"},h={class:"mn-b-medium w-100 flex-nowrap gap-thin flex"},w={class:"flex-v-center flex-nowrap flex"},x=e.createElementVNode("h4",{class:"mn-r-thin t-medium"},"Localization",-1),N=["onClick"],k=["onClick"],V=["onClick"],y={__name:"CategoryEdit",setup(C){const o=c.useRoute(),u=c.useRouter();o.params.category?l.actions.fetchCategory(o.params.category):l.actions.resetCategory(),e.computed(()=>l.state.current),e.computed(()=>o.name);function m(){o.params.category?l.actions.updateCategory(o.params.category):l.actions.addCategory()}function p(){u.push({name:"Categories Organization",params:{_id:o.params._id}})}return(_,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(n.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",b,e.toDisplayString(e.unref(o).params.category?"Edit Category":"Add Category"),1),e.createVNode(f.default,{submit:m,callback:p,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Save Category ")]),_:1})]),_:1}),e.createVNode(n.default,{title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",h,[e.createVNode(d.default,{field:l.state.current.order,"onUpdate:field":r[0]||(r[0]=t=>l.state.current.order=t),label:"Order",disabled:!0,class:"w-25 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.url,"onUpdate:field":r[1]||(r[1]=t=>l.state.current.url=t),label:"URL",placeholder:"Enter category URL",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.name,"onUpdate:field":r[2]||(r[2]=t=>l.state.current.name=t),label:"Name",placeholder:"Enter category name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),e.createVNode(g.default,{select:l.state.current.status,"onUpdate:select":r[3]||(r[3]=t=>l.state.current.status=t),label:"Status",options:["draft","internal","published","removed"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),e.createElementVNode("div",w,[x,e.createElementVNode("button",{onClick:r[4]||(r[4]=()=>l.state.current.localization.push({locale:"",text:""})),class:"i-small pd-thin button-delete button"}," + ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.localization,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.locale,"onUpdate:field":a=>t.locale=a,placeholder:"Locale",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.text,"onUpdate:field":a=>t.text=a,placeholder:"Text",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.localization.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,N)]))),128))]),_:1}),e.createVNode(n.default,{title:"Subcategories",placeholder:"No subcategories added yet",actions:[{label:"+",function:()=>l.state.current.subcategories.push({name:"",url:""})}],class:"mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.subcategories,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Subcategory name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.url,"onUpdate:field":a=>t.url=a,placeholder:"Subcategory",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.subcategories.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,k)]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Filters",placeholder:"No filters added yet",actions:[{label:"+",function:()=>l.state.current.filters.push({name:"",url:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.filters,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Filter name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.options,"onUpdate:field":a=>t.options=a,placeholder:"Filter options divided by ,",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.filters.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,V)]))),128))]),_:1},8,["actions"])],64))}};exports.default=y;
|
@@ -2,7 +2,7 @@ import { computed as h, openBlock as o, createElementBlock as c, Fragment as m,
|
|
2
2
|
import { useRoute as k, useRouter as v } from "vue-router";
|
3
3
|
import g from "../../../icons/navigation/IconDelete.vue.js";
|
4
4
|
import S from "../../../../components/Button/Button.vue2.js";
|
5
|
-
import E from "../../../../components/Select/Select.
|
5
|
+
import E from "../../../../components/Select/Select.vue2.js";
|
6
6
|
import i from "../../../../components/Field/Field.vue2.js";
|
7
7
|
import p from "../../../../components/Block/Block.vue.js";
|
8
8
|
import { actions as f, state as t } from "../../store/categories.js";
|
package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),w=require("../../../../components/Field/Field.vue2.cjs"),N=require("../../../../components/Feed/Feed.vue.cjs"),C=require("../../../../components/Select/Select.vue2.cjs"),q=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const P=require("../blocks/CardPosition.vue.cjs"),x=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),p=require("../../../globals/store/globals.cjs"),V=require("../../../auth/store/auth.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const B={class:"pd-thin"},E={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},S={class:""},D={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},L={class:"gap-thin flex-v-center flex-nojustify flex"},R={class:"mn-r-auto"},F={__name:"EditLeftover",setup(O){const r=v.useRoute(),i=v.useRouter(),f=e.ref(m.state.all);e.ref(null);const b=e.computed(()=>Number(t.state.current.positions.reduce((a,s)=>Number(a)+Number(s.price),0))),c=e.ref(!1);function g(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{if(r.params.leftover)try{await t.actions.fetch(r.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const a=await m.actions.read({organization:r.params._id,limit:100});f.value=a}catch{console.error("error")}});function _(){r.params.leftover?t.actions.fetch(r.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){t.state.current.organization=r.params._id,r.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")):(t.state.current.creator={type:"user",target:V.state.user._id},t.state.current.owner={type:"organization",target:r.params._id},console.log("leftover state is",t.state.current),t.actions.create(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")))}function k(){t.actions.delete(r.params.leftover).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error"))}return(a,s)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("header",E,[e.createElementVNode("h2",S,e.toDisplayString(e.unref(r).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(C.default,{select:t.state.current.type,"onUpdate:select":s[0]||(s[0]=o=>t.state.current.type=o),options:["stock-in","stock-out"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(q.default,{title:"Add position",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:o=>m.actions.read(o),state:null},options:{organization:e.unref(r).params._id},class:""},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(n,l)=>(e.openBlock(),e.createBlock(x.default,{key:n._id,editable:!1,product:n,onClick:()=>{let u={...n};u.quantity=1,u.type="pcs",p.actions.add(t.state.current.positions,u),h()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(d.default,{title:"Invetory Sheet",actions:[{label:"+",function:()=>g()}],placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(o,n)=>(e.openBlock(),e.createBlock(P.default,{key:o._id,product:o,array:t.state.current.positions,products:f.value,onUpdate:l=>p.actions.update(t.state.current.positions,l,n),onDelete:l=>p.actions.delete(t.state.current.positions,l,n),class:"mn-b-small radius-medium bg-white pd-small"},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1},8,["actions"]),e.createVNode(d.default,{title:"Comment",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(w.default,{field:t.state.current.comment,"onUpdate:field":s[1]||(s[1]=o=>t.state.current.comment=o),label:"Comment",type:"textarea",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),_:1}),e.createVNode(d.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",L,[e.createElementVNode("h3",R," In total: "+e.toDisplayString(a.formatPrice(b.value)),1),e.createElementVNode("a",{onClick:s[2]||(s[2]=o=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:s[3]||(s[3]=o=>_())}," Reset "),e.unref(r).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s[4]||(s[4]=o=>k()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})]))}};exports.default=F;
|
@@ -1,24 +1,24 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as b, computed as z, onMounted as E, openBlock as l, createElementBlock as m, createElementVNode as n, toDisplayString as k, unref as h, createVNode as a, withCtx as c, Fragment as P, renderList as x, createBlock as $, createCommentVNode as U } from "vue";
|
2
2
|
import v from "../../../../components/Block/Block.vue.js";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
3
|
+
import B from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import F from "../../../../components/Feed/Feed.vue.js";
|
5
|
+
import I from "../../../../components/Select/Select.vue2.js";
|
6
|
+
import O from "../../../../components/Popup/Popup.vue2.js";
|
7
7
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
8
|
-
import
|
9
|
-
import
|
8
|
+
import V from "../blocks/CardPosition.vue.js";
|
9
|
+
import A from "../../../orders/components/blocks/CardOrderItem.vue.js";
|
10
10
|
import { useRoute as j, useRouter as q } from "vue-router";
|
11
11
|
import { actions as y } from "../../../globals/store/globals.js";
|
12
12
|
import { state as M } from "../../../auth/store/auth.js";
|
13
13
|
import { state as e, actions as u } from "../../store/leftovers.js";
|
14
14
|
import { state as G, actions as C } from "../../store/products.js";
|
15
15
|
import "./EditLeftover.vue2.js";
|
16
|
-
const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-center flex-nowrap flex" }, K = { class: "" }, Q =
|
16
|
+
const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-center flex-nowrap flex" }, K = { class: "" }, Q = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, T = { class: "gap-thin flex-v-center flex-nojustify flex" }, W = { class: "mn-r-auto" }, de = {
|
17
17
|
__name: "EditLeftover",
|
18
|
-
setup(
|
19
|
-
const t = j(), d = q(), g =
|
20
|
-
|
21
|
-
const N = z(() => Number(e.current.positions.reduce((s, o) => Number(s) + Number(o.price), 0))), f =
|
18
|
+
setup(X) {
|
19
|
+
const t = j(), d = q(), g = b(G.all);
|
20
|
+
b(null);
|
21
|
+
const N = z(() => Number(e.current.positions.reduce((s, o) => Number(s) + Number(o.price), 0))), f = b(!1);
|
22
22
|
function S() {
|
23
23
|
f.value = !0;
|
24
24
|
}
|
@@ -68,10 +68,10 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-cente
|
|
68
68
|
(s) => console.error("error")
|
69
69
|
);
|
70
70
|
}
|
71
|
-
return (s, o) => (l(),
|
71
|
+
return (s, o) => (l(), m("div", H, [
|
72
72
|
n("header", J, [
|
73
|
-
n("h2", K, k(
|
74
|
-
a(
|
73
|
+
n("h2", K, k(h(t).params.leftover ? "Edit " : "Add ") + " Inventory", 1),
|
74
|
+
a(I, {
|
75
75
|
select: e.current.type,
|
76
76
|
"onUpdate:select": o[0] || (o[0] = (r) => e.current.type = r),
|
77
77
|
options: [
|
@@ -82,16 +82,15 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-cente
|
|
82
82
|
class: "bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"
|
83
83
|
}, null, 8, ["select"])
|
84
84
|
]),
|
85
|
-
a(
|
85
|
+
a(O, {
|
86
86
|
title: "Add position",
|
87
87
|
onClosePopup: w,
|
88
88
|
isPopupOpen: f.value,
|
89
89
|
class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
|
90
90
|
}, {
|
91
91
|
default: c(() => [
|
92
|
-
Q,
|
93
|
-
|
94
|
-
a(B, {
|
92
|
+
n("div", Q, [
|
93
|
+
a(F, {
|
95
94
|
search: !0,
|
96
95
|
states: {
|
97
96
|
empty: {
|
@@ -104,14 +103,14 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-cente
|
|
104
103
|
state: null
|
105
104
|
},
|
106
105
|
options: {
|
107
|
-
organization:
|
106
|
+
organization: h(t).params._id
|
108
107
|
},
|
109
108
|
class: ""
|
110
109
|
}, {
|
111
110
|
default: c(({
|
112
111
|
items: r
|
113
112
|
}) => [
|
114
|
-
(l(!0),
|
113
|
+
(l(!0), m(P, null, x(r, (i, p) => (l(), $(A, {
|
115
114
|
key: i._id,
|
116
115
|
editable: !1,
|
117
116
|
product: i,
|
@@ -138,19 +137,19 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-cente
|
|
138
137
|
class: "mn-b-semi"
|
139
138
|
}, {
|
140
139
|
default: c(() => [
|
141
|
-
(l(!0),
|
140
|
+
(l(!0), m(P, null, x(e.current.positions, (r, i) => (l(), $(V, {
|
142
141
|
key: r._id,
|
143
142
|
product: r,
|
144
143
|
array: e.current.positions,
|
145
144
|
products: g.value,
|
146
|
-
onUpdate: (
|
145
|
+
onUpdate: (p) => y.update(
|
147
146
|
e.current.positions,
|
148
|
-
|
147
|
+
p,
|
149
148
|
i
|
150
149
|
),
|
151
|
-
onDelete: (
|
150
|
+
onDelete: (p) => y.delete(
|
152
151
|
e.current.positions,
|
153
|
-
|
152
|
+
p,
|
154
153
|
i
|
155
154
|
),
|
156
155
|
class: "mn-b-small radius-medium bg-white pd-small"
|
@@ -163,7 +162,7 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-cente
|
|
163
162
|
class: "mn-b-semi"
|
164
163
|
}, {
|
165
164
|
default: c(() => [
|
166
|
-
a(
|
165
|
+
a(B, {
|
167
166
|
field: e.current.comment,
|
168
167
|
"onUpdate:field": o[1] || (o[1] = (r) => e.current.comment = r),
|
169
168
|
label: "Comment",
|
@@ -175,8 +174,8 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-cente
|
|
175
174
|
}),
|
176
175
|
a(v, { class: "" }, {
|
177
176
|
default: c(() => [
|
178
|
-
n("section",
|
179
|
-
n("h3",
|
177
|
+
n("section", T, [
|
178
|
+
n("h3", W, " In total: " + k(s.formatPrice(N.value)), 1),
|
180
179
|
n("a", {
|
181
180
|
onClick: o[2] || (o[2] = (r) => L()),
|
182
181
|
class: "bg-main button"
|
@@ -185,7 +184,7 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-cente
|
|
185
184
|
class: "t-white bg-second button",
|
186
185
|
onClick: o[3] || (o[3] = (r) => D())
|
187
186
|
}, " Reset "),
|
188
|
-
|
187
|
+
h(t).params.leftover ? (l(), m("a", {
|
189
188
|
key: 0,
|
190
189
|
onClick: o[4] || (o[4] = (r) => R()),
|
191
190
|
class: "t-white bg-red button"
|
@@ -198,5 +197,5 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-medium gap-small flex-v-cente
|
|
198
197
|
}
|
199
198
|
};
|
200
199
|
export {
|
201
|
-
|
200
|
+
de as default
|
202
201
|
};
|
@@ -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"),k=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../../../components/Field/Field.vue2.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),y=require("../../../../components/EditImages/EditImages.vue.cjs"),b=require("../../../icons/navigation/IconDelete.vue.cjs"),q=require("../blocks/CardPosition.vue.cjs"),P=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),E=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const U={class:"for-transition w-100 cols-1 pd-thin gap-thin"},z={class:"mn-r-auto"},F={class:"cols-2 gap-thin"},I={key:0,class:"cols-1 gap-thin"},O={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},D={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},L={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},S={__name:"ProductEdit",setup(T){const l=k.useRoute(),f=k.useRouter(),g=e.ref(t.state.all),p=e.ref(!1);function N(s){p.value=!0}function i(){p.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),l.params.product&&await t.actions.read({_id:l.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const s=await t.actions.read({organization:l.params._id,limit:100});g.value=s}catch{console.error("error")}});function v(){l.params.product?t.actions.update(l.params.product,t.state.current):t.actions.create(l.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function h(){f.push({name:"Organization",params:{_id:l.params._id}})}return(s,c)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",z,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:h,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:h,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(y.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":c[0]||(c[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",F,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(E.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(q.default,{key:a._id,product:a,array:t.state.current.ingredients,products:g.value,showPrice:!1,onAdd:c[1]||(c[1]=r=>{u.actions.add(t.state.current.ingredients,r),i()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),i()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),i()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"]),e.createVNode(C.default,{title:"Add ingredient",onClosePopup:i,isPopupOpen:p.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(V.default,{search:{class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>t.actions.read(a),state:null},options:{organization:e.unref(l).params._id},class:""},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(n,r)=>(e.openBlock(),e.createBlock(P.default,{key:n._id,editable:!1,product:n,onClick:()=>{let m={...n};m.quantity=1,m.type="pcs",u.actions.add(t.state.current.ingredients,m),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(f).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,n)=>(e.openBlock(),e.createBlock(B.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":r=>t.state.current.category=r},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(b.default,{onClick:()=>t.state.current.information.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",L,[e.createVNode(b.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]))}};exports.default=S;
|