@ozdao/prometheus-framework 0.2.48 → 0.2.50
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +27 -25
- package/dist/auth.server.mjs +27 -25
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-3981e903.mjs +217 -0
- package/dist/index-4eecfdb9.js +216 -0
- package/dist/main-203b36b6.mjs +13628 -0
- package/dist/main-_b1_i8mt.mjs +13606 -0
- package/dist/main-a7ae4ce5.js +91 -0
- package/dist/main-uiQFxEks.js +91 -0
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/vue-select/dist/vue-select.es.cjs +1 -3
- package/dist/node_modules/vue-select/dist/vue-select.es.js +49 -645
- package/dist/organizations.server.js +13 -27
- package/dist/organizations.server.mjs +13 -27
- package/dist/products.server.js +95 -15
- package/dist/products.server.mjs +95 -15
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -225
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +225 -2
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +61 -2
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +2 -61
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +76 -2
- 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/SelectMulti/SelectMulti.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue.js +6 -6
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
- 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 +44 -32
- 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/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +45 -44
- package/dist/prometheus-framework/src/modules/auth/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/invites.js +5 -5
- 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/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- 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 +3 -3
- 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/globals/store/globals.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/store/globals.js +22 -21
- 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 +3 -3
- 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 +11 -2
- 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 +2 -11
- 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/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +17 -17
- 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 +49 -42
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +47 -15
- 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/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +38 -37
- 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 +249 -61
- 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 +78 -45
- 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 +161 -86
- 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/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +52 -54
- 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 +20 -26
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -46
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +34 -30
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +30 -28
- 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 +18 -18
- 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 +33 -28
- 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 +123 -113
- 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/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/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.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 +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 +3 -3
- 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/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/web-7p76PGnO.mjs +55 -0
- package/dist/web-c63f0ecc.js +1 -0
- package/dist/web-d8173758.mjs +55 -0
- package/dist/web-dn8vgptQ.js +1 -0
- package/package.json +1 -1
- package/src/components/SelectMulti/SelectMulti.vue +1 -1
- package/src/modules/auth/components/pages/Invite.vue +17 -6
- package/src/modules/auth/controllers/auth.controller.js +24 -16
- package/src/modules/auth/controllers/invites.controller.js +17 -8
- package/src/modules/auth/store/auth.js +8 -1
- package/src/modules/auth/store/invites.js +1 -0
- package/src/modules/globals/store/globals.js +5 -1
- package/src/modules/landing/components/blocks/MapBlock.vue +37 -0
- package/src/modules/landing/components/pages/404.vue +3 -0
- package/src/modules/landing/components/pages/Governance.vue +155 -0
- package/src/modules/landing/components/pages/Home.vue +52 -0
- package/src/modules/landing/components/pages/Hotel.vue +54 -0
- package/src/modules/landing/components/pages/Page.vue +184 -0
- package/src/modules/landing/components/sections/AboutSection.vue +69 -0
- package/src/modules/landing/components/sections/Examples.vue +90 -0
- package/src/modules/landing/components/sections/FeatureSection.vue +80 -0
- package/src/modules/landing/components/sections/GiftSection.vue +63 -0
- package/src/modules/landing/components/sections/HeroSection.vue +74 -0
- package/src/modules/landing/components/sections/HowItWorksSection.vue +88 -0
- package/src/modules/landing/components/sections/HowToBuyWDR.vue +131 -0
- package/src/modules/landing/components/sections/InstagramSection.vue +181 -0
- package/src/modules/landing/components/sections/MapSection.vue +91 -0
- package/src/modules/landing/components/sections/SectionsSection.vue +69 -0
- package/src/modules/landing/components/sections/SliderFeatures.vue +131 -0
- package/src/modules/landing/components/sections/WhatIsWDRSection.vue +116 -0
- package/src/modules/landing/router/landing.js +34 -0
- package/src/modules/middlewares/server/verifySignUp.js +4 -0
- package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +52 -44
- package/src/modules/organizations/components/blocks/User.vue +42 -10
- package/src/modules/organizations/components/pages/Department.vue +7 -6
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +110 -134
- package/src/modules/organizations/components/pages/Members.vue +85 -26
- package/src/modules/organizations/components/pages/Organization.vue +60 -4
- package/src/modules/organizations/components/sections/MembersAdd.vue +27 -34
- package/src/modules/organizations/components/sections/Organizations.vue +0 -1
- package/src/modules/organizations/controllers/memberships.controller.js +6 -2
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/models/department.model.js +0 -19
- package/src/modules/organizations/models/membership.model.js +4 -0
- package/src/modules/organizations/organizations.client.js +1 -6
- package/src/modules/organizations/store/departments.js +48 -44
- package/src/modules/organizations/store/memberships.js +11 -3
- package/src/modules/products/components/blocks/CardPosition.vue +2 -2
- package/src/modules/products/components/pages/Product.vue +6 -1
- package/src/modules/products/components/pages/ProductEdit.vue +48 -28
- package/src/modules/products/controllers/products.controller.js +87 -24
- package/src/modules/products/models/product.model.js +16 -1
- package/src/modules/products/store/products.js +1 -1
- package/src/modules/users/components/pages/ProfileOrganizations.vue +41 -7
- package/src/modules/organizations/components/sections/FeedDepartments.vue +0 -64
- package/src/modules/organizations/components/sections/MembersList.vue +0 -85
- package/src/modules/organizations/store/invites.js +0 -93
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"),u=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue.cjs");const g=require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const p=require("../blocks/CardPosition.vue.cjs"),f=require("vue-router"),l=require("../../../globals/store/globals.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const h={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},N={class:""},q={class:"gap-thin flex-v-center flex-nojustify flex"},B={class:"mn-r-auto"},V={__name:"EditLeftover",setup(E){const s=f.useRoute(),c=f.useRouter(),i=e.ref(m.state.all);e.ref(null);const v=e.computed(()=>t.state.current.positions.reduce((o,r)=>o+r.price*(r.quantity||1),0));e.onMounted(async()=>{if(s.params.leftover)try{await t.actions.fetch(s.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const o=await m.actions.read({organization:s.params._id,limit:100});i.value=o}catch{console.error("error")}});function k(){s.params.leftover?t.actions.fetch(s.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){s.params.leftover?t.actions.update(t.state.current).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error")):t.actions.create(t.state.current).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error"))}function b(){t.actions.delete(s.params.leftover).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error"))}return(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",h,[e.createElementVNode("h2",N,e.toDisplayString(e.unref(s).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(g.default,{select:t.state.current.type,"onUpdate:select":r[0]||(r[0]=n=>t.state.current.type=n),options:["stock-in","stock-out","write-off"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(u.default,{title:"Add Position",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(p.default,{onAdd:r[1]||(r[1]=n=>l.actions.add(t.state.current.positions,n)),products:i.value},null,8,["products"])]),_:1}),e.createVNode(u.default,{title:"Invetory Sheet",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,(n,d)=>(e.openBlock(),e.createBlock(p.default,{key:n._id,product:n,array:t.state.current.positions,products:i.value,onAdd:r[2]||(r[2]=a=>l.actions.add(t.state.current.positions,a)),onUpdate:a=>l.actions.update(t.state.current.positions,a,d),onDelete:a=>l.actions.delete(t.state.current.positions,a,d)},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1}),e.createVNode(u.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",q,[e.createElementVNode("h3",B," In total: "+e.toDisplayString(o.formatPrice(v.value)),1),e.createElementVNode("a",{onClick:r[3]||(r[3]=n=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:r[4]||(r[4]=n=>k())}," Reset "),e.unref(s).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:r[5]||(r[5]=n=>b()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})],64))}};exports.default=V;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as k, computed as S, onMounted as C, openBlock as c, createElementBlock as d, Fragment as b, createElementVNode as n, toDisplayString as h, unref as _, createVNode as i, withCtx as f, renderList as D, createBlock as L, createCommentVNode as R } from "vue";
|
2
2
|
import v from "../../../../components/Block/Block.vue.js";
|
3
|
-
import "../../../../components/Field/Field.
|
3
|
+
import "../../../../components/Field/Field.vue.js";
|
4
4
|
import A from "../../../../components/Select/Select.vue2.js";
|
5
5
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
6
6
|
import g from "../blocks/CardPosition.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../blocks/CardLeftover.vue.cjs"),i=require("../../store/leftovers.cjs");require("./Leftovers.vue2.cjs");const v={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Inventory",-1),g={class:"mn-b-semi pd-medium bg-grey radius-big"},_=e.createElementVNode("p",{class:"mn-b-thin"},"Spended:",-1),h={__name:"Leftovers",setup(k){const s=u.useRoute();u.useRouter();const l=e.ref(s.query.tab?s.query.tab:"all"),c=e.computed(()=>i.state.all.reduce((o,r)=>{const t=r.positions.reduce((n,a)=>n+a.price*(a.quantity||1),0);return o+t},0));return(o,r)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("header",p,[b,e.createElementVNode("button",{onClick:r[0]||(r[0]=t=>o.$router.push({name:"LeftoverAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createElementVNode("section",g,[_,e.createElementVNode("h3",null,e.toDisplayString(o.formatPrice(c.value)),1)]),e.createVNode(d.default,{selected:l.value,"onUpdate:selected":r[1]||(r[1]=t=>l.value=t),tabs:[{name:"All",value:"all"},{name:"Stock-In",value:"stock-in"},{name:"Stock-Out",value:"stock-out"},{name:"Write-Off",value:"write-off"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(m.default,{states:{empty:{title:"No Leftovers Found",description:"Currently, there are no leftovers available."}},store:{read:t=>i.actions.read(t)},options:{limit:15,organization:e.unref(s).params._id}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(f.default,{leftover:n,class:"bg-grey pd-small radius-big"},null,8,["leftover"]))),256))]),_:1},8,["states","store","options"])]))}};exports.default=h;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as d, computed as p, openBlock as a, createElementBlock as u, createElementVNode as r, toDisplayString as f, createVNode as m, unref as v, withCtx as b, Fragment as _, renderList as g, createBlock as h } from "vue";
|
2
2
|
import { useRoute as y, useRouter as k } from "vue-router";
|
3
|
-
import L from "../../../../components/Tab/Tab.
|
3
|
+
import L from "../../../../components/Tab/Tab.vue2.js";
|
4
4
|
import w from "../../../../components/Feed/Feed.vue.js";
|
5
5
|
import x from "../blocks/CardLeftover.vue.js";
|
6
6
|
import { state as C, actions as S } from "../../store/leftovers.js";
|
@@ -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"),p=require("vue-router"),q=require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const g=require("../sections/PopularProducts.vue.cjs"),y=require("../sections/SectionProduct.vue.cjs");require("../../store/categories.cjs");const h=require("../../../../../../node_modules/vue-meta/dist/vue-meta.esm-browser.min.cjs"),f=require("../../../auth/store/auth.cjs"),r=require("../../store/products.cjs");require("./Product.vue2.cjs");const k={class:"flex flex-column w-100 o-hidden gap-thin pd-thin"},B={key:0},S={__name:"Product",async setup(x){let o,n;const u=p.useRoute();p.useRouter(),[o,n]=e.withAsyncContext(()=>r.actions.fetchProduct(u.params.product)),await o,n(),u.meta.title.en=r.state.current.name,u.meta.title.ru=r.state.current.name;const t=e.computed(()=>r.state.current),m={messages:{en:{},ru:{}}},{t:_}=q.useI18n(m),v=e.computed(()=>({title:r.state.current.name,description:_("description")}));return h.useMeta(v),e.onMounted(()=>{}),(M,P)=>{var s,c,i,a,l,d;return e.openBlock(),e.createElementBlock("div",k,[e.createTextVNode(e.toDisplayString(t.value.quantity)+" ",1),t.value.ingredients?(e.openBlock(),e.createElementBlock("div",B,e.toDisplayString((c=(s=t.value)==null?void 0:s.ingredients[0])==null?void 0:c._id)+" "+e.toDisplayString((a=(i=t.value)==null?void 0:i.ingredients[0])==null?void 0:a.quantity)+" "+e.toDisplayString((d=(l=t.value)==null?void 0:l.ingredients[1])==null?void 0:d.quantity),1)):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createBlock(y.default,{key:1,product:t.value,user:f.state.user,class:"pos-relative"},null,8,["product","user"])):e.createCommentVNode("",!0),e.createVNode(g.default)])}}};exports.default=S;
|
@@ -1,42 +1,47 @@
|
|
1
|
-
import { withAsyncContext as
|
2
|
-
import { useRoute as
|
3
|
-
import { useI18n as
|
1
|
+
import { withAsyncContext as g, computed as l, onMounted as x, openBlock as n, createElementBlock as _, createTextVNode as k, toDisplayString as e, createCommentVNode as f, createBlock as B, createVNode as q } from "vue";
|
2
|
+
import { useRoute as w, useRouter as M } from "vue-router";
|
3
|
+
import { useI18n as N } 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 $ from "../sections/SectionProduct.vue.js";
|
8
8
|
import "../../store/categories.js";
|
9
|
-
import { useMeta as
|
10
|
-
import { state as
|
11
|
-
import { actions as
|
9
|
+
import { useMeta as C } from "../../../../../../node_modules/vue-meta/dist/vue-meta.esm-browser.min.js";
|
10
|
+
import { state as P } from "../../../auth/store/auth.js";
|
11
|
+
import { actions as R, state as r } from "../../store/products.js";
|
12
12
|
import "./Product.vue2.js";
|
13
|
-
const
|
13
|
+
const A = { class: "flex flex-column w-100 o-hidden gap-thin pd-thin" }, D = { key: 0 }, U = {
|
14
14
|
__name: "Product",
|
15
|
-
async setup(
|
16
|
-
let
|
17
|
-
const
|
18
|
-
|
19
|
-
const
|
15
|
+
async setup(E) {
|
16
|
+
let s, i;
|
17
|
+
const o = w();
|
18
|
+
M(), [s, i] = g(() => R.fetchProduct(o.params.product)), await s, i(), o.meta.title.en = r.current.name, o.meta.title.ru = r.current.name;
|
19
|
+
const t = l(() => r.current), v = {
|
20
20
|
messages: {
|
21
21
|
en: {},
|
22
22
|
ru: {}
|
23
23
|
}
|
24
|
-
}, { t:
|
25
|
-
title:
|
26
|
-
description:
|
24
|
+
}, { t: h } = N(v), y = l(() => ({
|
25
|
+
title: r.current.name,
|
26
|
+
description: h("description")
|
27
27
|
}));
|
28
|
-
return
|
29
|
-
}), (
|
30
|
-
c
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
28
|
+
return C(y), x(() => {
|
29
|
+
}), (I, S) => {
|
30
|
+
var a, c, u, m, p, d;
|
31
|
+
return n(), _("div", A, [
|
32
|
+
k(e(t.value.quantity) + " ", 1),
|
33
|
+
t.value.ingredients ? (n(), _("div", D, e((c = (a = t.value) == null ? void 0 : a.ingredients[0]) == null ? void 0 : c._id) + " " + e((m = (u = t.value) == null ? void 0 : u.ingredients[0]) == null ? void 0 : m.quantity) + " " + e((d = (p = t.value) == null ? void 0 : p.ingredients[1]) == null ? void 0 : d.quantity), 1)) : f("", !0),
|
34
|
+
t.value ? (n(), B($, {
|
35
|
+
key: 1,
|
36
|
+
product: t.value,
|
37
|
+
user: P.user,
|
38
|
+
class: "pos-relative"
|
39
|
+
}, null, 8, ["product", "user"])) : f("", !0),
|
40
|
+
q(V)
|
41
|
+
]);
|
42
|
+
};
|
38
43
|
}
|
39
44
|
};
|
40
45
|
export {
|
41
|
-
|
46
|
+
U as default
|
42
47
|
};
|
@@ -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"),h=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 s=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),k=require("../../../../components/Button/Button.vue2.cjs"),B=require("../../../../components/Popup/Popup.vue2.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),m=require("../../../icons/navigation/IconDelete.vue.cjs"),_=require("../blocks/CardPosition.vue.cjs"),q=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),b=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const y={class:"for-transition w-100 cols-1 pd-thin gap-thin"},E={class:"mn-r-auto"},P={class:"cols-2 gap-thin"},U={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},D={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},z={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},I={class:"cols-1 gap-thin"},F={__name:"ProductEdit",setup(L){const n=h.useRoute(),w=h.useRouter(),p=e.ref(t.state.all),f=e.ref(!1);function N(c){f.value=!0}function d(){f.value=!1}e.onMounted(async()=>{await b.actions.fetchCategories();try{const c=await t.actions.read({organization:n.params._id,limit:100});p.value=c}catch{console.error("error")}n.params.product&&await t.actions.read({_id:n.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[])});function v(){n.params.product?t.actions.update(n.params.product,t.state.current):t.actions.create(n.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function g(){w.push({name:"Organization",params:{_id:n.params._id}})}return(c,i)=>(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",E,e.toDisplayString(e.unref(n).params.product?t.state.current.name:"Create Product"),1),e.unref(n).params.product?(e.openBlock(),e.createBlock(k.default,{key:0,submit:x,callback:g,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(k.default,{submit:v,callback:g,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(C.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",P,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(q.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(b.state.all,(a,r)=>(e.openBlock(),e.createBlock(V.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(s.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(s.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",U,[e.createVNode(m.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(s.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(s.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",D,[e.createVNode(m.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(s.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(s.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",z,[e.createVNode(m.default,{onClick:()=>t.state.current.quantityDiscount.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add ingredient",onClosePopup:d,isPopupOpen:f.value,class:"bg-white pd-big radius-big"},{default:e.withCtx(()=>[e.createVNode(_.default,{onAdd:i[1]||(i[1]=a=>u.actions.add(t.state.current.ingredients,a)),products:p.value,class:"flex-column"},null,8,["products"])]),_:1},8,["isPopupOpen"]),e.createVNode(o.default,{title:"Ingredients",placeholder:"No positions added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,r)=>(e.openBlock(),e.createBlock(_.default,{key:a._id,product:a,array:t.state.current.ingredients,products:p.value,onAdd:i[2]||(i[2]=l=>{u.actions.add(t.state.current.ingredients,l),d()}),onUpdate:l=>{u.actions.update(t.state.current.ingredients,l,r),d()},onDelete:l=>{u.actions.delete(t.state.current.ingredients,l,r),d()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])]),_:1},8,["actions"])]))}};exports.default=F;
|
@@ -1,76 +1,82 @@
|
|
1
|
-
import { ref as
|
2
|
-
import { useRoute as
|
1
|
+
import { ref as U, onMounted as V, openBlock as r, createElementBlock as s, createVNode as a, withCtx as i, createElementVNode as c, toDisplayString as q, unref as C, createBlock as x, createTextVNode as P, createCommentVNode as A, Fragment as m, renderList as f } from "vue";
|
2
|
+
import { useRoute as B, useRouter as E } from "vue-router";
|
3
3
|
import "vue-i18n";
|
4
4
|
import "../../../globals/localization/vue-i18n.js";
|
5
5
|
import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
6
6
|
import d from "../../../../components/Block/Block.vue.js";
|
7
|
-
import "../../../../components/Tab/Tab.
|
8
|
-
import
|
7
|
+
import "../../../../components/Tab/Tab.vue.js";
|
8
|
+
import p from "../../../../components/Field/Field.vue2.js";
|
9
9
|
import "../../../../components/Select/Select.vue.js";
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import "../../../../components/Popup/Popup.
|
13
|
-
import
|
14
|
-
import
|
15
|
-
import
|
16
|
-
import
|
17
|
-
import { actions as
|
18
|
-
import { state as e, actions as
|
19
|
-
import { actions as
|
10
|
+
import R from "../../../../components/Checkbox/Checkbox.vue.js";
|
11
|
+
import D from "../../../../components/Button/Button.vue2.js";
|
12
|
+
import S from "../../../../components/Popup/Popup.vue2.js";
|
13
|
+
import T from "../../../../components/EditImages/EditImages.vue.js";
|
14
|
+
import y from "../../../icons/navigation/IconDelete.vue.js";
|
15
|
+
import $ from "../blocks/CardPosition.vue.js";
|
16
|
+
import F from "../sections/EditProductInfo.vue.js";
|
17
|
+
import { actions as b } from "../../../globals/store/globals.js";
|
18
|
+
import { state as e, actions as g } from "../../store/products.js";
|
19
|
+
import { actions as L, state as Q } from "../../store/categories.js";
|
20
20
|
import "./ProductEdit.vue2.js";
|
21
|
-
const
|
21
|
+
const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class: "mn-r-auto" }, G = { class: "cols-2 gap-thin" }, H = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, J = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, K = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, W = { class: "cols-1 gap-thin" }, be = {
|
22
22
|
__name: "ProductEdit",
|
23
|
-
setup(
|
24
|
-
const o =
|
25
|
-
|
26
|
-
|
23
|
+
setup(X) {
|
24
|
+
const o = B(), z = E(), v = U(e.all), w = U(!1);
|
25
|
+
function N(h) {
|
26
|
+
w.value = !0;
|
27
|
+
}
|
28
|
+
function _() {
|
29
|
+
w.value = !1;
|
30
|
+
}
|
31
|
+
V(async () => {
|
32
|
+
await L.fetchCategories();
|
27
33
|
try {
|
28
|
-
const
|
34
|
+
const h = await g.read({
|
29
35
|
organization: o.params._id,
|
30
36
|
limit: 100
|
31
37
|
});
|
32
|
-
|
38
|
+
v.value = h;
|
33
39
|
} catch {
|
34
40
|
console.error("error");
|
35
41
|
}
|
36
|
-
o.params.product && await
|
42
|
+
o.params.product && await g.read({ _id: o.params.product }), e.current.ingredients || (e.current.ingredients = []);
|
37
43
|
});
|
38
|
-
function
|
39
|
-
o.params.product ?
|
44
|
+
function I() {
|
45
|
+
o.params.product ? g.update(o.params.product, e.current) : g.create(o.params._id, e.current);
|
40
46
|
}
|
41
|
-
function
|
42
|
-
|
47
|
+
function O() {
|
48
|
+
g.deleteProduct(e.current._id);
|
43
49
|
}
|
44
|
-
function
|
45
|
-
|
50
|
+
function k() {
|
51
|
+
z.push({
|
46
52
|
name: "Organization",
|
47
53
|
params: {
|
48
54
|
_id: o.params._id
|
49
55
|
}
|
50
56
|
});
|
51
57
|
}
|
52
|
-
return (
|
58
|
+
return (h, u) => (r(), s("div", M, [
|
53
59
|
a(d, { class: "flex-nowrap flex-v-center flex" }, {
|
54
|
-
default:
|
55
|
-
|
56
|
-
|
60
|
+
default: i(() => [
|
61
|
+
c("h1", j, q(C(o).params.product ? e.current.name : "Create Product"), 1),
|
62
|
+
C(o).params.product ? (r(), x(D, {
|
57
63
|
key: 0,
|
58
|
-
submit:
|
59
|
-
callback:
|
64
|
+
submit: O,
|
65
|
+
callback: k,
|
60
66
|
class: "bg-red mn-r-thin"
|
61
67
|
}, {
|
62
|
-
default:
|
63
|
-
|
68
|
+
default: i(() => [
|
69
|
+
P(" Delete ")
|
64
70
|
]),
|
65
71
|
_: 1
|
66
|
-
})) :
|
67
|
-
a(
|
68
|
-
submit:
|
69
|
-
callback:
|
72
|
+
})) : A("", !0),
|
73
|
+
a(D, {
|
74
|
+
submit: I,
|
75
|
+
callback: k,
|
70
76
|
class: "bg-main"
|
71
77
|
}, {
|
72
|
-
default:
|
73
|
-
|
78
|
+
default: i(() => [
|
79
|
+
P(" Save ")
|
74
80
|
]),
|
75
81
|
_: 1
|
76
82
|
})
|
@@ -81,29 +87,29 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
81
87
|
placeholder: "The product doesn't have any images yet.",
|
82
88
|
class: "h-min"
|
83
89
|
}, {
|
84
|
-
default:
|
85
|
-
a(
|
90
|
+
default: i(() => [
|
91
|
+
a(T, {
|
86
92
|
images: e.current.images,
|
87
93
|
uploadPath: "photos",
|
88
|
-
"onUpdate:images":
|
94
|
+
"onUpdate:images": u[0] || (u[0] = (t) => {
|
89
95
|
e.current.images = t;
|
90
96
|
})
|
91
97
|
}, null, 8, ["images"])
|
92
98
|
]),
|
93
99
|
_: 1
|
94
100
|
}),
|
95
|
-
|
101
|
+
c("div", G, [
|
96
102
|
a(d, { title: "Profile" }, {
|
97
|
-
default:
|
98
|
-
a(
|
103
|
+
default: i(() => [
|
104
|
+
a(F, {
|
99
105
|
product: e.current
|
100
106
|
}, null, 8, ["product"])
|
101
107
|
]),
|
102
108
|
_: 1
|
103
109
|
}),
|
104
110
|
a(d, { title: "Categories" }, {
|
105
|
-
default:
|
106
|
-
(
|
111
|
+
default: i(() => [
|
112
|
+
(r(!0), s(m, null, f(Q.all, (t, n) => (r(), x(R, {
|
107
113
|
label: t.name,
|
108
114
|
name: "categories",
|
109
115
|
value: t.url,
|
@@ -123,26 +129,26 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
123
129
|
}],
|
124
130
|
class: "cols-1 gap-thin"
|
125
131
|
}, {
|
126
|
-
default:
|
127
|
-
(
|
132
|
+
default: i(() => [
|
133
|
+
(r(!0), s(m, null, f(e.current.information, (t, n) => (r(), s("div", {
|
128
134
|
class: "gap-thin flex-nowrap flex",
|
129
|
-
key:
|
135
|
+
key: n
|
130
136
|
}, [
|
131
|
-
a(
|
137
|
+
a(p, {
|
132
138
|
field: t.name,
|
133
139
|
"onUpdate:field": (l) => t.name = l,
|
134
140
|
placeholder: "Название параметра",
|
135
141
|
class: "w-100 bg-white radius-small pd-medium"
|
136
142
|
}, null, 8, ["field", "onUpdate:field"]),
|
137
|
-
a(
|
143
|
+
a(p, {
|
138
144
|
field: t.value,
|
139
145
|
"onUpdate:field": (l) => t.value = l,
|
140
146
|
placeholder: "Значение параметра",
|
141
147
|
class: "w-100 bg-white radius-small pd-medium"
|
142
148
|
}, null, 8, ["field", "onUpdate:field"]),
|
143
|
-
|
144
|
-
a(
|
145
|
-
onClick: () => e.current.information.splice(
|
149
|
+
c("div", H, [
|
150
|
+
a(y, {
|
151
|
+
onClick: () => e.current.information.splice(n, 1),
|
146
152
|
class: "i-medium"
|
147
153
|
}, null, 8, ["onClick"])
|
148
154
|
])
|
@@ -158,26 +164,26 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
158
164
|
function: () => e.current.localization.push({ name: "", value: "" })
|
159
165
|
}]
|
160
166
|
}, {
|
161
|
-
default:
|
162
|
-
(
|
167
|
+
default: i(() => [
|
168
|
+
(r(!0), s(m, null, f(e.current.localization, (t, n) => (r(), s("div", {
|
163
169
|
class: "gap-thin mn-b-thin flex-nowrap flex",
|
164
|
-
key:
|
170
|
+
key: n
|
165
171
|
}, [
|
166
|
-
a(
|
172
|
+
a(p, {
|
167
173
|
field: t.name,
|
168
174
|
"onUpdate:field": (l) => t.name = l,
|
169
175
|
placeholder: "Название параметра",
|
170
176
|
class: "w-100 bg-white radius-small pd-medium"
|
171
177
|
}, null, 8, ["field", "onUpdate:field"]),
|
172
|
-
a(
|
178
|
+
a(p, {
|
173
179
|
field: t.value,
|
174
180
|
"onUpdate:field": (l) => t.value = l,
|
175
181
|
placeholder: "Значение параметра",
|
176
182
|
class: "w-100 bg-white radius-small pd-medium"
|
177
183
|
}, null, 8, ["field", "onUpdate:field"]),
|
178
|
-
|
179
|
-
a(
|
180
|
-
onClick: () => e.current.localization.splice(
|
184
|
+
c("div", J, [
|
185
|
+
a(y, {
|
186
|
+
onClick: () => e.current.localization.splice(n, 1),
|
181
187
|
class: "i-medium"
|
182
188
|
}, null, 8, ["onClick"])
|
183
189
|
])
|
@@ -194,26 +200,26 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
194
200
|
function: () => e.current.quantityDiscount.push({ name: "", value: "" })
|
195
201
|
}]
|
196
202
|
}, {
|
197
|
-
default:
|
198
|
-
(
|
203
|
+
default: i(() => [
|
204
|
+
(r(!0), s(m, null, f(e.current.quantityDiscount, (t, n) => (r(), s("div", {
|
199
205
|
class: "gap-thin mn-b-thin flex-nowrap flex",
|
200
|
-
key:
|
206
|
+
key: n
|
201
207
|
}, [
|
202
|
-
a(
|
208
|
+
a(p, {
|
203
209
|
field: t.name,
|
204
210
|
"onUpdate:field": (l) => t.name = l,
|
205
211
|
placeholder: "Quantity",
|
206
212
|
class: "w-100 bg-white radius-small pd-medium"
|
207
213
|
}, null, 8, ["field", "onUpdate:field"]),
|
208
|
-
a(
|
214
|
+
a(p, {
|
209
215
|
field: t.value,
|
210
216
|
"onUpdate:field": (l) => t.value = l,
|
211
217
|
placeholder: "Discount",
|
212
218
|
class: "w-100 bg-white radius-small pd-medium"
|
213
219
|
}, null, 8, ["field", "onUpdate:field"]),
|
214
|
-
|
215
|
-
a(
|
216
|
-
onClick: () => e.current.quantityDiscount.splice(
|
220
|
+
c("div", K, [
|
221
|
+
a(y, {
|
222
|
+
onClick: () => e.current.quantityDiscount.splice(n, 1),
|
217
223
|
class: "i-medium"
|
218
224
|
}, null, 8, ["onClick"])
|
219
225
|
])
|
@@ -221,52 +227,56 @@ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class
|
|
221
227
|
]),
|
222
228
|
_: 1
|
223
229
|
}, 8, ["actions"]),
|
224
|
-
a(
|
225
|
-
title: "Add
|
226
|
-
|
230
|
+
a(S, {
|
231
|
+
title: "Add ingredient",
|
232
|
+
onClosePopup: _,
|
233
|
+
isPopupOpen: w.value,
|
234
|
+
class: "bg-white pd-big radius-big"
|
227
235
|
}, {
|
228
|
-
default:
|
229
|
-
a(
|
230
|
-
onAdd:
|
231
|
-
e.current.
|
236
|
+
default: i(() => [
|
237
|
+
a($, {
|
238
|
+
onAdd: u[1] || (u[1] = (t) => b.add(
|
239
|
+
e.current.ingredients,
|
232
240
|
t
|
233
241
|
)),
|
234
|
-
products:
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
)
|
260
|
-
},
|
261
|
-
|
262
|
-
|
263
|
-
|
242
|
+
products: v.value,
|
243
|
+
class: "flex-column"
|
244
|
+
}, null, 8, ["products"])
|
245
|
+
]),
|
246
|
+
_: 1
|
247
|
+
}, 8, ["isPopupOpen"]),
|
248
|
+
a(d, {
|
249
|
+
title: "Ingredients",
|
250
|
+
placeholder: "No positions added yet",
|
251
|
+
actions: [{
|
252
|
+
label: "+",
|
253
|
+
function: () => N()
|
254
|
+
}]
|
255
|
+
}, {
|
256
|
+
default: i(() => [
|
257
|
+
c("div", W, [
|
258
|
+
(r(!0), s(m, null, f(e.current.ingredients, (t, n) => (r(), x($, {
|
259
|
+
key: t._id,
|
260
|
+
product: t,
|
261
|
+
array: e.current.ingredients,
|
262
|
+
products: v.value,
|
263
|
+
onAdd: u[2] || (u[2] = (l) => {
|
264
|
+
b.add(e.current.ingredients, l), _();
|
265
|
+
}),
|
266
|
+
onUpdate: (l) => {
|
267
|
+
b.update(e.current.ingredients, l, n), _();
|
268
|
+
},
|
269
|
+
onDelete: (l) => {
|
270
|
+
b.delete(e.current.ingredients, l, n), _();
|
271
|
+
}
|
272
|
+
}, null, 8, ["product", "array", "products", "onUpdate", "onDelete"]))), 128))
|
273
|
+
])
|
264
274
|
]),
|
265
275
|
_: 1
|
266
|
-
})
|
276
|
+
}, 8, ["actions"])
|
267
277
|
]));
|
268
278
|
}
|
269
279
|
};
|
270
280
|
export {
|
271
|
-
|
281
|
+
be as default
|
272
282
|
};
|
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.vue2.cjs"),p={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),v={__name:"ProductsBackoffice",setup(h){const r=l.useRoute(),c=l.useRouter(),o=e.ref(r.query.tab?r.query.tab:"posts");return r.query.tab=o.value,e.watch(o,u=>{c.replace({query:{...r.query,tab:u}})}),e.onMounted(async()=>{await n.actions.fetchProducts()}),(u,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",p,[b,e.createElementVNode("button",{onClick:a[0]||(a[0]=t=>u.$router.push({name:"AddProduct"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(m.default,{selected:o.value,"onUpdate:selected":a[1]||(a[1]=t=>o.value=t),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(d.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:t=>n.actions.read(t),state:n.state},options:{limit:15,organization:e.unref(r).params._id,status:o.value}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,s=>(e.openBlock(),e.createBlock(i.default,{key:s._id,product:s,onClick:f=>u.$router.push({name:"ProductEdit",params:{product:s._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])],64))}};exports.default=v;
|
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.vue2.js";
|
7
7
|
const C = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, x = /* @__PURE__ */ u("h2", { class: "mn-r-medium" }, "Products", -1), z = {
|
8
8
|
__name: "ProductsBackoffice",
|
9
9
|
setup(B) {
|
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.vue2.cjs"),L={key:0,class:"mn-b-small w-100"},k={class:"w-100 flex-nowrap flex"},w=["onClick"],E=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),g=[E],N=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),V=["onClick"],B=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),x=[B],C=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),U=["onClick"],y={__name:"EditModifications",props:{product:Object},emits:["add-modification","delete-modification","add-characteristic","delete-characteristic","submit"],setup(u,{emit:m}){const o=m,f=u,{product:r}=e.toRefs(f);function p(){o("add-modification")}function h(l){o("delete-modification",l)}function b(l){o("add-characteristic",l)}function _(l,d){o("delete-characteristic",{modIndex:l,charIndex:d})}function v(){o("submit")}return(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.unref(r).modifications.length==0?(e.openBlock(),e.createElementBlock("p",L,"У продукта еще не заданы модификации.")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).modifications,(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small flex-column flex-wrap block",key:i},[e.createElementVNode("div",k,[e.createVNode(c.default,{field:n.quantity,"onUpdate:field":t=>n.quantity=t,disabled:!0,placeholder:"Количество",class:"mn-b-medium input-text input",type:"number"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:n.name,"onUpdate:field":t=>n.name=t,placeholder:"Новая модификация",class:"mn-b-medium input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:t=>h(i),class:"mn-l-small i-normal pd-regular button-delete button"},g,8,w)]),N,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.characteristics,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-medium w-100 flex-nowrap flex variants-wrapper",key:s},[e.createVNode(c.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Название параметра",class:"input-text input"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:t.value,"onUpdate:field":a=>t.value=a,placeholder:"Значение параметра",class:"mn-l-small input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:a=>_(i,s),class:"mn-l-small i-normal pd-regular button-delete button"},x,8,V)]))),128)),C,e.createElementVNode("button",{onClick:t=>b(i),class:"button"},"Добавить характеристику",8,U)]))),128)),e.createElementVNode("div",{class:"mn-b-big t-center flex-center flex block"},[e.createElementVNode("button",{onClick:p,class:"w-100"},"Добавить модификацю")]),e.createElementVNode("button",{onClick:d[0]||(d[0]=n=>v()),class:"button"},"Сохранить модификации")]))}};exports.default=y;
|