@ozdao/prometheus-framework 0.2.110 → 0.2.111
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/elements/AnimatedGrid.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/elements/AnimatedGrid.vue.js +13 -0
- package/dist/prometheus-framework/src/modules/landing/components/elements/AnimatedGrid.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/elements/AnimatedGrid.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +1 -4
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/landing.client.js +6 -4
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- 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/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 +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/DatePicker/Calendar.vue +296 -0
- package/src/modules/landing/components/elements/AnimatedGrid.vue +31 -0
- package/src/modules/landing/components/sections/HeroSection.vue +16 -14
- package/src/modules/landing/components/sections/MobileApp.vue +8 -33
- package/src/modules/landing/components/sections/SectionHeroToken.vue +18 -45
- package/src/modules/landing/landing.client.js +3 -1
package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js
CHANGED
@@ -3,7 +3,7 @@ import { useRoute as U } from "vue-router";
|
|
3
3
|
import N from "../../../../components/Block/Block.vue.js";
|
4
4
|
import "../../../../components/Field/Field.vue.js";
|
5
5
|
import O from "../../../../components/FieldPhone/click-outside.js";
|
6
|
-
import "../../../../components/Select/Select.
|
6
|
+
import "../../../../components/Select/Select.vue.js";
|
7
7
|
import V from "../../../../components/Feed/Feed.vue.js";
|
8
8
|
import B from "../../../../components/Button/Button.vue2.js";
|
9
9
|
import F from "../../../globals/components/blocks/BlockSearch.vue.js";
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Field/Field.vue2.cjs"),o=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),u=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Field/Field.vue2.cjs"),o=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),u=require("../../../../components/Select/Select.vue2.cjs"),i={class:"gap-thin flex-justify-between flex-nowrap flex"},d={__name:"FormCustomerDetails",props:{customer:Object,title:{type:String,default:"Personal Data"}},setup(a){let s=e.ref("instagram");return(m,l)=>(e.openBlock(),e.createBlock(r.default,{title:a.title,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createVNode(n.default,{field:a.customer.profile.name,"onUpdate:field":l[0]||(l[0]=t=>a.customer.profile.name=t),label:"Name",placeholder:"Enter name",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["field"]),e.createVNode(o.default,{modelValue:a.customer.phone,"onUpdate:modelValue":l[1]||(l[1]=t=>a.customer.phone=t),onCountry:l[2]||(l[2]=t=>{a.customer.number=t}),inputOptions:{placeholder:"Enter phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"w-100 bg-white pd-small mn-b-thin radius-small"},null,8,["modelValue"]),e.createElementVNode("div",i,[e.createVNode(u.default,{select:e.unref(s),options:[{name:"Instagram",value:"instagram"},{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"}],"onUpdate:select":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),placeholder:"Messenger",size:"small",class:"bg-white pd-small radius-small"},null,8,["select"]),e.createVNode(n.default,{field:a.customer.socials[e.unref(s)],"onUpdate:field":l[4]||(l[4]=t=>a.customer.socials[e.unref(s)]=t),label:"@",placeholder:"Enter username",class:"bg-white pd-small radius-small w-100"},null,8,["field"])])]),_:1},8,["title"]))}};exports.default=d;
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js
CHANGED
@@ -2,7 +2,7 @@ import { ref as r, openBlock as m, createBlock as i, withCtx as u, createVNode a
|
|
2
2
|
import p from "../../../../components/Block/Block.vue.js";
|
3
3
|
import o from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import c from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import h from "../../../../components/Select/Select.
|
5
|
+
import h from "../../../../components/Select/Select.vue2.js";
|
6
6
|
const g = { class: "gap-thin flex-justify-between flex-nowrap flex" }, V = {
|
7
7
|
__name: "FormCustomerDetails",
|
8
8
|
props: {
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Select/Select.vue2.cjs"),o={class:"mn-b-small flex-nowrap flex"},s={__name:"FormPayment",props:{order:Object},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(r.default,{title:"Payment"},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(n.default,{select:t.order.payment.type,"onUpdate:select":l[0]||(l[0]=a=>t.order.payment.type=a),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1}))}};exports.default=s;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { openBlock as r, createBlock as l, withCtx as o, createElementVNode as n, createVNode as m } from "vue";
|
2
2
|
import s from "../../../../components/Block/Block.vue.js";
|
3
|
-
import p from "../../../../components/Select/Select.
|
3
|
+
import p from "../../../../components/Select/Select.vue2.js";
|
4
4
|
const c = { class: "mn-b-small flex-nowrap flex" }, f = {
|
5
5
|
__name: "FormPayment",
|
6
6
|
props: {
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.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");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const x=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const u=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const o=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const f=require("../../../../components/Button/Button.vue2.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),D=require("../../../../components/Feed/Feed.vue.cjs"),P=require("../../../icons/navigation/IconDelete.vue.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),C={class:"for-transition pd-thin w-100"},U={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},O={key:0,class:"mn-r-auto"},M={key:1,class:"mn-r-auto"},R={class:"flex-nowrap flex gap-thin pd-thin"},S={class:"cols-2-fit-content"},T={class:"w-100 flex-child-grow-1 flex-child"},z={class:"cols-2 gap-thin"},A={class:"bg-grey pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),I=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j={class:"bg-grey pd-medium o-hidden radius-big"},H=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),G=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Products",-1),Q=e.createElementVNode("h4",null,"Orders",-1),W=e.createElementVNode("h4",null,"Departments",-1),X={__name:"DepartmentEdit",setup(Y){const N=c.useRouter(),r=c.useRoute();async function V(){e.ref(w.state.memberships),r.params.department&&await t.actions.readOne(r.params.department)}V();const n=e.ref(!1),_=e.ref(null);function k(l){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function q(){r.params.department&&await t.actions.update(r.params._id,t.state.department),r.params.department||await t.actions.create(r.params._id,t.state.department)}function v(){N.push({name:"Organization Members",params:{_id:r.params._id}})}async function E(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(r.params._id,t.state.department)}function y(l){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:l.user._id})}return(l,s)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("header",U,[e.unref(r).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(r).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:E,callback:l.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:q,callback:v,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(x.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",T,[e.createVNode(u.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:l.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:l.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>k()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,d)=>(e.openBlock(),e.createBlock(b.default,{class:"bg-white pd-thin radius-medium w-100",key:d,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,action:{label:{is:P.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>y(a)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(D.default,{search:{placeholder:"Search customer...",class:"bg-grey mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>w.actions.read(a),state:null},options:{target:e.unref(r).params._id},class:"bg-grey pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,Z)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:d._id,user:d.user,photo:(m=d.user.profile)==null?void 0:m.photo,name:((p=d.user.profile)==null?void 0:p.name)||d.user.phone||d.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:d.user._id,user:d.user,position:"Member"}),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",z,[e.createElementVNode("div",A,[F,I,e.createElementVNode("div",L,[e.createVNode(o.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":s[3]||(s[3]=a=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[H,G,e.createElementVNode("div",J,[K,e.createVNode(o.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":s[4]||(s[4]=a=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":s[5]||(s[5]=a=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":s[6]||(s[6]=a=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),Q,e.createVNode(o.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":s[7]||(s[7]=a=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":s[8]||(s[8]=a=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":s[9]||(s[9]=a=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),W,e.createVNode(o.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":s[10]||(s[10]=a=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":s[11]||(s[11]=a=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":s[12]||(s[12]=a=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=X;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const x=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const u=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const o=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const f=require("../../../../components/Button/Button.vue2.cjs"),B=require("../../../../components/Popup/Popup.vue2.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),D=require("../../../../components/Feed/Feed.vue.cjs"),P=require("../../../icons/navigation/IconDelete.vue.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),C={class:"for-transition pd-thin w-100"},U={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},O={key:0,class:"mn-r-auto"},M={key:1,class:"mn-r-auto"},R={class:"flex-nowrap flex gap-thin pd-thin"},S={class:"cols-2-fit-content"},T={class:"w-100 flex-child-grow-1 flex-child"},z={class:"cols-2 gap-thin"},A={class:"bg-grey pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),I=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j={class:"bg-grey pd-medium o-hidden radius-big"},H=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),G=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Products",-1),Q=e.createElementVNode("h4",null,"Orders",-1),W=e.createElementVNode("h4",null,"Departments",-1),X={__name:"DepartmentEdit",setup(Y){const N=c.useRouter(),r=c.useRoute();async function V(){e.ref(w.state.memberships),r.params.department&&await t.actions.readOne(r.params.department)}V();const n=e.ref(!1),_=e.ref(null);function k(l){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function q(){r.params.department&&await t.actions.update(r.params._id,t.state.department),r.params.department||await t.actions.create(r.params._id,t.state.department)}function v(){N.push({name:"Organization Members",params:{_id:r.params._id}})}async function E(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(r.params._id,t.state.department)}function y(l){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:l.user._id})}return(l,s)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("header",U,[e.unref(r).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(r).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:E,callback:l.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:q,callback:v,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(x.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",T,[e.createVNode(u.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:l.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:l.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>k()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,d)=>(e.openBlock(),e.createBlock(b.default,{class:"bg-white pd-thin radius-medium w-100",key:d,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,action:{label:{is:P.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>y(a)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(D.default,{search:{placeholder:"Search customer...",class:"bg-grey mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>w.actions.read(a),state:null},options:{target:e.unref(r).params._id},class:"bg-grey pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,Z)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:d._id,user:d.user,photo:(m=d.user.profile)==null?void 0:m.photo,name:((p=d.user.profile)==null?void 0:p.name)||d.user.phone||d.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:d.user._id,user:d.user,position:"Member"}),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",z,[e.createElementVNode("div",A,[F,I,e.createElementVNode("div",L,[e.createVNode(o.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":s[3]||(s[3]=a=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[H,G,e.createElementVNode("div",J,[K,e.createVNode(o.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":s[4]||(s[4]=a=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":s[5]||(s[5]=a=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":s[6]||(s[6]=a=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),Q,e.createVNode(o.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":s[7]||(s[7]=a=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":s[8]||(s[8]=a=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":s[9]||(s[9]=a=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),W,e.createVNode(o.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":s[10]||(s[10]=a=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":s[11]||(s[11]=a=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":s[12]||(s[12]=a=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=X;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js
CHANGED
@@ -7,14 +7,14 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
|
7
7
|
import B from "../../../../components/UploadImage/UploadImage.vue.js";
|
8
8
|
import "../../../../components/Tab/Tab.vue.js";
|
9
9
|
import k from "../../../../components/Field/Field.vue2.js";
|
10
|
-
import "../../../../components/Select/Select.
|
10
|
+
import "../../../../components/Select/Select.vue.js";
|
11
11
|
import i from "../../../../components/Checkbox/Checkbox.vue.js";
|
12
12
|
import "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
|
13
13
|
import "../../../../components/Address/Address.vue.js";
|
14
14
|
import "../../../../components/Loader/Loader.vue.js";
|
15
15
|
import "../../../../components/LocationMarker/LocationMarker.vue.js";
|
16
16
|
import x from "../../../../components/Button/Button.vue2.js";
|
17
|
-
import F from "../../../../components/Popup/Popup.
|
17
|
+
import F from "../../../../components/Popup/Popup.vue2.js";
|
18
18
|
import U from "../../../../components/Block/Block.vue.js";
|
19
19
|
import H from "../../../../components/Feed/Feed.vue.js";
|
20
20
|
import L from "../../../icons/navigation/IconDelete.vue.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("vue-router"),p=require("../../../../components/Feed/Feed.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const q=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("vue-router"),p=require("../../../../components/Feed/Feed.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const q=require("../../../../components/Popup/Popup.vue2.cjs"),M=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),N=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const _=require("../../../users/components/blocks/CardUser.vue.cjs"),x=require("../blocks/CardDepartment.vue.cjs"),h=require("../../../icons/navigation/IconDelete.vue.cjs"),m=require("../../../auth/store/auth.cjs"),u=require("../../store/invites.cjs"),f=require("../../store/memberships.cjs"),k=require("../../store/organizations.cjs"),b=require("../../store/departments.cjs"),z={class:"pd-thin"},P={key:2,class:"cols-1 gap-thin"},V={key:3},I={__name:"Members",setup(A){const o=g.useRoute();g.useRouter();const d=e.ref(null),s=e.ref("members"),c=e.ref(!1);function y(){c.value=!0}function v(){c.value=!1}e.onMounted(async()=>{d.value=(await k.actions.read({_id:o.params._id,user:m.state.user._id}))[0]}),e.computed(()=>{const a=b.state.departments,n=a.flatMap(i=>i.subdepartments.map(r=>r._id));return a.filter(i=>!n.includes(i._id))});async function w(a){await u.actions.create({owner:{type:"Organization",target:d.value._id},creator:{type:"User",target:m.state.user._id},invites:a}),v()}async function B(a,n){confirm("Confirm remove of member")==!0&&(f.state.memberships.splice(a,1),await f.actions.delete(n._id))}async function C(a,n){confirm("Confirm remove of member")==!0&&(u.state.invites.splice(a,1),await u.actions.delete(n._id))}return(a,n)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",z,[e.createVNode(M.default,{title:"Members","onUpdate:tabs_current":n[0]||(n[0]=r=>s.value=r),tabs_current:s.value,tabs:[{name:`Members (${k.state.current.numberOfMembers||0})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:y,label:"Invite members"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(q.default,{title:"Add members",onClosePopup:v,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(N.default,{text:"Please enter your email or phone number to send an invitation link:",organization:d.value,onSendInvite:w},null,8,["organization"])]),_:1},8,["isPopupOpen"]),s.value==="departments"?(e.openBlock(),e.createBlock(p.default,{key:0,states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>a.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:r=>b.actions.read(r),state:null},options:{organization:e.unref(o).params._id,user:m.state.user._id}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,l)=>(e.openBlock(),e.createBlock(x.default,{key:l,department:t,organization:e.unref(o).params._id,class:"radius-semi bg-grey pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])):e.createCommentVNode("",!0),s.value==="departments"&&b.state.departments.length>0?(e.openBlock(),e.createBlock(i,{key:1,to:{path:`/organizations/${e.unref(o).params._id}/departments/create`},class:"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"},{default:e.withCtx(()=>[e.createTextVNode(" Add department ")]),_:1},8,["to"])):e.createCommentVNode("",!0),s.value==="members"?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(p.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:r=>f.actions.read(r)},options:{target:e.unref(o).params._id,role:["member","owner"]},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,l)=>(e.openBlock(),e.createBlock(_.default,{key:l,user:t,_id:t.user._id,photo:t.user.profile.photo,phone:t.user.phone,email:t.user.email,name:t.user.profile.name||"No name",role:t.label||t.role,onClick:F=>a.$router.push(`/profile/${t.user._id}`),action:t.role!=="owner"?{label:{is:h.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>B(l,t)}:null,class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0),s.value==="invites"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(p.default,{search:!0,states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:r=>u.actions.read(r)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,t=>(e.openBlock(),e.createBlock(_.default,{key:a.index,user:{type:"invite"},name:t.email||t.phone,role:t.status,action:{label:{is:h.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>C(a.index,t)},class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)])}}};exports.default=I;
|
@@ -3,10 +3,10 @@ import { useRoute as S, useRouter as V } from "vue-router";
|
|
3
3
|
import y from "../../../../components/Feed/Feed.vue.js";
|
4
4
|
import "../../../../components/Tab/Tab.vue.js";
|
5
5
|
import "../../../../components/Tooltip/Tooltip.vue2.js";
|
6
|
-
import R from "../../../../components/Popup/Popup.
|
6
|
+
import R from "../../../../components/Popup/Popup.vue2.js";
|
7
7
|
import U from "../../../globals/components/sections/SectionPageTitle.vue.js";
|
8
8
|
import E from "../sections/MembersAdd.vue.js";
|
9
|
-
import "../../../mobile/components/Menu/Menu.
|
9
|
+
import "../../../mobile/components/Menu/Menu.vue.js";
|
10
10
|
import "../../../mobile/components/Menu/MenuItem.vue.js";
|
11
11
|
import C from "../../../users/components/blocks/CardUser.vue.js";
|
12
12
|
import L from "../blocks/CardDepartment.vue.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const f=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const f=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");const v=require("../../../events/components/sections/Feed.vue.cjs"),h=require("../../../community/components/sections/Feed.vue.cjs"),g=require("../../../spots/components/blocks/CardSpot.vue.cjs"),q=require("../sections/DetailsTab.vue.cjs"),w=require("../../../products/components/pages/Products.vue.cjs"),o=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs");require("../../store/departments.cjs");const C=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const N={key:0,class:"pd-thin for-transition w-100"},V={class:"pos-relative"},B={key:0},x={__name:"Organization",setup(z){const c=d.useRouter(),t=d.useRoute();let m=t.query.tab?t.query.tab:"products";const i=e.ref(null);e.onMounted(async()=>{i.value=await a.actions.read({_id:t.params._id,user:o.state.user._id}),await y.actions.read({target:t.params._id})});const r=e.ref(m);return t.query.tab=r.value,e.watch(r,l=>{c.replace({query:null})}),(l,n)=>{const u=e.resolveComponent("router-link");return i.value?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(q.default,{organization:a.state.current,user:o.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(f.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=s=>r.value=s),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",V,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(h.default,{key:0,user:o.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:o.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&o.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(k.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(w.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(b.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:s=>C.actions.read(e.unref(t).params._id),state:a.state},options:{user:o.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(p,_)=>(e.openBlock(),e.createBlock(g.default,{key:_,spot:p,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["store","options"]),o.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=s=>l.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin bg-main button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=x;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js
CHANGED
@@ -6,7 +6,7 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
|
6
6
|
import O from "../../../../components/Tab/Tab.vue2.js";
|
7
7
|
import A from "../../../../components/Block/Block.vue.js";
|
8
8
|
import E from "../../../../components/Feed/Feed.vue.js";
|
9
|
-
import "../../../mobile/components/Menu/Menu.
|
9
|
+
import "../../../mobile/components/Menu/Menu.vue.js";
|
10
10
|
import "../../../mobile/components/Menu/MenuItem.vue.js";
|
11
11
|
import "../blocks/DepartmentSub.vue2.js";
|
12
12
|
import M from "../../../events/components/sections/Feed.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},V=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),N=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),_=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",y,[V,N,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),_,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=r=>e.state.current.socials.youtube=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js
CHANGED
@@ -6,11 +6,11 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
|
6
6
|
import v from "../../../../components/FieldTags/BlockTags.vue.js";
|
7
7
|
import "../../../../components/Tab/Tab.vue.js";
|
8
8
|
import i from "../../../../components/Field/Field.vue2.js";
|
9
|
-
import "../../../../components/Select/Select.
|
9
|
+
import "../../../../components/Select/Select.vue.js";
|
10
10
|
import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
11
11
|
import k from "../../../../components/UploadImage/UploadImage.vue.js";
|
12
12
|
import T from "../../../../components/Button/Button.vue2.js";
|
13
|
-
import "../../../../components/Popup/Popup.
|
13
|
+
import "../../../../components/Popup/Popup.vue.js";
|
14
14
|
import { state as z } from "../../../auth/store/auth.js";
|
15
15
|
import { actions as s, state as e } from "../../store/organizations.js";
|
16
16
|
import "../../store/memberships.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Button/Button.vue.cjs");require("./Documents.vue2.cjs");const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,q)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:x=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js
CHANGED
@@ -2,7 +2,7 @@ import { ref as r, watchEffect as y, resolveComponent as P, openBlock as t, crea
|
|
2
2
|
import { useRouter as I, useRoute as g } from "vue-router";
|
3
3
|
import D from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import "vue-i18n";
|
5
|
-
import "../../../../components/Popup/Popup.
|
5
|
+
import "../../../../components/Popup/Popup.vue.js";
|
6
6
|
import "../../../../components/Loader/Loader.vue.js";
|
7
7
|
import S from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
8
8
|
import "../../../../components/Button/Button.vue.js";
|
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"),u=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const m=require("../../../../components/Button/Button.vue2.cjs"),p=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../icons/navigation/IconAdd.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("../../store/invites.cjs");const b={class:"mn-b-thin t-transp p-medium"},g={class:"cols-1 mn-b-small radius-medium pd-semi bg-grey"},v=["onClick"],h=e.createElementVNode("span",null,"Invite to organization",-1),k={__name:"MembersAdd",props:{organization:Object,text:String},emits:["send-invite"],setup(a,{emit:s}){const o=e.ref(null),r=s,t=e.ref([{contact:""}]);async function c(){r("send-invite",t.value)}return(_,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("p",b,e.toDisplayString(a.text),1),e.createElementVNode("section",g,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(n,l)=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"br-1px br-solid br-grey flex gap-thin radius-small mn-b-thin"},[e.createVNode(u.default,{field:n.contact,"onUpdate:field":d=>n.contact=d,placeholder:"Enter email or phone",class:"w-100 pd-small radius-small bg-white",validation:o.value},{default:e.withCtx(()=>[l<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:i[0]||(i[0]=()=>t.value.push({contact:""})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(f.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>t.value.splice(l,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(p.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,v))]),_:2},1032,["field","onUpdate:field","validation"])]))),128))]),e.createVNode(m.default,{submit:c,class:"w-100 bg-main"},{default:e.withCtx(()=>[h]),_:1})]))}};exports.default=k;
|
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 e, createElementBlock as t, createElementVNode as a, toDisplayString as _, Fragment as g, renderList as v, createVNode as s, withCtx as c } from "vue";
|
2
2
|
import h from "../../../../components/Field/Field.vue2.js";
|
3
|
-
import "../../../../components/Select/Select.
|
3
|
+
import "../../../../components/Select/Select.vue.js";
|
4
4
|
import x from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import k from "../../../icons/navigation/IconDelete.vue.js";
|
6
6
|
import y from "../../../icons/navigation/IconAdd.vue.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.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.
|
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.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue2.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.vue.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
@@ -3,7 +3,7 @@ import { useRouter as v, useRoute as z } from "vue-router";
|
|
3
3
|
import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
4
4
|
import "../../../../components/Tab/Tab.vue.js";
|
5
5
|
import "../../../../components/Field/Field.vue.js";
|
6
|
-
import "../../../../components/Select/Select.
|
6
|
+
import "../../../../components/Select/Select.vue.js";
|
7
7
|
import "../../../../components/Loader/Loader.vue.js";
|
8
8
|
import "../../../../components/Button/Button.vue.js";
|
9
9
|
import "../../../../components/Dropdown/Dropdown.vue2.js";
|
@@ -11,7 +11,7 @@ import "../../../../components/Chips/Chips.vue2.js";
|
|
11
11
|
import { state as k } from "../../../auth/store/auth.js";
|
12
12
|
import "../../store/memberships.js";
|
13
13
|
import "vue-i18n";
|
14
|
-
import "../../../../components/Popup/Popup.
|
14
|
+
import "../../../../components/Popup/Popup.vue.js";
|
15
15
|
import "../../../reports/store/reports.js";
|
16
16
|
import { actions as q } from "../../store/organizations.js";
|
17
17
|
import $ from "../blocks/CardOrganization.vue.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"),c=require("../../../../components/Field/Field.vue2.cjs"),i=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Field/Field.vue2.cjs"),i=require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const y=require("../../../icons/navigation/IconAdd.vue.cjs"),k=require("../../../icons/navigation/IconDelete.vue.cjs"),w={class:"gap-thin"},g={class:"gap-thin mn-b-thin flex-nowrap flex"},h={class:"bg-white w-100 w-min-15r br-solid br-1px br-black-transp-5 pd-small radius-small"},x=["disabled"],V={key:0,class:"gap-thin flex-nowrap flex"},N={__name:"CardPosition",props:{product:Object,products:Array,array:Array,showPrice:{type:Boolean,default:!0}},emits:["add","delete","update"],setup(s,{emit:p}){const l=s,n=p,u=e.ref(null),t=e.ref(1),a=e.ref("pcs"),d=e.ref(0),m=e.computed(()=>u.value&&t.value>0&&d.value>=0);e.watch(l.array,()=>{u.value=l.product,t.value=l.product.quantity||1,d.value=l.product.price,a.value=l.product.type}),l.product&&(u.value=l.product,t.value=l.product.quantity||1,d.value=l.product.price,a.value=l.product.type),e.watch([u,t,d,a],()=>{n("update",{...u.value,price:d.value,quantity:t.value||1,type:a.value})});function v(){n("add",{...u.value,price:d.value,quantity:t.value||1,type:a.value})}function b(){n("delete",{...u.value,price:d.value,quantity:t.value||1,type:a.value})}return(f,r)=>(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",g,[e.createElementVNode("div",h,e.toDisplayString(u.value.name||u.value._id.name),1),s.showPrice?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c.default,{key:0,field:t.value,"onUpdate:field":r[1]||(r[1]=o=>t.value=o),type:"number",label:"Qty",class:"bg-white w-100 w-max-10r br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(i.default,{select:a.value,"onUpdate:select":r[0]||(r[0]=o=>a.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"])),s.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,disabled:!m.value,onClick:v,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(y.default),{class:"i-semi"})],8,x)),s.product?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:b,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(k.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]),s.showPrice?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c.default,{field:d.value,"onUpdate:field":r[2]||(r[2]=o=>d.value=o),type:"number",label:"Price",symbol:f.returnCurrency(),class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(c.default,{field:t.value,"onUpdate:field":r[4]||(r[4]=o=>t.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(i.default,{select:a.value,"onUpdate:select":r[3]||(r[3]=o=>a.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"])])):e.createCommentVNode("",!0)]))}};exports.default=N;
|
package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as n, computed as q, watch as v, openBlock as o, createElementBlock as p, createElementVNode as y, toDisplayString as U, createBlock as B, withCtx as f, createVNode as d, createCommentVNode as c, unref as w } from "vue";
|
2
2
|
import b from "../../../../components/Field/Field.vue2.js";
|
3
|
-
import g from "../../../../components/Select/Select.
|
3
|
+
import g from "../../../../components/Select/Select.vue2.js";
|
4
4
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
5
5
|
import Q from "../../../icons/navigation/IconAdd.vue.js";
|
6
6
|
import V from "../../../icons/navigation/IconDelete.vue.js";
|
package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.vue2.cjs"),c=require("../../../../components/Magnifier/Magnifier.vue.cjs");require("./ImagesThumbnails.vue2.cjs");const d=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),p={class:"product-images"},m={class:"no-responsive cols-4 gap-thin"},_=["src","onClick"],g={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(o){const t=e.ref(!1),n=e.ref(0),a=s=>{n.value=s,t.value=!0},i=()=>{t.value=!1};return(s,v)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.images,(l,r)=>(e.openBlock(),e.createElementBlock("img",{key:r,src:(s.FILE_SERVER_URL||"")+l,onClick:h=>a(r),class:"radius-medium bg-white o-hidden thumbnail"},null,8,_))),128))]),e.createVNode(u.default,{onClosePopup:i,isPopupOpen:t.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(c.default,{imageSrc:(s.FILE_SERVER_URL||"")+o.images[n.value],class:"magnifier z-index-4"},null,8,["imageSrc"])]),_:1},8,["isPopupOpen"])]))}},f=d.default(g,[["__scopeId","data-v-5058c750"]]);exports.default=f;
|
package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as r, openBlock as o, createElementBlock as i, createElementVNode as p, Fragment as d, renderList as _, createVNode as c, withCtx as g } from "vue";
|
2
|
-
import f from "../../../../components/Popup/Popup.
|
2
|
+
import f from "../../../../components/Popup/Popup.vue2.js";
|
3
3
|
import h from "../../../../components/Magnifier/Magnifier.vue.js";
|
4
4
|
import "./ImagesThumbnails.vue2.js";
|
5
5
|
import v from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/Select/Select.vue2.cjs"),d=require("../../../../components/Field/Field.vue2.cjs"),n=require("../../../../components/Block/Block.vue.cjs"),l=require("../../store/categories.cjs");require("./CategoryEdit.vue2.cjs");const b={class:"mn-r-auto"},h={class:"mn-b-medium w-100 flex-nowrap gap-thin flex"},w={class:"flex-v-center flex-nowrap flex"},x=e.createElementVNode("h4",{class:"mn-r-thin t-medium"},"Localization",-1),N=["onClick"],k=["onClick"],V=["onClick"],y={__name:"CategoryEdit",setup(C){const o=c.useRoute(),u=c.useRouter();o.params.category?l.actions.fetchCategory(o.params.category):l.actions.resetCategory(),e.computed(()=>l.state.current),e.computed(()=>o.name);function m(){o.params.category?l.actions.updateCategory(o.params.category):l.actions.addCategory()}function p(){u.push({name:"Categories Organization",params:{_id:o.params._id}})}return(_,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(n.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",b,e.toDisplayString(e.unref(o).params.category?"Edit Category":"Add Category"),1),e.createVNode(f.default,{submit:m,callback:p,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Save Category ")]),_:1})]),_:1}),e.createVNode(n.default,{title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",h,[e.createVNode(d.default,{field:l.state.current.order,"onUpdate:field":r[0]||(r[0]=t=>l.state.current.order=t),label:"Order",disabled:!0,class:"w-25 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.url,"onUpdate:field":r[1]||(r[1]=t=>l.state.current.url=t),label:"URL",placeholder:"Enter category URL",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.name,"onUpdate:field":r[2]||(r[2]=t=>l.state.current.name=t),label:"Name",placeholder:"Enter category name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),e.createVNode(g.default,{select:l.state.current.status,"onUpdate:select":r[3]||(r[3]=t=>l.state.current.status=t),label:"Status",options:["draft","internal","published","removed"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),e.createElementVNode("div",w,[x,e.createElementVNode("button",{onClick:r[4]||(r[4]=()=>l.state.current.localization.push({locale:"",text:""})),class:"i-small pd-thin button-delete button"}," + ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.localization,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.locale,"onUpdate:field":a=>t.locale=a,placeholder:"Locale",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.text,"onUpdate:field":a=>t.text=a,placeholder:"Text",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.localization.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,N)]))),128))]),_:1}),e.createVNode(n.default,{title:"Subcategories",placeholder:"No subcategories added yet",actions:[{label:"+",function:()=>l.state.current.subcategories.push({name:"",url:""})}],class:"mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.subcategories,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Subcategory name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.url,"onUpdate:field":a=>t.url=a,placeholder:"Subcategory",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.subcategories.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,k)]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Filters",placeholder:"No filters added yet",actions:[{label:"+",function:()=>l.state.current.filters.push({name:"",url:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.filters,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Filter name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.options,"onUpdate:field":a=>t.options=a,placeholder:"Filter options divided by ,",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.filters.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,V)]))),128))]),_:1},8,["actions"])],64))}};exports.default=y;
|
@@ -2,7 +2,7 @@ import { computed as h, openBlock as o, createElementBlock as c, Fragment as m,
|
|
2
2
|
import { useRoute as k, useRouter as v } from "vue-router";
|
3
3
|
import g from "../../../icons/navigation/IconDelete.vue.js";
|
4
4
|
import S from "../../../../components/Button/Button.vue2.js";
|
5
|
-
import E from "../../../../components/Select/Select.
|
5
|
+
import E from "../../../../components/Select/Select.vue2.js";
|
6
6
|
import i from "../../../../components/Field/Field.vue2.js";
|
7
7
|
import p from "../../../../components/Block/Block.vue.js";
|
8
8
|
import { actions as f, state as t } from "../../store/categories.js";
|
package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),w=require("../../../../components/Field/Field.vue2.cjs"),N=require("../../../../components/Feed/Feed.vue.cjs"),C=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),w=require("../../../../components/Field/Field.vue2.cjs"),N=require("../../../../components/Feed/Feed.vue.cjs"),C=require("../../../../components/Select/Select.vue2.cjs"),q=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const P=require("../blocks/CardPosition.vue.cjs"),x=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),p=require("../../../globals/store/globals.cjs"),V=require("../../../auth/store/auth.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const B={class:"pd-thin"},E={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},S={class:""},D={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},L={class:"gap-thin flex-v-center flex-nojustify flex"},R={class:"mn-r-auto"},F={__name:"EditLeftover",setup(O){const r=v.useRoute(),i=v.useRouter(),f=e.ref(m.state.all);e.ref(null);const b=e.computed(()=>Number(t.state.current.positions.reduce((a,s)=>Number(a)+Number(s.price),0))),c=e.ref(!1);function g(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{if(r.params.leftover)try{await t.actions.fetch(r.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const a=await m.actions.read({organization:r.params._id,limit:100});f.value=a}catch{console.error("error")}});function _(){r.params.leftover?t.actions.fetch(r.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){t.state.current.organization=r.params._id,r.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")):(t.state.current.creator={type:"user",target:V.state.user._id},t.state.current.owner={type:"organization",target:r.params._id},console.log("leftover state is",t.state.current),t.actions.create(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")))}function k(){t.actions.delete(r.params.leftover).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error"))}return(a,s)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("header",E,[e.createElementVNode("h2",S,e.toDisplayString(e.unref(r).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(C.default,{select:t.state.current.type,"onUpdate:select":s[0]||(s[0]=o=>t.state.current.type=o),options:["stock-in","stock-out"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(q.default,{title:"Add position",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:o=>m.actions.read(o),state:null},options:{organization:e.unref(r).params._id},class:""},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(n,l)=>(e.openBlock(),e.createBlock(x.default,{key:n._id,editable:!1,product:n,onClick:()=>{let u={...n};u.quantity=1,u.type="pcs",p.actions.add(t.state.current.positions,u),h()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(d.default,{title:"Invetory Sheet",actions:[{label:"+",function:()=>g()}],placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(o,n)=>(e.openBlock(),e.createBlock(P.default,{key:o._id,product:o,array:t.state.current.positions,products:f.value,onUpdate:l=>p.actions.update(t.state.current.positions,l,n),onDelete:l=>p.actions.delete(t.state.current.positions,l,n),class:"mn-b-small radius-medium bg-white pd-small"},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1},8,["actions"]),e.createVNode(d.default,{title:"Comment",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(w.default,{field:t.state.current.comment,"onUpdate:field":s[1]||(s[1]=o=>t.state.current.comment=o),label:"Comment",type:"textarea",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),_:1}),e.createVNode(d.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",L,[e.createElementVNode("h3",R," In total: "+e.toDisplayString(a.formatPrice(b.value)),1),e.createElementVNode("a",{onClick:s[2]||(s[2]=o=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:s[3]||(s[3]=o=>_())}," Reset "),e.unref(r).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s[4]||(s[4]=o=>k()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})]))}};exports.default=F;
|
@@ -2,8 +2,8 @@ import { ref as b, computed as z, onMounted as E, openBlock as l, createElementB
|
|
2
2
|
import v from "../../../../components/Block/Block.vue.js";
|
3
3
|
import B from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import F from "../../../../components/Feed/Feed.vue.js";
|
5
|
-
import I from "../../../../components/Select/Select.
|
6
|
-
import O from "../../../../components/Popup/Popup.
|
5
|
+
import I from "../../../../components/Select/Select.vue2.js";
|
6
|
+
import O from "../../../../components/Popup/Popup.vue2.js";
|
7
7
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
8
8
|
import V from "../blocks/CardPosition.vue.js";
|
9
9
|
import A from "../../../orders/components/blocks/CardOrderItem.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../../../components/Field/Field.vue2.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../../../components/Field/Field.vue2.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),y=require("../../../../components/EditImages/EditImages.vue.cjs"),b=require("../../../icons/navigation/IconDelete.vue.cjs"),q=require("../blocks/CardPosition.vue.cjs"),P=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),E=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const U={class:"for-transition w-100 cols-1 pd-thin gap-thin"},z={class:"mn-r-auto"},F={class:"cols-2 gap-thin"},I={key:0,class:"cols-1 gap-thin"},O={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},D={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},L={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},S={__name:"ProductEdit",setup(T){const l=k.useRoute(),f=k.useRouter(),g=e.ref(t.state.all),p=e.ref(!1);function N(s){p.value=!0}function i(){p.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),l.params.product&&await t.actions.read({_id:l.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const s=await t.actions.read({organization:l.params._id,limit:100});g.value=s}catch{console.error("error")}});function v(){l.params.product?t.actions.update(l.params.product,t.state.current):t.actions.create(l.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function h(){f.push({name:"Organization",params:{_id:l.params._id}})}return(s,c)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",z,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:h,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:h,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(y.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":c[0]||(c[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",F,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(E.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(q.default,{key:a._id,product:a,array:t.state.current.ingredients,products:g.value,showPrice:!1,onAdd:c[1]||(c[1]=r=>{u.actions.add(t.state.current.ingredients,r),i()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),i()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),i()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"]),e.createVNode(C.default,{title:"Add ingredient",onClosePopup:i,isPopupOpen:p.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(V.default,{search:{class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>t.actions.read(a),state:null},options:{organization:e.unref(l).params._id},class:""},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(n,r)=>(e.openBlock(),e.createBlock(P.default,{key:n._id,editable:!1,product:n,onClick:()=>{let m={...n};m.quantity=1,m.type="pcs",u.actions.add(t.state.current.ingredients,m),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(f).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,n)=>(e.openBlock(),e.createBlock(B.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":r=>t.state.current.category=r},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(b.default,{onClick:()=>t.state.current.information.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",L,[e.createVNode(b.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]))}};exports.default=S;
|
@@ -8,7 +8,7 @@ import "../../../../components/Tab/Tab.vue.js";
|
|
8
8
|
import v from "../../../../components/Field/Field.vue2.js";
|
9
9
|
import S from "../../../../components/Checkbox/Checkbox.vue.js";
|
10
10
|
import N from "../../../../components/Button/Button.vue2.js";
|
11
|
-
import T from "../../../../components/Popup/Popup.
|
11
|
+
import T from "../../../../components/Popup/Popup.vue2.js";
|
12
12
|
import A from "../../../../components/Feed/Feed.vue.js";
|
13
13
|
import L from "../../../../components/EditImages/EditImages.vue.js";
|
14
14
|
import D from "../../../icons/navigation/IconDelete.vue.js";
|