@ozdao/prometheus-framework 0.2.64 → 0.2.65
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main-BoybHtmb.mjs +13753 -0
- package/dist/main-CJ7URLjm.js +91 -0
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +3 -3
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +1 -55
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +55 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +46 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -46
- 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 +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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/icons.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/icons.client.js +59 -58
- 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/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/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/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/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +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 +78 -74
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +117 -76
- 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/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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-B9Vtg5cN.mjs +54 -0
- package/dist/web-ZM1AOTc1.js +1 -0
- package/package.json +1 -1
- package/src/components/Block/Block.vue +1 -1
- package/src/modules/icons/icons.client.js +1 -0
- package/src/modules/products/components/blocks/CardPosition.vue +57 -51
- package/src/modules/products/components/pages/EditLeftover.vue +64 -16
- package/src/modules/products/components/pages/Products.vue +1 -1
package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../../../../components/Field/Field.vue.cjs"),b=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../../../../components/Field/Field.vue.cjs"),b=require("../../../../components/Select/Select.vue2.cjs"),v=require("../../../../components/Button/Button.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");const s=require("../../store/invites.cjs"),f={class:"mn-b-medium radius-medium pd-semi bg-grey"},h=e.createElementVNode("h3",{class:"mn-b-medium"},"Add members",-1),g=e.createElementVNode("p",{class:"mn-b-small t-transp p-medium"},"Укажите email или телефон, чтобы отправить ссылку с приглашением:",-1),k={key:0,class:"mn-r-medium flex-v-center flex"},E=["onClick"],V=e.createElementVNode("p",{class:"t-blue mn-r-small"},"+ Добавить приглашение",-1),N=[V],w=e.createElementVNode("span",null,"Invite to organization",-1),B={__name:"MembersAdd",props:{organization:Object},emits:["send-invite"],setup(c,{emit:q}){const i=c,r=e.ref(null),t=e.ref([{contact:"",role:""}]);function d(){t.value.push({contact:"",role:""})}function m(l){t.value.splice(l,1)}async function u(l){await s.actions.create(i.organization._id,t.value)}function p(){}return(l,x)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("section",f,[h,g,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"br-1px br-solid br-grey flex gap-thin radius-small mn-b-thin"},[e.createVNode(_.default,{field:n.contact,"onUpdate:field":o=>n.contact=o,placeholder:"Enter email or phone",class:"pd-small radius-small w-100 bg-white",validation:r.value},null,8,["field","onUpdate:field","validation"]),e.createVNode(b.default,{select:n.role,"onUpdate:select":o=>n.role=o,label:"Role",options:["owner","manager","member"],placeholder:"Select",class:"pos-relative w-100 bg-white radius-small pd-small"},null,8,["select","onUpdate:select"]),a>0?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("button",{onClick:o=>m(a),class:"button-small button"},"×",8,E)])):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("div",{onClick:d,class:"mn-b-small flex-v-center flex-nowrap flex"},N),e.createVNode(v.default,{submit:l.a=()=>u(s.state.invites),callback:p,class:"w-100 bg-main"},{default:e.withCtx(()=>[w]),_:1},8,["submit"])])]))}};exports.default=B;
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as r, openBlock as a, createElementBlock as s, createElementVNode as e, Fragment as v, renderList as h, createVNode as c, createCommentVNode as g, withCtx as w } from "vue";
|
2
2
|
import k from "../../../../components/Field/Field.vue.js";
|
3
|
-
import x from "../../../../components/Select/Select.
|
3
|
+
import x from "../../../../components/Select/Select.vue2.js";
|
4
4
|
import y from "../../../../components/Button/Button.vue.js";
|
5
5
|
import "../../../middlewares/client/inputs.validation.js";
|
6
6
|
import { state as C, actions as U } from "../../store/invites.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Chips/Chips.vue2.cjs");const q=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),b=require("../blocks/EmptyState.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let p=n.query.tab?n.query.tab:"details";const i=e.ref(p);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(b.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(m.default,{key:l._id,organization:l,user:q.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { ref as m, withAsyncContext as b, watch as _, openBlock as t, createElementBlock as i, createElementVNode as f, createBlock as p, Fragment as g, renderList as h, normalizeClass as w } from "vue";
|
2
2
|
import { useRouter as v, useRoute as z } from "vue-router";
|
3
3
|
import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
4
|
-
import "../../../../components/Tab/Tab.
|
4
|
+
import "../../../../components/Tab/Tab.vue2.js";
|
5
5
|
import "../../../../components/Field/Field.vue2.js";
|
6
|
-
import "../../../../components/Select/Select.
|
6
|
+
import "../../../../components/Select/Select.vue.js";
|
7
7
|
import "../../../../components/Button/Button.vue2.js";
|
8
|
-
import "../../../../components/Dropdown/Dropdown.
|
8
|
+
import "../../../../components/Dropdown/Dropdown.vue.js";
|
9
9
|
import "../../../../components/Chips/Chips.vue2.js";
|
10
10
|
import { state as k } from "../../../auth/store/auth.js";
|
11
11
|
import "../../store/memberships.js";
|
package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.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"),n=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Select/Select.vue2.cjs"),y=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../icons/navigation/IconAdd.vue.cjs"),V=require("../../../icons/navigation/IconDelete.vue.cjs"),k={class:"gap-thin"},h={class:"gap-thin mn-b-thin flex-nowrap flex"},q=["disabled"],w={class:"gap-thin flex-nowrap flex"},x={__name:"CardPosition",props:{product:Object,array:Array,products:Array},emits:["add","delete","update"],setup(s,{emit:i}){const t=s,c=i,l=e.ref(null),a=e.ref(1),r=e.ref("pcs"),u=e.ref(0),p=e.computed(()=>l.value&&a.value>0&&u.value>0);e.watch(t.array,()=>{l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,r.value=t.product.type}),t.product&&(l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,r.value=t.product.type),e.watch([l,a,u,r],()=>{c("update",{...l.value,price:u.value,quantity:a.value||1,type:r.value})});function m(){c("add",{...l.value,price:u.value,quantity:a.value||1,type:r.value})}function v(){c("delete",{...l.value,price:u.value,quantity:a.value||1,type:r.value})}return(b,d)=>(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",h,[e.createVNode(y.default,{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=o=>l.value=o),options:s.products,label:"name",multiple:!1,taggable:!1,placeholder:"Select a product",class:"bg-white br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["modelValue","options"]),s.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!p.value,onClick:m,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(g.default),{class:"i-semi"})],8,q)),s.product?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(V.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]),e.createElementVNode("div",w,[e.createVNode(n.default,{field:u.value,"onUpdate:field":d[1]||(d[1]=o=>u.value=o),type:"number",label:"Price",symbol:b.returnCurrency(),class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(n.default,{field:a.value,"onUpdate:field":d[3]||(d[3]=o=>a.value=o),type:"number",label:"Qty",class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(f.default,{select:r.value,"onUpdate:select":d[2]||(d[2]=o=>r.value=o),options:["pcs","g","ml"],class:"bg-grey pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])])]))}};exports.default=x;
|
package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import { ref as i, computed as
|
1
|
+
import { ref as i, computed as V, watch as m, openBlock as n, createElementBlock as c, createElementVNode as v, createVNode as s, unref as b, createCommentVNode as f, withCtx as C } from "vue";
|
2
2
|
import y from "../../../../components/Field/Field.vue.js";
|
3
|
-
import
|
3
|
+
import P from "../../../../components/Select/Select.vue2.js";
|
4
4
|
import q from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
const
|
5
|
+
import S from "../../../icons/navigation/IconAdd.vue.js";
|
6
|
+
import U from "../../../icons/navigation/IconDelete.vue.js";
|
7
|
+
const _ = { class: "gap-thin" }, N = { class: "gap-thin mn-b-thin flex-nowrap flex" }, Q = ["disabled"], A = { class: "gap-thin flex-nowrap flex" }, O = {
|
8
8
|
__name: "CardPosition",
|
9
9
|
props: {
|
10
10
|
product: Object,
|
@@ -16,94 +16,98 @@ const U = { class: "gap-thin flex-nowrap flex" }, Q = ["disabled"], F = {
|
|
16
16
|
"delete",
|
17
17
|
"update"
|
18
18
|
],
|
19
|
-
setup(
|
20
|
-
const e =
|
21
|
-
() =>
|
19
|
+
setup(d, { emit: g }) {
|
20
|
+
const e = d, p = g, t = i(null), l = i(1), u = i("pcs"), a = i(0), x = V(
|
21
|
+
() => t.value && l.value > 0 && a.value > 0
|
22
22
|
);
|
23
23
|
m(e.array, () => {
|
24
|
-
|
25
|
-
}), e.product && (
|
24
|
+
t.value = e.product, l.value = e.product.quantity || 1, a.value = e.product.price, u.value = e.product.type;
|
25
|
+
}), e.product && (t.value = e.product, l.value = e.product.quantity || 1, a.value = e.product.price, u.value = e.product.type), m([t, l, a, u], () => {
|
26
26
|
p("update", {
|
27
|
-
...
|
27
|
+
...t.value,
|
28
28
|
price: a.value,
|
29
|
-
quantity:
|
29
|
+
quantity: l.value || 1,
|
30
30
|
type: u.value
|
31
31
|
});
|
32
32
|
});
|
33
|
-
function
|
33
|
+
function h() {
|
34
34
|
p("add", {
|
35
|
-
...
|
35
|
+
...t.value,
|
36
36
|
price: a.value,
|
37
|
-
quantity:
|
37
|
+
quantity: l.value || 1,
|
38
38
|
type: u.value
|
39
39
|
});
|
40
40
|
}
|
41
|
-
function
|
41
|
+
function k() {
|
42
42
|
p("delete", {
|
43
|
-
...
|
43
|
+
...t.value,
|
44
44
|
price: a.value,
|
45
|
-
quantity:
|
45
|
+
quantity: l.value || 1,
|
46
46
|
type: u.value
|
47
47
|
});
|
48
48
|
}
|
49
|
-
return (
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
49
|
+
return (w, r) => (n(), c("div", _, [
|
50
|
+
v("div", N, [
|
51
|
+
s(q, {
|
52
|
+
modelValue: t.value,
|
53
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => t.value = o),
|
54
|
+
options: d.products,
|
55
|
+
label: "name",
|
56
|
+
multiple: !1,
|
57
|
+
taggable: !1,
|
58
|
+
placeholder: "Select a product",
|
59
|
+
class: "bg-white br-solid br-1px br-black-transp-5 pd-small radius-small"
|
60
|
+
}, null, 8, ["modelValue", "options"]),
|
61
|
+
d.product ? f("", !0) : (n(), c("button", {
|
62
|
+
key: 0,
|
63
|
+
disabled: !x.value,
|
64
|
+
onClick: h,
|
65
|
+
class: "bg-main aspect-1x1 radius-small pd-small"
|
66
|
+
}, [
|
67
|
+
s(b(S), { class: "i-semi" })
|
68
|
+
], 8, Q)),
|
69
|
+
d.product ? (n(), c("button", {
|
70
|
+
key: 1,
|
71
|
+
onClick: k,
|
72
|
+
class: "bg-red aspect-1x1 radius-small pd-small"
|
73
|
+
}, [
|
74
|
+
s(b(U), { class: "i-semi" })
|
75
|
+
])) : f("", !0)
|
76
|
+
]),
|
77
|
+
v("div", A, [
|
78
|
+
s(y, {
|
79
|
+
field: a.value,
|
80
|
+
"onUpdate:field": r[1] || (r[1] = (o) => a.value = o),
|
81
|
+
type: "number",
|
82
|
+
label: "Price",
|
83
|
+
symbol: w.returnCurrency(),
|
84
|
+
class: "bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"
|
85
|
+
}, null, 8, ["field", "symbol"]),
|
86
|
+
s(y, {
|
87
|
+
field: l.value,
|
88
|
+
"onUpdate:field": r[3] || (r[3] = (o) => l.value = o),
|
89
|
+
type: "number",
|
90
|
+
label: "Qty",
|
91
|
+
class: "bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"
|
92
|
+
}, {
|
93
|
+
default: C(() => [
|
94
|
+
s(P, {
|
95
|
+
select: u.value,
|
96
|
+
"onUpdate:select": r[2] || (r[2] = (o) => u.value = o),
|
97
|
+
options: [
|
98
|
+
"pcs",
|
99
|
+
"g",
|
100
|
+
"ml"
|
101
|
+
],
|
102
|
+
class: "bg-grey pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"
|
103
|
+
}, null, 8, ["select"])
|
104
|
+
]),
|
105
|
+
_: 1
|
106
|
+
}, 8, ["field"])
|
107
|
+
])
|
104
108
|
]));
|
105
109
|
}
|
106
110
|
};
|
107
111
|
export {
|
108
|
-
|
112
|
+
O as default
|
109
113
|
};
|
package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Select/Select.vue2.cjs"),d=require("../../../../components/Field/Field.vue.cjs"),n=require("../../../../components/Block/Block.vue.cjs"),l=require("../../store/categories.cjs");require("./CategoryEdit.vue2.cjs");const b={class:"mn-r-auto"},h={class:"mn-b-medium w-100 flex-nowrap gap-thin flex"},w={class:"flex-v-center flex-nowrap flex"},x=e.createElementVNode("h4",{class:"mn-r-thin t-medium"},"Localization",-1),N=["onClick"],k=["onClick"],V=["onClick"],y={__name:"CategoryEdit",setup(C){const o=c.useRoute(),u=c.useRouter();o.params.category?l.actions.fetchCategory(o.params.category):l.actions.resetCategory(),e.computed(()=>l.state.current),e.computed(()=>o.name);function m(){o.params.category?l.actions.updateCategory(o.params.category):l.actions.addCategory()}function p(){u.push({name:"Categories Organization",params:{_id:o.params._id}})}return(_,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(n.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",b,e.toDisplayString(e.unref(o).params.category?"Edit Category":"Add Category"),1),e.createVNode(f.default,{submit:m,callback:p,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Save Category ")]),_:1})]),_:1}),e.createVNode(n.default,{title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",h,[e.createVNode(d.default,{field:l.state.current.order,"onUpdate:field":r[0]||(r[0]=t=>l.state.current.order=t),label:"Order",disabled:!0,class:"w-25 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.url,"onUpdate:field":r[1]||(r[1]=t=>l.state.current.url=t),label:"URL",placeholder:"Enter category URL",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.name,"onUpdate:field":r[2]||(r[2]=t=>l.state.current.name=t),label:"Name",placeholder:"Enter category name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),e.createVNode(g.default,{select:l.state.current.status,"onUpdate:select":r[3]||(r[3]=t=>l.state.current.status=t),label:"Status",options:["draft","internal","published","removed"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),e.createElementVNode("div",w,[x,e.createElementVNode("button",{onClick:r[4]||(r[4]=()=>l.state.current.localization.push({locale:"",text:""})),class:"i-small pd-thin button-delete button"}," + ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.localization,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.locale,"onUpdate:field":a=>t.locale=a,placeholder:"Locale",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.text,"onUpdate:field":a=>t.text=a,placeholder:"Text",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.localization.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,N)]))),128))]),_:1}),e.createVNode(n.default,{title:"Subcategories",placeholder:"No subcategories added yet",actions:[{label:"+",function:()=>l.state.current.subcategories.push({name:"",url:""})}],class:"mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.subcategories,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Subcategory name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.url,"onUpdate:field":a=>t.url=a,placeholder:"Subcategory",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.subcategories.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,k)]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Filters",placeholder:"No filters added yet",actions:[{label:"+",function:()=>l.state.current.filters.push({name:"",url:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.filters,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Filter name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.options,"onUpdate:field":a=>t.options=a,placeholder:"Filter options divided by ,",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.filters.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,V)]))),128))]),_:1},8,["actions"])],64))}};exports.default=y;
|
@@ -2,7 +2,7 @@ import { computed as h, openBlock as o, createElementBlock as c, Fragment as m,
|
|
2
2
|
import { useRoute as k, useRouter as v } from "vue-router";
|
3
3
|
import g from "../../../icons/navigation/IconDelete.vue.js";
|
4
4
|
import S from "../../../../components/Button/Button.vue.js";
|
5
|
-
import E from "../../../../components/Select/Select.
|
5
|
+
import E from "../../../../components/Select/Select.vue2.js";
|
6
6
|
import i from "../../../../components/Field/Field.vue.js";
|
7
7
|
import p from "../../../../components/Block/Block.vue.js";
|
8
8
|
import { actions as f, state as t } from "../../store/categories.js";
|
package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");const N=require("../../../../components/Feed/Feed.vue.cjs"),w=require("../../../../components/Select/Select.vue2.cjs"),q=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const P=require("../blocks/CardPosition.vue.cjs"),C=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),d=require("../../../globals/store/globals.cjs"),E=require("../../../auth/store/auth.cjs"),t=require("../../store/leftovers.cjs"),p=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const V={class:"pd-thin"},x={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},B={class:""},S=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),D={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},L={class:"gap-thin flex-v-center flex-nojustify flex"},R={class:"mn-r-auto"},O={__name:"EditLeftover",setup(z){const r=v.useRoute(),l=v.useRouter(),m=e.ref(p.state.all);e.ref(null);const _=e.computed(()=>Number(t.state.current.positions.reduce((s,a)=>Number(s)+Number(a.price),0))),c=e.ref(!1);function b(){c.value=!0}function f(){c.value=!1}e.onMounted(async()=>{if(r.params.leftover)try{await t.actions.fetch(r.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const s=await p.actions.read({organization:r.params._id,limit:100});m.value=s}catch{console.error("error")}});function g(){r.params.leftover?t.actions.fetch(r.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){t.state.current.organization=r.params._id,r.params.leftover?t.actions.update(t.state.current).then(()=>l.push({name:"Leftovers",params:{_id:r.params._id}}),s=>console.error("error")):(t.state.current.creator={type:"user",target:E.state.user._id},t.state.current.owner={type:"organization",target:r.params._id},console.log("leftover state is",t.state.current),t.actions.create(t.state.current).then(()=>l.push({name:"Leftovers",params:{_id:r.params._id}}),s=>console.error("error")))}function k(){t.actions.delete(r.params.leftover).then(()=>l.push({name:"Leftovers",params:{_id:r.params._id}}),s=>console.error("error"))}return(s,a)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("header",x,[e.createElementVNode("h2",B,e.toDisplayString(e.unref(r).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(w.default,{select:t.state.current.type,"onUpdate:select":a[0]||(a[0]=o=>t.state.current.type=o),options:["stock-in","stock-out"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(q.default,{title:"Add position",onClosePopup:f,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[S,e.createElementVNode("div",D,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:o=>p.actions.read(o),state:null},options:{organization:e.unref(r).params._id},class:""},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(n,i)=>(e.openBlock(),e.createBlock(C.default,{key:n._id,editable:!1,product:n,onClick:()=>{let u={...n};u.quantity=1,u.type="pcs",d.actions.add(t.state.current.positions,u),f()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(h.default,{title:"Invetory Sheet",actions:[{label:"+",function:()=>b()}],placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(o,n)=>(e.openBlock(),e.createBlock(P.default,{key:o._id,product:o,array:t.state.current.positions,products:m.value,onUpdate:i=>d.actions.update(t.state.current.positions,i,n),onDelete:i=>d.actions.delete(t.state.current.positions,i,n),class:"mn-b-small radius-medium bg-white pd-small"},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1},8,["actions"]),e.createVNode(h.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",L,[e.createElementVNode("h3",R," In total: "+e.toDisplayString(s.formatPrice(_.value)),1),e.createElementVNode("a",{onClick:a[1]||(a[1]=o=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:a[2]||(a[2]=o=>g())}," Reset "),e.unref(r).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[3]||(a[3]=o=>k()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})]))}};exports.default=O;
|
@@ -1,70 +1,79 @@
|
|
1
|
-
import { ref as
|
2
|
-
import
|
1
|
+
import { ref as h, computed as z, onMounted as E, openBlock as i, createElementBlock as u, createElementVNode as a, toDisplayString as k, unref as v, createVNode as l, withCtx as m, Fragment as w, renderList as P, createBlock as $, createCommentVNode as A } from "vue";
|
2
|
+
import x from "../../../../components/Block/Block.vue.js";
|
3
3
|
import "../../../../components/Field/Field.vue2.js";
|
4
|
-
import
|
4
|
+
import B from "../../../../components/Feed/Feed.vue.js";
|
5
|
+
import I from "../../../../components/Select/Select.vue2.js";
|
6
|
+
import O from "../../../../components/Popup/Popup.vue.js";
|
5
7
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import { state as
|
11
|
-
import { state as
|
8
|
+
import U from "../blocks/CardPosition.vue.js";
|
9
|
+
import V from "../../../orders/components/blocks/CardOrderItem.vue.js";
|
10
|
+
import { useRoute as F, useRouter as j } from "vue-router";
|
11
|
+
import { actions as b } from "../../../globals/store/globals.js";
|
12
|
+
import { state as q } from "../../../auth/store/auth.js";
|
13
|
+
import { state as e, actions as c } from "../../store/leftovers.js";
|
14
|
+
import { state as M, actions as C } from "../../store/products.js";
|
12
15
|
import "./EditLeftover.vue2.js";
|
13
|
-
const
|
16
|
+
const G = { class: "pd-thin" }, H = { class: "mn-b-medium gap-small flex-v-center flex-nowrap flex" }, J = { class: "" }, K = /* @__PURE__ */ a("h3", { class: "mn-b-small" }, "Add to order", -1), Q = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, T = { class: "gap-thin flex-v-center flex-nojustify flex" }, W = { class: "mn-r-auto" }, de = {
|
14
17
|
__name: "EditLeftover",
|
15
|
-
setup(
|
16
|
-
const t =
|
17
|
-
|
18
|
-
const
|
19
|
-
S(
|
18
|
+
setup(X) {
|
19
|
+
const t = F(), d = j(), y = h(M.all);
|
20
|
+
h(null);
|
21
|
+
const N = z(() => Number(e.current.positions.reduce((o, s) => Number(o) + Number(s.price), 0))), f = h(!1);
|
22
|
+
function S() {
|
23
|
+
f.value = !0;
|
24
|
+
}
|
25
|
+
function g() {
|
26
|
+
f.value = !1;
|
27
|
+
}
|
28
|
+
E(async () => {
|
20
29
|
if (t.params.leftover)
|
21
30
|
try {
|
22
|
-
await
|
31
|
+
await c.fetch(t.params.leftover);
|
23
32
|
} catch {
|
24
33
|
console.error("error");
|
25
34
|
}
|
26
35
|
else
|
27
36
|
e.current = { type: "", order: "", positions: [] };
|
28
37
|
try {
|
29
|
-
const o = await
|
38
|
+
const o = await C.read({
|
30
39
|
organization: t.params._id,
|
31
40
|
limit: 100
|
32
41
|
});
|
33
|
-
|
42
|
+
y.value = o;
|
34
43
|
} catch {
|
35
44
|
console.error("error");
|
36
45
|
}
|
37
46
|
});
|
38
|
-
function
|
39
|
-
t.params.leftover ?
|
47
|
+
function D() {
|
48
|
+
t.params.leftover ? c.fetch(t.params.leftover) : e.current = { type: "", order: "", positions: [] };
|
40
49
|
}
|
41
|
-
function
|
42
|
-
e.current.organization = t.params._id, t.params.leftover ?
|
43
|
-
() =>
|
50
|
+
function L() {
|
51
|
+
e.current.organization = t.params._id, t.params.leftover ? c.update(e.current).then(
|
52
|
+
() => d.push({ name: "Leftovers", params: { _id: t.params._id } }),
|
44
53
|
(o) => console.error("error")
|
45
54
|
) : (e.current.creator = {
|
46
55
|
type: "user",
|
47
|
-
target:
|
56
|
+
target: q.user._id
|
48
57
|
}, e.current.owner = {
|
49
58
|
type: "organization",
|
50
59
|
target: t.params._id
|
51
|
-
}, console.log("leftover state is", e.current),
|
52
|
-
() =>
|
60
|
+
}, console.log("leftover state is", e.current), c.create(e.current).then(
|
61
|
+
() => d.push({ name: "Leftovers", params: { _id: t.params._id } }),
|
53
62
|
(o) => console.error("error")
|
54
63
|
));
|
55
64
|
}
|
56
|
-
function
|
57
|
-
|
58
|
-
() =>
|
65
|
+
function R() {
|
66
|
+
c.delete(t.params.leftover).then(
|
67
|
+
() => d.push({ name: "Leftovers", params: { _id: t.params._id } }),
|
59
68
|
(o) => console.error("error")
|
60
69
|
);
|
61
70
|
}
|
62
|
-
return (o,
|
63
|
-
|
64
|
-
|
65
|
-
|
71
|
+
return (o, s) => (i(), u("div", G, [
|
72
|
+
a("header", H, [
|
73
|
+
a("h2", J, k(v(t).params.leftover ? "Edit " : "Add ") + " Inventory", 1),
|
74
|
+
l(I, {
|
66
75
|
select: e.current.type,
|
67
|
-
"onUpdate:select":
|
76
|
+
"onUpdate:select": s[0] || (s[0] = (r) => e.current.type = r),
|
68
77
|
options: [
|
69
78
|
"stock-in",
|
70
79
|
"stock-out"
|
@@ -73,67 +82,99 @@ const U = { class: "pd-thin" }, V = { class: "mn-b-medium gap-small flex-v-cente
|
|
73
82
|
class: "bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"
|
74
83
|
}, null, 8, ["select"])
|
75
84
|
]),
|
76
|
-
|
77
|
-
title: "Add
|
78
|
-
|
85
|
+
l(O, {
|
86
|
+
title: "Add position",
|
87
|
+
onClosePopup: g,
|
88
|
+
isPopupOpen: f.value,
|
89
|
+
class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
|
79
90
|
}, {
|
80
|
-
default:
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
91
|
+
default: m(() => [
|
92
|
+
K,
|
93
|
+
a("div", Q, [
|
94
|
+
l(B, {
|
95
|
+
search: !0,
|
96
|
+
states: {
|
97
|
+
empty: {
|
98
|
+
title: "No Products Found",
|
99
|
+
description: "Currently, there are no such products available."
|
100
|
+
}
|
101
|
+
},
|
102
|
+
store: {
|
103
|
+
read: (r) => C.read(r),
|
104
|
+
state: null
|
105
|
+
},
|
106
|
+
options: {
|
107
|
+
organization: v(t).params._id
|
108
|
+
},
|
109
|
+
class: ""
|
110
|
+
}, {
|
111
|
+
default: m(({
|
112
|
+
items: r
|
113
|
+
}) => [
|
114
|
+
(i(!0), u(w, null, P(r, (n, p) => (i(), $(V, {
|
115
|
+
key: n._id,
|
116
|
+
editable: !1,
|
117
|
+
product: n,
|
118
|
+
onClick: () => {
|
119
|
+
let _ = { ...n };
|
120
|
+
_.quantity = 1, _.type = "pcs", b.add(e.current.positions, _), g();
|
121
|
+
},
|
122
|
+
class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
|
123
|
+
}, null, 8, ["product", "onClick"]))), 128))
|
124
|
+
]),
|
125
|
+
_: 1
|
126
|
+
}, 8, ["states", "store", "options"])
|
127
|
+
])
|
88
128
|
]),
|
89
129
|
_: 1
|
90
|
-
}),
|
91
|
-
|
130
|
+
}, 8, ["isPopupOpen"]),
|
131
|
+
l(x, {
|
92
132
|
title: "Invetory Sheet",
|
133
|
+
actions: [{
|
134
|
+
label: "+",
|
135
|
+
function: () => S()
|
136
|
+
}],
|
93
137
|
placeholder: "No positions added yet",
|
94
138
|
class: "mn-b-semi"
|
95
139
|
}, {
|
96
|
-
default:
|
97
|
-
(
|
98
|
-
key:
|
99
|
-
product:
|
140
|
+
default: m(() => [
|
141
|
+
(i(!0), u(w, null, P(e.current.positions, (r, n) => (i(), $(U, {
|
142
|
+
key: r._id,
|
143
|
+
product: r,
|
100
144
|
array: e.current.positions,
|
101
|
-
products:
|
102
|
-
|
103
|
-
e.current.positions,
|
104
|
-
a
|
105
|
-
)),
|
106
|
-
onUpdate: (a) => p.update(
|
145
|
+
products: y.value,
|
146
|
+
onUpdate: (p) => b.update(
|
107
147
|
e.current.positions,
|
108
|
-
|
109
|
-
|
148
|
+
p,
|
149
|
+
n
|
110
150
|
),
|
111
|
-
onDelete: (
|
151
|
+
onDelete: (p) => b.delete(
|
112
152
|
e.current.positions,
|
113
|
-
|
114
|
-
|
115
|
-
)
|
153
|
+
p,
|
154
|
+
n
|
155
|
+
),
|
156
|
+
class: "mn-b-small radius-medium bg-white pd-small"
|
116
157
|
}, null, 8, ["product", "array", "products", "onUpdate", "onDelete"]))), 128))
|
117
158
|
]),
|
118
159
|
_: 1
|
119
|
-
}),
|
120
|
-
|
121
|
-
default:
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
onClick:
|
160
|
+
}, 8, ["actions"]),
|
161
|
+
l(x, { class: "" }, {
|
162
|
+
default: m(() => [
|
163
|
+
a("section", T, [
|
164
|
+
a("h3", W, " In total: " + k(o.formatPrice(N.value)), 1),
|
165
|
+
a("a", {
|
166
|
+
onClick: s[1] || (s[1] = (r) => L()),
|
126
167
|
class: "bg-main button"
|
127
168
|
}, " Save "),
|
128
|
-
|
169
|
+
a("a", {
|
129
170
|
class: "t-white bg-second button",
|
130
|
-
onClick:
|
171
|
+
onClick: s[2] || (s[2] = (r) => D())
|
131
172
|
}, " Reset "),
|
132
|
-
|
173
|
+
v(t).params.leftover ? (i(), u("a", {
|
133
174
|
key: 0,
|
134
|
-
onClick:
|
175
|
+
onClick: s[3] || (s[3] = (r) => R()),
|
135
176
|
class: "t-white bg-red button"
|
136
|
-
}, " Delete ")) :
|
177
|
+
}, " Delete ")) : A("", !0)
|
137
178
|
])
|
138
179
|
]),
|
139
180
|
_: 1
|
@@ -142,5 +183,5 @@ const U = { class: "pd-thin" }, V = { class: "mn-b-medium gap-small flex-v-cente
|
|
142
183
|
}
|
143
184
|
};
|
144
185
|
export {
|
145
|
-
|
186
|
+
de as default
|
146
187
|
};
|