@ozdao/prometheus-framework 0.2.46 → 0.2.48
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main-610fd21a.mjs +13628 -0
- package/dist/main-669fac33.js +91 -0
- package/dist/main-AMWMdo3t.js +91 -0
- package/dist/main-R6dlNKp-.mjs +13606 -0
- package/dist/main.css +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +225 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +20 -20
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.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 +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.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 +3 -3
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.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 +3 -3
- 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 +15 -15
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +52 -49
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +20 -21
- 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 +89 -79
- 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 +7 -6
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +51 -62
- 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 +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 +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.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-0410cac1.js +1 -0
- package/dist/web-HvAJWryM.js +1 -0
- package/dist/web-XMv5d7hK.mjs +55 -0
- package/dist/web-c1619455.mjs +55 -0
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +9 -7
- package/src/modules/products/components/blocks/CardPosition.vue +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +2 -3
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/src/modules/products/components/pages/ProductEdit.vue +15 -0
- package/src/modules/products/components/pages/Products.vue +1 -0
- package/src/modules/products/components/sections/SectionProduct.vue +10 -10
- package/src/styles/base/all.scss +4 -1
@@ -1,40 +1,39 @@
|
|
1
|
-
import { withAsyncContext as i, computed as s, onMounted as p, openBlock as n, createElementBlock as
|
2
|
-
import { useRoute as
|
1
|
+
import { withAsyncContext as i, computed as s, onMounted as p, openBlock as n, createElementBlock as d, createBlock as l, createCommentVNode as _, createVNode as f } from "vue";
|
2
|
+
import { useRoute as h, useRouter as x } from "vue-router";
|
3
3
|
import { useI18n as k } from "vue-i18n";
|
4
4
|
import "../../../globals/localization/vue-i18n.js";
|
5
5
|
import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
6
|
-
import
|
7
|
-
import
|
6
|
+
import v from "../sections/PopularProducts.vue.js";
|
7
|
+
import B from "../sections/SectionProduct.vue.js";
|
8
8
|
import "../../store/categories.js";
|
9
9
|
import { useMeta as w } from "../../../../../../node_modules/vue-meta/dist/vue-meta.esm-browser.min.js";
|
10
|
-
import { state as
|
11
|
-
import { actions as
|
10
|
+
import { state as y } from "../../../auth/store/auth.js";
|
11
|
+
import { actions as M, state as t } from "../../store/products.js";
|
12
12
|
import "./Product.vue2.js";
|
13
|
-
const
|
13
|
+
const $ = { class: "flex flex-column w-100 o-hidden gap-thin pd-thin" }, G = {
|
14
14
|
__name: "Product",
|
15
|
-
async setup(
|
16
|
-
let
|
17
|
-
const e =
|
18
|
-
|
19
|
-
const
|
15
|
+
async setup(g) {
|
16
|
+
let o, r;
|
17
|
+
const e = h();
|
18
|
+
x(), [o, r] = i(() => M.fetchProduct(e.params.product)), await o, r(), e.meta.title.en = t.current.name, e.meta.title.ru = t.current.name;
|
19
|
+
const c = s(() => t.current), m = {
|
20
20
|
messages: {
|
21
21
|
en: {},
|
22
22
|
ru: {}
|
23
23
|
}
|
24
|
-
}, { t:
|
24
|
+
}, { t: a } = k(m), u = s(() => ({
|
25
25
|
title: t.current.name,
|
26
|
-
description:
|
26
|
+
description: a("description")
|
27
27
|
}));
|
28
28
|
return w(u), p(() => {
|
29
|
-
}), (C,
|
30
|
-
|
31
|
-
o.value ? (n(), f(g, {
|
29
|
+
}), (C, N) => (n(), d("div", $, [
|
30
|
+
c.value ? (n(), l(B, {
|
32
31
|
key: 0,
|
33
|
-
product:
|
34
|
-
user:
|
32
|
+
product: c.value,
|
33
|
+
user: y.user,
|
35
34
|
class: "pos-relative"
|
36
|
-
}, null, 8, ["product", "user"])) :
|
37
|
-
|
35
|
+
}, null, 8, ["product", "user"])) : _("", !0),
|
36
|
+
f(v)
|
38
37
|
]));
|
39
38
|
}
|
40
39
|
};
|
@@ -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("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.vue2.cjs");const d=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const b=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),h=require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Popup/Popup.vue.cjs");const x=require("../../../../components/EditImages/EditImages.vue.cjs"),p=require("../../../icons/navigation/IconDelete.vue.cjs"),g=require("../blocks/CardPosition.vue.cjs"),V=require("../sections/EditProductInfo.vue.cjs"),s=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),k=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const v={class:"for-transition w-100 cols-1 pd-thin gap-thin"},B={class:"mn-r-auto"},q={class:"cols-2 gap-thin"},C={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},y={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},E={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},U={__name:"ProductEdit",setup(D){const n=f.useRoute(),_=f.useRouter(),c=e.ref(t.state.all);e.onMounted(async()=>{await k.actions.fetchCategories();try{const u=await t.actions.read({organization:n.params._id,limit:100});c.value=u}catch{console.error("error")}n.params.product&&await t.actions.read({_id:n.params.product}),t.state.current.ingridients||(t.state.current.ingridients=[])});function w(){n.params.product?t.actions.update(n.params.product,t.state.current):t.actions.create(n.params._id,t.state.current)}function N(){t.actions.deleteProduct(t.state.current._id)}function m(){_.push({name:"Organization",params:{_id:n.params._id}})}return(u,i)=>(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",B,e.toDisplayString(e.unref(n).params.product?t.state.current.name:"Create Product"),1),e.unref(n).params.product?(e.openBlock(),e.createBlock(h.default,{key:0,submit:N,callback:m,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{submit:w,callback:m,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(x.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":i[0]||(i[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",q,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(V.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Categories"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.state.all,(a,r)=>(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":l=>t.state.current.category=l},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1}),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,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:r},[e.createVNode(d.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",C,[e.createVNode(p.default,{onClick:()=>t.state.current.information.splice(r,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,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(d.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",y,[e.createVNode(p.default,{onClick:()=>t.state.current.localization.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]),e.createVNode(o.default,{title:"Quantity Discount",class:"mn-b-semi",actions:[{label:"+",function:()=>t.state.current.quantityDiscount.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.quantityDiscount,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(d.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Quantity",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Discount",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",E,[e.createVNode(p.default,{onClick:()=>t.state.current.quantityDiscount.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Add Ingridient",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(g.default,{onAdd:i[1]||(i[1]=a=>s.actions.add(t.state.current.ingridients,a)),products:c.value},null,8,["products"]),e.createVNode(o.default,{placeholder:"No positions added yet",class:"pd-zero mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingridients,(a,r)=>(e.openBlock(),e.createBlock(g.default,{key:a._id,product:a,array:t.state.current.ingridients,products:c.value,onAdd:i[2]||(i[2]=l=>s.actions.add(t.state.current.ingridients,l)),onUpdate:l=>s.actions.update(t.state.current.ingridients,l,r),onDelete:l=>s.actions.delete(t.state.current.ingridients,l,r)},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1})]),_:1})]))}};exports.default=U;
|
@@ -1,89 +1,99 @@
|
|
1
|
-
import { ref as
|
2
|
-
import { useRoute as
|
1
|
+
import { ref as N, onMounted as P, openBlock as i, createElementBlock as s, createVNode as a, withCtx as n, createElementVNode as m, toDisplayString as V, unref as x, createBlock as v, createTextVNode as k, createCommentVNode as q, Fragment as p, renderList as f } from "vue";
|
2
|
+
import { useRoute as A, useRouter as B } 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
|
-
import
|
7
|
-
import "../../../../components/Tab/Tab.
|
8
|
-
import
|
6
|
+
import d from "../../../../components/Block/Block.vue.js";
|
7
|
+
import "../../../../components/Tab/Tab.vue2.js";
|
8
|
+
import u from "../../../../components/Field/Field.vue.js";
|
9
9
|
import "../../../../components/Select/Select.vue.js";
|
10
|
-
import
|
11
|
-
import
|
10
|
+
import E from "../../../../components/Checkbox/Checkbox.vue2.js";
|
11
|
+
import U from "../../../../components/Button/Button.vue.js";
|
12
12
|
import "../../../../components/Popup/Popup.vue.js";
|
13
|
-
import
|
14
|
-
import
|
15
|
-
import
|
13
|
+
import R from "../../../../components/EditImages/EditImages.vue.js";
|
14
|
+
import w from "../../../icons/navigation/IconDelete.vue.js";
|
15
|
+
import C from "../blocks/CardPosition.vue.js";
|
16
16
|
import S from "../sections/EditProductInfo.vue.js";
|
17
|
-
import { actions as
|
18
|
-
import { state as e, actions as
|
17
|
+
import { actions as h } from "../../../globals/store/globals.js";
|
18
|
+
import { state as e, actions as _ } from "../../store/products.js";
|
19
19
|
import { actions as T, state as F } from "../../store/categories.js";
|
20
20
|
import "./ProductEdit.vue2.js";
|
21
|
-
const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class: "mn-r-auto" },
|
21
|
+
const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class: "mn-r-auto" }, I = { class: "cols-2 gap-thin" }, M = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, O = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, j = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, pe = {
|
22
22
|
__name: "ProductEdit",
|
23
|
-
setup(
|
24
|
-
const
|
25
|
-
|
26
|
-
await T.fetchCategories()
|
23
|
+
setup(G) {
|
24
|
+
const o = A(), D = B(), g = N(e.all);
|
25
|
+
P(async () => {
|
26
|
+
await T.fetchCategories();
|
27
|
+
try {
|
28
|
+
const b = await _.read({
|
29
|
+
organization: o.params._id,
|
30
|
+
limit: 100
|
31
|
+
});
|
32
|
+
g.value = b;
|
33
|
+
} catch {
|
34
|
+
console.error("error");
|
35
|
+
}
|
36
|
+
o.params.product && await _.read({ _id: o.params.product }), e.current.ingridients || (e.current.ingridients = []);
|
27
37
|
});
|
28
|
-
function D() {
|
29
|
-
d.params.product ? h.update(d.params.product, e.current) : h.create(d.params._id, e.current);
|
30
|
-
}
|
31
38
|
function $() {
|
32
|
-
|
39
|
+
o.params.product ? _.update(o.params.product, e.current) : _.create(o.params._id, e.current);
|
40
|
+
}
|
41
|
+
function z() {
|
42
|
+
_.deleteProduct(e.current._id);
|
33
43
|
}
|
34
|
-
function
|
35
|
-
|
44
|
+
function y() {
|
45
|
+
D.push({
|
36
46
|
name: "Organization",
|
37
47
|
params: {
|
38
|
-
_id:
|
48
|
+
_id: o.params._id
|
39
49
|
}
|
40
50
|
});
|
41
51
|
}
|
42
|
-
return (
|
43
|
-
a(
|
52
|
+
return (b, c) => (i(), s("div", L, [
|
53
|
+
a(d, { class: "flex-nowrap flex-v-center flex" }, {
|
44
54
|
default: n(() => [
|
45
|
-
m("h1", Q,
|
46
|
-
x(
|
55
|
+
m("h1", Q, V(x(o).params.product ? e.current.name : "Create Product"), 1),
|
56
|
+
x(o).params.product ? (i(), v(U, {
|
47
57
|
key: 0,
|
48
|
-
submit:
|
49
|
-
callback:
|
58
|
+
submit: z,
|
59
|
+
callback: y,
|
50
60
|
class: "bg-red mn-r-thin"
|
51
61
|
}, {
|
52
62
|
default: n(() => [
|
53
|
-
|
63
|
+
k(" Delete ")
|
54
64
|
]),
|
55
65
|
_: 1
|
56
|
-
})) :
|
57
|
-
a(
|
58
|
-
submit:
|
59
|
-
callback:
|
66
|
+
})) : q("", !0),
|
67
|
+
a(U, {
|
68
|
+
submit: $,
|
69
|
+
callback: y,
|
60
70
|
class: "bg-main"
|
61
71
|
}, {
|
62
72
|
default: n(() => [
|
63
|
-
|
73
|
+
k(" Save ")
|
64
74
|
]),
|
65
75
|
_: 1
|
66
76
|
})
|
67
77
|
]),
|
68
78
|
_: 1
|
69
79
|
}),
|
70
|
-
a(
|
80
|
+
a(d, {
|
71
81
|
placeholder: "The product doesn't have any images yet.",
|
72
82
|
class: "h-min"
|
73
83
|
}, {
|
74
84
|
default: n(() => [
|
75
|
-
a(
|
85
|
+
a(R, {
|
76
86
|
images: e.current.images,
|
77
87
|
uploadPath: "photos",
|
78
|
-
"onUpdate:images":
|
88
|
+
"onUpdate:images": c[0] || (c[0] = (t) => {
|
79
89
|
e.current.images = t;
|
80
90
|
})
|
81
91
|
}, null, 8, ["images"])
|
82
92
|
]),
|
83
93
|
_: 1
|
84
94
|
}),
|
85
|
-
m("div",
|
86
|
-
a(
|
95
|
+
m("div", I, [
|
96
|
+
a(d, { title: "Profile" }, {
|
87
97
|
default: n(() => [
|
88
98
|
a(S, {
|
89
99
|
product: e.current
|
@@ -91,9 +101,9 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
91
101
|
]),
|
92
102
|
_: 1
|
93
103
|
}),
|
94
|
-
a(
|
104
|
+
a(d, { title: "Categories" }, {
|
95
105
|
default: n(() => [
|
96
|
-
(
|
106
|
+
(i(!0), s(p, null, f(F.all, (t, r) => (i(), v(E, {
|
97
107
|
label: t.name,
|
98
108
|
name: "categories",
|
99
109
|
value: t.url,
|
@@ -104,7 +114,7 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
104
114
|
]),
|
105
115
|
_: 1
|
106
116
|
}),
|
107
|
-
a(
|
117
|
+
a(d, {
|
108
118
|
title: "Parameters",
|
109
119
|
placeholder: "No parameters added yet",
|
110
120
|
actions: [{
|
@@ -114,25 +124,25 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
114
124
|
class: "cols-1 gap-thin"
|
115
125
|
}, {
|
116
126
|
default: n(() => [
|
117
|
-
(
|
127
|
+
(i(!0), s(p, null, f(e.current.information, (t, r) => (i(), s("div", {
|
118
128
|
class: "gap-thin flex-nowrap flex",
|
119
|
-
key:
|
129
|
+
key: r
|
120
130
|
}, [
|
121
|
-
a(
|
131
|
+
a(u, {
|
122
132
|
field: t.name,
|
123
133
|
"onUpdate:field": (l) => t.name = l,
|
124
134
|
placeholder: "Название параметра",
|
125
135
|
class: "w-100 bg-white radius-small pd-medium"
|
126
136
|
}, null, 8, ["field", "onUpdate:field"]),
|
127
|
-
a(
|
137
|
+
a(u, {
|
128
138
|
field: t.value,
|
129
139
|
"onUpdate:field": (l) => t.value = l,
|
130
140
|
placeholder: "Значение параметра",
|
131
141
|
class: "w-100 bg-white radius-small pd-medium"
|
132
142
|
}, null, 8, ["field", "onUpdate:field"]),
|
133
|
-
m("div",
|
134
|
-
a(
|
135
|
-
onClick: () => e.current.information.splice(
|
143
|
+
m("div", M, [
|
144
|
+
a(w, {
|
145
|
+
onClick: () => e.current.information.splice(r, 1),
|
136
146
|
class: "i-medium"
|
137
147
|
}, null, 8, ["onClick"])
|
138
148
|
])
|
@@ -140,7 +150,7 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
140
150
|
]),
|
141
151
|
_: 1
|
142
152
|
}, 8, ["actions"]),
|
143
|
-
a(
|
153
|
+
a(d, {
|
144
154
|
title: "Localization",
|
145
155
|
placeholder: "No localizations added yet",
|
146
156
|
actions: [{
|
@@ -149,25 +159,25 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
149
159
|
}]
|
150
160
|
}, {
|
151
161
|
default: n(() => [
|
152
|
-
(
|
162
|
+
(i(!0), s(p, null, f(e.current.localization, (t, r) => (i(), s("div", {
|
153
163
|
class: "gap-thin mn-b-thin flex-nowrap flex",
|
154
|
-
key:
|
164
|
+
key: r
|
155
165
|
}, [
|
156
|
-
a(
|
166
|
+
a(u, {
|
157
167
|
field: t.name,
|
158
168
|
"onUpdate:field": (l) => t.name = l,
|
159
169
|
placeholder: "Название параметра",
|
160
170
|
class: "w-100 bg-white radius-small pd-medium"
|
161
171
|
}, null, 8, ["field", "onUpdate:field"]),
|
162
|
-
a(
|
172
|
+
a(u, {
|
163
173
|
field: t.value,
|
164
174
|
"onUpdate:field": (l) => t.value = l,
|
165
175
|
placeholder: "Значение параметра",
|
166
176
|
class: "w-100 bg-white radius-small pd-medium"
|
167
177
|
}, null, 8, ["field", "onUpdate:field"]),
|
168
|
-
m("div",
|
169
|
-
a(
|
170
|
-
onClick: () => e.current.localization.splice(
|
178
|
+
m("div", O, [
|
179
|
+
a(w, {
|
180
|
+
onClick: () => e.current.localization.splice(r, 1),
|
171
181
|
class: "i-medium"
|
172
182
|
}, null, 8, ["onClick"])
|
173
183
|
])
|
@@ -176,7 +186,7 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
176
186
|
_: 1
|
177
187
|
}, 8, ["actions"])
|
178
188
|
]),
|
179
|
-
a(
|
189
|
+
a(d, {
|
180
190
|
title: "Quantity Discount",
|
181
191
|
class: "mn-b-semi",
|
182
192
|
actions: [{
|
@@ -185,25 +195,25 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
185
195
|
}]
|
186
196
|
}, {
|
187
197
|
default: n(() => [
|
188
|
-
(
|
198
|
+
(i(!0), s(p, null, f(e.current.quantityDiscount, (t, r) => (i(), s("div", {
|
189
199
|
class: "gap-thin mn-b-thin flex-nowrap flex",
|
190
|
-
key:
|
200
|
+
key: r
|
191
201
|
}, [
|
192
|
-
a(
|
202
|
+
a(u, {
|
193
203
|
field: t.name,
|
194
204
|
"onUpdate:field": (l) => t.name = l,
|
195
205
|
placeholder: "Quantity",
|
196
206
|
class: "w-100 bg-white radius-small pd-medium"
|
197
207
|
}, null, 8, ["field", "onUpdate:field"]),
|
198
|
-
a(
|
208
|
+
a(u, {
|
199
209
|
field: t.value,
|
200
210
|
"onUpdate:field": (l) => t.value = l,
|
201
211
|
placeholder: "Discount",
|
202
212
|
class: "w-100 bg-white radius-small pd-medium"
|
203
213
|
}, null, 8, ["field", "onUpdate:field"]),
|
204
|
-
m("div",
|
205
|
-
a(
|
206
|
-
onClick: () => e.current.quantityDiscount.splice(
|
214
|
+
m("div", j, [
|
215
|
+
a(w, {
|
216
|
+
onClick: () => e.current.quantityDiscount.splice(r, 1),
|
207
217
|
class: "i-medium"
|
208
218
|
}, null, 8, ["onClick"])
|
209
219
|
])
|
@@ -211,41 +221,41 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
211
221
|
]),
|
212
222
|
_: 1
|
213
223
|
}, 8, ["actions"]),
|
214
|
-
a(
|
224
|
+
a(d, {
|
215
225
|
title: "Add Ingridient",
|
216
226
|
class: "mn-b-semi"
|
217
227
|
}, {
|
218
228
|
default: n(() => [
|
219
|
-
a(
|
220
|
-
onAdd:
|
229
|
+
a(C, {
|
230
|
+
onAdd: c[1] || (c[1] = (t) => h.add(
|
221
231
|
e.current.ingridients,
|
222
232
|
t
|
223
233
|
)),
|
224
|
-
products:
|
234
|
+
products: g.value
|
225
235
|
}, null, 8, ["products"]),
|
226
|
-
a(
|
236
|
+
a(d, {
|
227
237
|
placeholder: "No positions added yet",
|
228
238
|
class: "pd-zero mn-b-semi"
|
229
239
|
}, {
|
230
240
|
default: n(() => [
|
231
|
-
(
|
241
|
+
(i(!0), s(p, null, f(e.current.ingridients, (t, r) => (i(), v(C, {
|
232
242
|
key: t._id,
|
233
243
|
product: t,
|
234
244
|
array: e.current.ingridients,
|
235
|
-
products:
|
236
|
-
onAdd:
|
245
|
+
products: g.value,
|
246
|
+
onAdd: c[2] || (c[2] = (l) => h.add(
|
237
247
|
e.current.ingridients,
|
238
248
|
l
|
239
249
|
)),
|
240
|
-
onUpdate: (l) =>
|
250
|
+
onUpdate: (l) => h.update(
|
241
251
|
e.current.ingridients,
|
242
252
|
l,
|
243
|
-
|
253
|
+
r
|
244
254
|
),
|
245
|
-
onDelete: (l) =>
|
255
|
+
onDelete: (l) => h.delete(
|
246
256
|
e.current.ingridients,
|
247
257
|
l,
|
248
|
-
|
258
|
+
r
|
249
259
|
)
|
250
260
|
}, null, 8, ["product", "array", "products", "onUpdate", "onDelete"]))), 128))
|
251
261
|
]),
|
@@ -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"),s=require("vue-router"),n=require("../sections/FilterProducts.vue.cjs"),i=require("../../../../components/Feed/Feed.vue.cjs"),c=require("../blocks/CardProduct.vue.cjs"),u=require("../../store/products.cjs"),l={class:"cols-2-1_3 bg-grey radius-big gap-thin pd-thin"},d={__name:"Products",setup(p){const t=s.useRoute();return s.useRouter(),(a,_)=>(e.openBlock(),e.createElementBlock("div",l,[e.createVNode(n.default),e.createVNode(i.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:r=>u.actions.read(r),state:u.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery},class:"cols-3 gap-thin"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,o=>(e.openBlock(),e.createBlock(c.default,{key:o._id,product:o,class:"h-max",onClick:m=>a.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:o._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])]))}};exports.default=d;
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { openBlock as
|
1
|
+
import { openBlock as s, createElementBlock as i, createVNode as a, unref as t, withCtx as c, Fragment as u, renderList as m, createBlock as p } from "vue";
|
2
2
|
import { useRoute as d, useRouter as l } from "vue-router";
|
3
3
|
import _ from "../sections/FilterProducts.vue.js";
|
4
4
|
import f from "../../../../components/Feed/Feed.vue.js";
|
5
5
|
import g from "../blocks/CardProduct.vue.js";
|
6
|
-
import { actions as
|
6
|
+
import { actions as h, state as y } from "../../store/products.js";
|
7
7
|
const k = { class: "cols-2-1_3 bg-grey radius-big gap-thin pd-thin" }, F = {
|
8
8
|
__name: "Products",
|
9
9
|
setup(v) {
|
10
10
|
const e = d();
|
11
|
-
return l(), (n, $) => (
|
11
|
+
return l(), (n, $) => (s(), i("div", k, [
|
12
12
|
a(_),
|
13
13
|
a(f, {
|
14
14
|
states: {
|
@@ -18,8 +18,8 @@ const k = { class: "cols-2-1_3 bg-grey radius-big gap-thin pd-thin" }, F = {
|
|
18
18
|
}
|
19
19
|
},
|
20
20
|
store: {
|
21
|
-
read: (r) =>
|
22
|
-
state:
|
21
|
+
read: (r) => h.read(r),
|
22
|
+
state: y
|
23
23
|
},
|
24
24
|
options: {
|
25
25
|
limit: 15,
|
@@ -34,9 +34,10 @@ const k = { class: "cols-2-1_3 bg-grey radius-big gap-thin pd-thin" }, F = {
|
|
34
34
|
default: c(({
|
35
35
|
items: r
|
36
36
|
}) => [
|
37
|
-
(
|
37
|
+
(s(!0), i(u, null, m(r, (o) => (s(), p(g, {
|
38
38
|
key: o._id,
|
39
39
|
product: o,
|
40
|
+
class: "h-max",
|
40
41
|
onClick: (C) => n.$router.push({
|
41
42
|
name: "Product Organization",
|
42
43
|
params: {
|
package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs
CHANGED
@@ -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.
|
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;
|
package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js
CHANGED
@@ -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.
|
6
|
+
import w from "../../../../components/Tab/Tab.vue.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) {
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Field/Field.
|
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;
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js
CHANGED
@@ -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.
|
2
|
+
import u from "../../../../components/Field/Field.vue.js";
|
3
3
|
const M = {
|
4
4
|
key: 0,
|
5
5
|
class: "mn-b-small w-100"
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Button/Button.
|
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;
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js
CHANGED
@@ -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.
|
3
|
-
import i from "../../../../components/Field/Field.
|
2
|
+
import "../../../../components/Button/Button.vue2.js";
|
3
|
+
import i from "../../../../components/Field/Field.vue.js";
|
4
4
|
import r from "../../../../components/Select/Select.vue2.js";
|
5
5
|
const f = {
|
6
6
|
__name: "EditProductInfo",
|
package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.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"),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;
|