@ozdao/prometheus-framework 0.2.191 → 0.2.192
Sign up to get free protection for your applications and to get access to all the features.
- 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/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/globals/globals.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +23 -20
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +152 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProfile.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProfile.vue.js +28 -0
- 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 +1 -1
- 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 +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 +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 +1 -1
- 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/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 +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 +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.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 +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/globals/globals.client.js +5 -3
- package/src/modules/globals/views/components/partials/Header.vue +10 -8
package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.vue.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),w=require("../../../icons/entities/IconRecent.vue.cjs"),_=require("../../../icons/entities/IconFollowing.vue.cjs"),a=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),d=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-thin"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=m.useRoute(),s=m.useRouter();o.params.category==="popular"&&(a.state.sort.param="views"),o.params.category==="new"&&(a.state.sort.param="createdAt");const p=({membership:u,status:t,target:n},c,r)=>{k.mutations.handleMembershipUpdate(d.state.current,u,t,n,c,r)};return(u,t)=>{const n=e.resolveComponent("router-link"),c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:t[0]||(t[0]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"featured"}})})},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[1]||(t[1]=()=>{a.state.sort.param="views",e.unref(s).push({name:"Blog",params:{category:"popular"}})})},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[2]||(t[2]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"new"}})})},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),i.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[3]||(t[3]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"following"}})})},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(n,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h3",y,[B,e.createVNode(f.default,{options:["today","week","month","year","all time"],select:a.state.filter.period,"onUpdate:select":t[4]||(t[4]=r=>a.state.filter.period=r),placeholder:"all time",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(c,null,{default:e.withCtx(({Component:r,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:l.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,i.state.user._id?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:r=>d.actions.read(r),state:d.state},options:{user:i.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,l=>(e.openBlock(),e.createBlock(h.default,{key:l._id,organization:l,user:i.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { resolveComponent as x, openBlock as n, createElementBlock as h, createElementVNode as t, normalizeClass as u, unref as s, createVNode as r, createTextVNode as l, createCommentVNode as w, withCtx as m, Transition as y, createBlock as _, resolveDynamicComponent as C, Fragment as B, renderList as $ } from "vue";
|
2
2
|
import { useRoute as F, useRouter as z } from "vue-router";
|
3
|
-
import N from "../../../../components/Select/Select.
|
3
|
+
import N from "../../../../components/Select/Select.vue.js";
|
4
4
|
import P from "../../../../components/Feed/Feed.vue.js";
|
5
5
|
import A from "../../../organizations/components/blocks/CardOrganization.vue.js";
|
6
6
|
import M from "../../../icons/entities/IconFeatured.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/views/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-2fc13a78"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>n.read()),await s,c(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-2fc13a78"]]);exports.default=B;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { withAsyncContext as b, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
|
2
2
|
/* empty css */
|
3
3
|
import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
-
/* empty css
|
4
|
+
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
/* empty css */
|
7
7
|
import "axios";
|
package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.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");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
|
package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js
CHANGED
@@ -2,7 +2,7 @@ import { ref as s, openBlock as d, createElementBlock as h, createVNode as o, un
|
|
2
2
|
import { useRoute as j } from "vue-router";
|
3
3
|
/* empty css */
|
4
4
|
import I from "../../../../components/Button/Button.vue2.js";
|
5
|
-
/* empty css
|
5
|
+
/* empty css */
|
6
6
|
import G from "../../../../components/Chips/Chips.vue.js";
|
7
7
|
/* empty css */
|
8
8
|
import O from "../../../../components/Popup/Popup.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./views/localization/get-browser-locale.cjs"),P=require("./views/router/scrollBehavior.cjs"),a=require("./views/components/layouts/App.vue.cjs"),n=require("./views/components/layouts/Client.vue.cjs"),s=require("./views/components/partials/Header.vue.cjs"),u=require("./views/mixins/mixins.cjs"),i=require("./views/store/globals.cjs");function b(e,c,o,d={}){const l=d.route||"Home";e.config.globalProperties.DOMAIN_URL=process.env.DOMAIN_URL,e.config.globalProperties.API_URL=process.env.API_URL,e.config.globalProperties.MOBILE_APP=process.env.MOBILE_APP,e.config.globalProperties.FILE_SERVER_URL=process.env.FILE_SERVER_URL,e.config.globalProperties.GOOGLE_MAPS_API_KEY=process.env.GOOGLE_MAPS_API_KEY,e.mixin(u.globalMixins),o.beforeEach((f,m,r)=>{const t=f.params.locale;return t?e.config.globalProperties.$i18n.availableLocales.includes(t)?(e.config.globalProperties.$i18n.locale=t,r()):r({path:"/404"}):r()}),c.addStore("globals",i),o.addRoute(l,{path:"404",name:"notfound",component:()=>Promise.resolve().then(()=>require("./views/components/pages/404.vue.cjs"))}),o.addRoute(l,{path:"401",name:"unauthorized",component:()=>Promise.resolve().then(()=>require("./views/components/pages/401.vue.cjs"))}),o.addRoute(l,{path:":pathMatch(.*)*",name:"NotFound",redirect:{name:"notfound"}})}const _={initialize:b,views:{store:{storeGlobals:i},router:{},components:{layoutClient:n.default,layoutApp:a.default,Header:s.default}}};exports.getBrowserLocale=g.default;exports.scrollBehavior=P.default;exports.layoutApp=a.default;exports.layoutClient=n.default;exports.Header=s.default;exports.mixins=u;exports.storeGlobals=i;exports.default=_;
|
@@ -1,22 +1,23 @@
|
|
1
|
-
import { default as
|
2
|
-
import { default as
|
1
|
+
import { default as I } from "./views/localization/get-browser-locale.js";
|
2
|
+
import { default as M } from "./views/router/scrollBehavior.js";
|
3
3
|
import c from "./views/components/layouts/App.vue.js";
|
4
4
|
import m from "./views/components/layouts/Client.vue.js";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import * as
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
import f from "./views/components/partials/Header.vue.js";
|
6
|
+
import { globalMixins as p } from "./views/mixins/mixins.js";
|
7
|
+
import * as L from "./views/mixins/mixins.js";
|
8
|
+
import * as l from "./views/store/globals.js";
|
9
|
+
function _(o, i, e, s = {}) {
|
10
|
+
const r = s.route || "Home";
|
11
|
+
o.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL, o.config.globalProperties.API_URL = process.env.API_URL, o.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP, o.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL, o.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY, o.mixin(p), e.beforeEach((n, u, a) => {
|
12
|
+
const t = n.params.locale;
|
13
|
+
return t ? o.config.globalProperties.$i18n.availableLocales.includes(t) ? (o.config.globalProperties.$i18n.locale = t, a()) : a({ path: "/404" }) : a();
|
14
|
+
}), i.addStore("globals", l), e.addRoute(r, { path: "404", name: "notfound", component: () => import("./views/components/pages/404.vue.js") }), e.addRoute(r, { path: "401", name: "unauthorized", component: () => import("./views/components/pages/401.vue.js") }), e.addRoute(r, { path: ":pathMatch(.*)*", name: "NotFound", redirect: { name: "notfound" } });
|
14
15
|
}
|
15
|
-
const
|
16
|
-
initialize:
|
16
|
+
const E = {
|
17
|
+
initialize: _,
|
17
18
|
views: {
|
18
19
|
store: {
|
19
|
-
storeGlobals:
|
20
|
+
storeGlobals: l
|
20
21
|
},
|
21
22
|
router: {
|
22
23
|
// routerOrders
|
@@ -24,16 +25,18 @@ const b = {
|
|
24
25
|
components: {
|
25
26
|
// Pages
|
26
27
|
layoutClient: m,
|
27
|
-
layoutApp: c
|
28
|
+
layoutApp: c,
|
29
|
+
Header: f
|
28
30
|
}
|
29
31
|
}
|
30
32
|
};
|
31
33
|
export {
|
32
|
-
|
33
|
-
|
34
|
+
f as Header,
|
35
|
+
E as default,
|
36
|
+
I as getBrowserLocale,
|
34
37
|
c as layoutApp,
|
35
38
|
m as layoutClient,
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
+
L as mixins,
|
40
|
+
M as scrollBehavior,
|
41
|
+
l as storeGlobals
|
39
42
|
};
|
package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("vue-i18n"),l=require("../../store/globals.cjs"),b=require("../../../../orders/store/shopcart.cjs"),g=require("./Navigation.vue.cjs"),h=require("../../../../../components/Button/Button.vue2.cjs"),f=require("../../../../../components/Select/Select.vue.cjs"),k=require("../../../../../components/Checkbox/Checkbox.vue.cjs"),p=require("../../../../icons/entities/IconShopcart.vue.cjs"),w=require("../../../../icons/entities/IconProfile.vue.cjs");;/* empty css */const v={class:"i-small",fill:"inherit",xmlns:"http://www.w3.org/2000/svg",width:"50",height:"67",viewBox:"0 0 50 67"},C=e.createElementVNode("path",{d:"M25 0C11.207 0 0 11.207 0 25C0 38.793 20.832 66.668 25 66.668C29.168 66.668 50 38.793 50 25C50 11.207 38.793 0 25 0ZM25 33.332C20.418 33.332 16.668 29.582 16.668 25C16.668 20.418 20.418 16.668 25 16.668C29.582 16.668 33.332 20.418 33.332 25C33.332 29.582 29.582 33.332 25 33.332Z",fill:"inherit"},null,-1),N=[C],y={__name:"Header",props:{theme:{type:String,default:"light"},logotype:{type:Object}},setup(t){const n=t,i=u.useRouter();u.useRoute();const o=useStore();d.useI18n();function m(){l.state.isOpenLocationPopup=!0}return e.onMounted(()=>{b.actions.setShopcart()}),(s,a)=>{var c;return e.openBlock(),e.createElementBlock("header",{id:"header",class:e.normalizeClass(["pd-thin gap-micro flex-center flex-nowrap flex h-4r w-100 z-index-2",{"t-black bg-white":t.theme==="light","t-white bg-black":t.theme==="dark"}])},[e.createElementVNode("button",{"aria-label":"menu",onClick:a[0]||(a[0]=()=>l.state.isOpenSidebar=!l.state.isOpenSidebar),class:e.normalizeClass(["mobile-only menu-btn",{"menu-btn_active":l.state.isOpenSidebar}])},[e.createElementVNode("span",{class:e.normalizeClass(["no-events",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},[e.createElementVNode("span",{class:e.normalizeClass(["menu-btn__before",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},null,2),e.createElementVNode("span",{class:e.normalizeClass(["menu-btn__after",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},null,2)],2)],2),n.logotype?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.logotype),{key:0,onClick:a[1]||(a[1]=r=>e.unref(i).push({path:"/"})),theme:t.theme,class:"h-2r w-auto cursor-pointer"},null,8,["theme"])):e.createCommentVNode("",!0),e.createElementVNode("button",{"aria-label":"button_location",class:e.normalizeClass(["cursor-pointer bg-transp pd-l-micro pd-r-micro radius-extra uppercase t-semi br-solid br-2px transition-linear",{"fill-black br-black t-black hover-bg-black hover-t-white hover-fill-white":t.theme==="light","fill-white br-white t-white hover-bg-white hover-t-black hover-fill-black":t.theme==="dark"}]),onClick:a[2]||(a[2]=r=>m())},[(e.openBlock(),e.createElementBlock("svg",v,N)),e.createTextVNode(" "+e.toDisplayString((c=l.state.position)!=null&&c.country?l.state.position.country:"World"),1)],2),e.createVNode(g.default,{class:"mn-l-auto desktop-only"}),e.createVNode(k.default,{name:"darkmode",label:"Darkmode",radio:l.state.theme.darkmode,"onUpdate:radio":a[3]||(a[3]=r=>l.actions.toggleTheme()),class:e.normalizeClass(["mn-l-thin mn-r-auto desktop-only t-semi pd-micro br-2px br-solid radius-extra",{"br-light t-black":t.theme==="light","br-dark t-white":t.theme==="dark"}]),theme:t.theme},null,8,["radio","theme","class"]),e.createVNode(h.default,{"aria-label":"shopcart",submit:r=>e.unref(o).shopcart.actions.toggleShopcart(),counter:e.unref(o).shopcart.getters.cartTotalAmount,showSucces:!1,showLoader:!1,class:"pd-zero mn-l-auto mn-r-micro"},{default:e.withCtx(()=>[e.createVNode(p.default,{class:"i-semi",fill:t.theme==="light"?"rgb(var(--black))":"rgb(var(--white))"},null,8,["fill"])]),_:1},8,["submit","counter"]),e.createVNode(h.default,{"aria-label":"profile",class:"pd-zero bg-transp",submit:e.unref(o).auth.state.access.status===!1?r=>e.unref(i).push({name:"Sign In"}):r=>e.unref(i).push({name:"User Profile",params:{_id:e.unref(o).auth.state.user._id}}),showSucces:!1,showLoader:!1},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",fill:t.theme==="light"?"rgb(var(--black))":"rgb(var(--white))"},null,8,["fill"])]),_:1},8,["submit"]),e.createVNode(f.default,{select:s.$i18n.locale,"onUpdate:select":a[4]||(a[4]=r=>s.$i18n.locale=r),options:[{name:"🌎 En",value:"en"},{name:"🇷🇺 Ru",value:"ru"}],property:"value",class:e.normalizeClass(["pos-relative uppercase pd-micro t-semi radius-thin",{"bg-light t-black":t.theme==="light","bg-dark t-white":t.theme==="dark"}])},null,8,["select","class"])],2)}}};exports.default=y;
|
@@ -0,0 +1,152 @@
|
|
1
|
+
import { onMounted as k, openBlock as h, createElementBlock as d, normalizeClass as a, createElementVNode as n, createBlock as w, resolveDynamicComponent as v, unref as i, createCommentVNode as C, createTextVNode as y, toDisplayString as x, createVNode as o, withCtx as g } from "vue";
|
2
|
+
import { useRouter as S, useRoute as $ } from "vue-router";
|
3
|
+
import { useI18n as N } from "vue-i18n";
|
4
|
+
import { state as r, actions as O } from "../../store/globals.js";
|
5
|
+
import { actions as z } from "../../../../orders/store/shopcart.js";
|
6
|
+
import B from "./Navigation.vue.js";
|
7
|
+
import f from "../../../../../components/Button/Button.vue2.js";
|
8
|
+
import L from "../../../../../components/Select/Select.vue.js";
|
9
|
+
import V from "../../../../../components/Checkbox/Checkbox.vue.js";
|
10
|
+
import D from "../../../../icons/entities/IconShopcart.vue.js";
|
11
|
+
import E from "../../../../icons/entities/IconProfile.vue.js";
|
12
|
+
/* empty css */
|
13
|
+
const M = {
|
14
|
+
class: "i-small",
|
15
|
+
fill: "inherit",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
17
|
+
width: "50",
|
18
|
+
height: "67",
|
19
|
+
viewBox: "0 0 50 67"
|
20
|
+
}, P = /* @__PURE__ */ n("path", {
|
21
|
+
d: "M25 0C11.207 0 0 11.207 0 25C0 38.793 20.832 66.668 25 66.668C29.168 66.668 50 38.793 50 25C50 11.207 38.793 0 25 0ZM25 33.332C20.418 33.332 16.668 29.582 16.668 25C16.668 20.418 20.418 16.668 25 16.668C29.582 16.668 33.332 20.418 33.332 25C33.332 29.582 29.582 33.332 25 33.332Z",
|
22
|
+
fill: "inherit"
|
23
|
+
}, null, -1), R = [
|
24
|
+
P
|
25
|
+
], K = {
|
26
|
+
__name: "Header",
|
27
|
+
props: {
|
28
|
+
theme: {
|
29
|
+
type: String,
|
30
|
+
default: "light"
|
31
|
+
},
|
32
|
+
logotype: {
|
33
|
+
type: Object
|
34
|
+
}
|
35
|
+
},
|
36
|
+
setup(e) {
|
37
|
+
const c = e, m = S();
|
38
|
+
$();
|
39
|
+
const s = useStore();
|
40
|
+
N();
|
41
|
+
function p() {
|
42
|
+
r.isOpenLocationPopup = !0;
|
43
|
+
}
|
44
|
+
return k(() => {
|
45
|
+
z.setShopcart();
|
46
|
+
}), (u, t) => {
|
47
|
+
var b;
|
48
|
+
return h(), d("header", {
|
49
|
+
id: "header",
|
50
|
+
class: a(["pd-thin gap-micro flex-center flex-nowrap flex h-4r w-100 z-index-2", {
|
51
|
+
"t-black bg-white": e.theme === "light",
|
52
|
+
"t-white bg-black": e.theme === "dark"
|
53
|
+
}])
|
54
|
+
}, [
|
55
|
+
n("button", {
|
56
|
+
"aria-label": "menu",
|
57
|
+
onClick: t[0] || (t[0] = () => r.isOpenSidebar = !r.isOpenSidebar),
|
58
|
+
class: a(["mobile-only menu-btn", {
|
59
|
+
"menu-btn_active": r.isOpenSidebar
|
60
|
+
}])
|
61
|
+
}, [
|
62
|
+
n("span", {
|
63
|
+
class: a(["no-events", {
|
64
|
+
"bg-black": e.theme === "light",
|
65
|
+
"bg-white": e.theme === "dark"
|
66
|
+
}])
|
67
|
+
}, [
|
68
|
+
n("span", {
|
69
|
+
class: a(["menu-btn__before", { "bg-black": e.theme === "light", "bg-white": e.theme === "dark" }])
|
70
|
+
}, null, 2),
|
71
|
+
n("span", {
|
72
|
+
class: a(["menu-btn__after", { "bg-black": e.theme === "light", "bg-white": e.theme === "dark" }])
|
73
|
+
}, null, 2)
|
74
|
+
], 2)
|
75
|
+
], 2),
|
76
|
+
c.logotype ? (h(), w(v(c.logotype), {
|
77
|
+
key: 0,
|
78
|
+
onClick: t[1] || (t[1] = (l) => i(m).push({ path: "/" })),
|
79
|
+
theme: e.theme,
|
80
|
+
class: "h-2r w-auto cursor-pointer"
|
81
|
+
}, null, 8, ["theme"])) : C("", !0),
|
82
|
+
n("button", {
|
83
|
+
"aria-label": "button_location",
|
84
|
+
class: a(["cursor-pointer bg-transp pd-l-micro pd-r-micro radius-extra uppercase t-semi br-solid br-2px transition-linear", {
|
85
|
+
"fill-black br-black t-black hover-bg-black hover-t-white hover-fill-white": e.theme === "light",
|
86
|
+
"fill-white br-white t-white hover-bg-white hover-t-black hover-fill-black": e.theme === "dark"
|
87
|
+
}]),
|
88
|
+
onClick: t[2] || (t[2] = (l) => p())
|
89
|
+
}, [
|
90
|
+
(h(), d("svg", M, R)),
|
91
|
+
y(" " + x((b = r.position) != null && b.country ? r.position.country : "World"), 1)
|
92
|
+
], 2),
|
93
|
+
o(B, { class: "mn-l-auto desktop-only" }),
|
94
|
+
o(V, {
|
95
|
+
name: "darkmode",
|
96
|
+
label: "Darkmode",
|
97
|
+
radio: r.theme.darkmode,
|
98
|
+
"onUpdate:radio": t[3] || (t[3] = (l) => O.toggleTheme()),
|
99
|
+
class: a(["mn-l-thin mn-r-auto desktop-only t-semi pd-micro br-2px br-solid radius-extra", {
|
100
|
+
"br-light t-black": e.theme === "light",
|
101
|
+
"br-dark t-white": e.theme === "dark"
|
102
|
+
}]),
|
103
|
+
theme: e.theme
|
104
|
+
}, null, 8, ["radio", "theme", "class"]),
|
105
|
+
o(f, {
|
106
|
+
"aria-label": "shopcart",
|
107
|
+
submit: (l) => i(s).shopcart.actions.toggleShopcart(),
|
108
|
+
counter: i(s).shopcart.getters.cartTotalAmount,
|
109
|
+
showSucces: !1,
|
110
|
+
showLoader: !1,
|
111
|
+
class: "pd-zero mn-l-auto mn-r-micro"
|
112
|
+
}, {
|
113
|
+
default: g(() => [
|
114
|
+
o(D, {
|
115
|
+
class: "i-semi",
|
116
|
+
fill: e.theme === "light" ? "rgb(var(--black))" : "rgb(var(--white))"
|
117
|
+
}, null, 8, ["fill"])
|
118
|
+
]),
|
119
|
+
_: 1
|
120
|
+
}, 8, ["submit", "counter"]),
|
121
|
+
o(f, {
|
122
|
+
"aria-label": "profile",
|
123
|
+
class: "pd-zero bg-transp",
|
124
|
+
submit: i(s).auth.state.access.status === !1 ? (l) => i(m).push({ name: "Sign In" }) : (l) => i(m).push({ name: "User Profile", params: { _id: i(s).auth.state.user._id } }),
|
125
|
+
showSucces: !1,
|
126
|
+
showLoader: !1
|
127
|
+
}, {
|
128
|
+
default: g(() => [
|
129
|
+
o(E, {
|
130
|
+
class: "i-semi",
|
131
|
+
fill: e.theme === "light" ? "rgb(var(--black))" : "rgb(var(--white))"
|
132
|
+
}, null, 8, ["fill"])
|
133
|
+
]),
|
134
|
+
_: 1
|
135
|
+
}, 8, ["submit"]),
|
136
|
+
o(L, {
|
137
|
+
select: u.$i18n.locale,
|
138
|
+
"onUpdate:select": t[4] || (t[4] = (l) => u.$i18n.locale = l),
|
139
|
+
options: [{ name: "🌎 En", value: "en" }, { name: "🇷🇺 Ru", value: "ru" }],
|
140
|
+
property: "value",
|
141
|
+
class: a(["pos-relative uppercase pd-micro t-semi radius-thin", {
|
142
|
+
"bg-light t-black": e.theme === "light",
|
143
|
+
"bg-dark t-white": e.theme === "dark"
|
144
|
+
}])
|
145
|
+
}, null, 8, ["select", "class"])
|
146
|
+
], 2);
|
147
|
+
};
|
148
|
+
}
|
149
|
+
};
|
150
|
+
export {
|
151
|
+
K as default
|
152
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o=["fill"],r={__name:"IconProfile",props:{fill:{type:String,default:"rgb(var(--black))"}},setup(t){return(l,n)=>(e.openBlock(),e.createElementBlock("svg",s,[e.createElementVNode("path",{fill:t.fill,class:e.normalizeClass(l.$attrs.class),d:"M13.875 14.375H10.125C6.33594 14.375 3.25 17.4609 3.25 21.25C3.25 21.9531 3.79688 22.5 4.5 22.5H19.5C20.2031 22.5 20.75 21.9531 20.75 21.25C20.75 17.4609 17.6641 14.375 13.875 14.375ZM5.16406 20.625C5.47656 18.1641 7.58594 16.25 10.125 16.25H13.875C16.4141 16.25 18.5234 18.1641 18.8359 20.625H5.16406ZM12 12.5C14.7734 12.5 17 10.2734 17 7.5C17 4.72656 14.7734 2.5 12 2.5C9.22656 2.5 7 4.72656 7 7.5C7 10.2734 9.22656 12.5 12 12.5ZM12 4.375C13.7188 4.375 15.125 5.78125 15.125 7.5C15.125 9.21875 13.7188 10.625 12 10.625C10.2812 10.625 8.875 9.21875 8.875 7.5C8.875 5.78125 10.2812 4.375 12 4.375Z"},null,10,o)]))}};exports.default=r;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { openBlock as t, createElementBlock as o, createElementVNode as s, normalizeClass as n } from "vue";
|
2
|
+
const r = {
|
3
|
+
width: "24",
|
4
|
+
height: "24",
|
5
|
+
viewBox: "0 0 24 24",
|
6
|
+
fill: "none",
|
7
|
+
xmlns: "http://www.w3.org/2000/svg"
|
8
|
+
}, a = ["fill"], c = {
|
9
|
+
__name: "IconProfile",
|
10
|
+
props: {
|
11
|
+
fill: {
|
12
|
+
type: String,
|
13
|
+
default: "rgb(var(--black))"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
setup(e) {
|
17
|
+
return (l, i) => (t(), o("svg", r, [
|
18
|
+
s("path", {
|
19
|
+
fill: e.fill,
|
20
|
+
class: n(l.$attrs.class),
|
21
|
+
d: "M13.875 14.375H10.125C6.33594 14.375 3.25 17.4609 3.25 21.25C3.25 21.9531 3.79688 22.5 4.5 22.5H19.5C20.2031 22.5 20.75 21.9531 20.75 21.25C20.75 17.4609 17.6641 14.375 13.875 14.375ZM5.16406 20.625C5.47656 18.1641 7.58594 16.25 10.125 16.25H13.875C16.4141 16.25 18.5234 18.1641 18.8359 20.625H5.16406ZM12 12.5C14.7734 12.5 17 10.2734 17 7.5C17 4.72656 14.7734 2.5 12 2.5C9.22656 2.5 7 4.72656 7 7.5C7 10.2734 9.22656 12.5 12 12.5ZM12 4.375C13.7188 4.375 15.125 5.78125 15.125 7.5C15.125 9.21875 13.7188 10.625 12 10.625C10.2812 10.625 8.875 9.21875 8.875 7.5C8.875 5.78125 10.2812 4.375 12 4.375Z"
|
22
|
+
}, null, 10, a)
|
23
|
+
]));
|
24
|
+
}
|
25
|
+
};
|
26
|
+
export {
|
27
|
+
c as default
|
28
|
+
};
|
package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router");;/* empty css */const P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router");;/* empty css */const P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");;/* empty css */;/* empty css */const C=require("../../../users/components/blocks/CardUser.vue.cjs"),V=require("../sections/FormAddCustomer.vue.cjs"),O=require("../sections/FormDelivery.vue.cjs"),E=require("../sections/FormPayment.vue.cjs"),l=require("../../../globals/views/store/globals.cjs"),F=require("../../../auth/views/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");;/* empty css */const R={class:"h-100 flex flex-column pd-thin"},T={class:"flex-v-center flex-nowrap flex"},A=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),I=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),z={class:"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=f.useRoute(),g=f.useRouter();t.mutations.resetOrder(t.state.current);let v=e.computed(()=>Number(t.state.current.positions.reduce((d,n)=>d+n.price*n.quantity,0)));const s=e.ref("positions"),c=e.ref(!1);function y(){c.value=!0}function m(){c.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"User",target:F.state.user._id},t.state.current.owner={type:"Organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function x(){g.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(()=>{}),(d,n)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(P.default,{submit:w,callback:x,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(q.default,{selected:s.value,"onUpdate:selected":n[0]||(n[0]=r=>s.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-light mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let h={...o};h.quantity=1,l.actions.add(t.state.current.positions,h),m()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),s.value==="positions"?(e.openBlock(),e.createBlock(u.default,{key:0,title:"Positions",actions:[{label:"+",function:()=>y()}],class:"mn-b-small"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",L," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{l.actions.increment(t.state.current.positions,r)},onDecrease:()=>{l.actions.decrement(t.state.current.positions,r)},onRemove:()=>{l.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:n[1]||(n[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name"])):(e.openBlock(),e.createBlock(b.default,{key:1,search:{placeholder:"Search customer...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>e.unref(D.default).read(r),state:null},options:{owner:e.unref(a).params._id},class:"bg-light h-max-20r o-scroll"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),s.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(v))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;
|
package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js
CHANGED
@@ -7,7 +7,7 @@ import O from "../../../../components/Popup/Popup.vue.js";
|
|
7
7
|
import h from "../../../../components/Block/Block.vue.js";
|
8
8
|
import $ from "../../../../components/Feed/Feed.vue.js";
|
9
9
|
import N from "../blocks/CardOrderItem.vue.js";
|
10
|
-
/* empty css
|
10
|
+
/* empty css */
|
11
11
|
/* empty css */
|
12
12
|
import B from "../../../users/components/blocks/CardUser.vue.js";
|
13
13
|
import H from "../sections/FormAddCustomer.vue.js";
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const b=require("../../../../components/FieldPhone/click-outside.cjs");;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const b=require("../../../../components/FieldPhone/click-outside.cjs");;/* empty css */const g=require("../../../../components/Feed/Feed.vue.cjs"),v=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../globals/views/components/blocks/BlockSearch.vue.cjs"),n=require("../../../users/components/blocks/CardUser.vue.cjs"),q=require("./FormCustomerDetails.vue.cjs"),_=require("../../../users/store/users.cjs"),w=require("../../../auth/views/store/auth.cjs"),B=require("../../../globals/views/store/globals.cjs"),y=require("../../store/customers.store.cjs"),x=require("../../store/models/customer.cjs"),E={key:2,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={__name:"FormAddCustomer",props:{order:Object},emits:["callbackCustomer"],setup(V,{emit:i}){let c=b.default;const d=i,m=h.useRoute();let r=e.ref(x.default),u=e.ref(null),l=e.ref(!1);async function f(){let a={identity:{type:r.value.user?"User":"Visitor",target:r.value.user?r.value.user._id:null},owner:{type:"Organization",target:m.params._id},creator:{type:"User",target:w.state.user._id},phone:r.value.phone,email:r.value.email,profile:r.value.profile,socials:r.value.socials};try{let o=await y.default.create(a);r.value=o}catch(o){console.log(o)}}function p(){d("callbackCustomer",r.value)}return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k.default,{class:"pos-relative mn-b-thin"},{default:e.withCtx(()=>[e.unref(r).user?(e.openBlock(),e.createBlock(n.default,{key:1,user:e.unref(r).user,photo:e.unref(r).user.profile.photo,name:e.unref(r).user.profile.name||e.unref(r).user.phone||e.unref(r).user.email,onClick:o[1]||(o[1]=()=>{e.unref(r).user=null}),class:"bg-white h-2r pd-thin radius-medium w-100"},null,8,["user","photo","name"])):e.withDirectives((e.openBlock(),e.createBlock(C.default,{key:0,onSearch:o[0]||(o[0]=s=>{e.isRef(u)?u.value=s:u=s,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-white"},null,512)),[[e.unref(c),()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(u)&&e.unref(l)&&!e.unref(r).user?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(g.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:s=>_.actions.read(s),state:null},options:{search:e.unref(u)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(t,F)=>(e.openBlock(),e.createBlock(n.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{e.unref(r).user=t,e.unref(r).profile=t.profile,e.unref(r).phone=t.phone,e.unref(r).email=t.email,e.unref(r).socials=t.socials},class:"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(q.default,{customer:e.unref(r),class:"mn-b-thin bg-light"},null,8,["customer"]),e.createVNode(v.default,{submit:f,callback:p,onError:e.unref(B.setError),class:"w-100 pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Customer ")]),_:1},8,["onError"])],64))}};exports.default=N;
|
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
|
/* empty css */
|
5
5
|
import O from "../../../../components/FieldPhone/click-outside.js";
|
6
|
-
/* empty css
|
6
|
+
/* empty css */
|
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/views/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.vue.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 o, openBlock as m, createBlock as i, withCtx as u, createVNode a
|
|
2
2
|
import p from "../../../../components/Block/Block.vue.js";
|
3
3
|
import r from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import c from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import g from "../../../../components/Select/Select.
|
5
|
+
import g from "../../../../components/Select/Select.vue.js";
|
6
6
|
const h = { 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.vue.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.vue.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");;/* empty css */const P=require("../../../../components/UploadImage/UploadImage.vue.cjs");;/* empty css */const u=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const r=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");;/* empty css */;/* empty css */;/* empty css */const f=require("../../../../components/Button/Button.vue2.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),D=require("../../../icons/navigation/IconDelete.vue.cjs");;/* empty css */;/* empty css */const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/views/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),U={class:"for-transition pd-thin w-100"},C={class:"mn-b-thin flex-nowrap flex bg-light 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-light 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-light pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),H=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,"Gallery",-1),Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X=e.createElementVNode("h4",null,"Departments",-1),Y={__name:"DepartmentEdit",setup(Z){const N=c.useRouter(),d=c.useRoute();async function V(){e.ref(w.state.memberships),d.params.department&&await t.actions.readOne(d.params.department)}V();const n=e.ref(!1),_=e.ref(null);function y(o){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function k(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function E(){N.push({name:"Organization Members",params:{_id:d.params._id}})}async function v(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(d.params._id,t.state.department)}function q(o){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:o.user._id})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",C,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(d).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:v,callback:o.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:k,callback:E,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(P.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),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":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>y()}],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,(s,l)=>(e.openBlock(),e.createBlock(b.default,{class:"h-4r bg-white pd-thin radius-medium w-100",key:l,user:s.user,photo:s.user.profile.photo,name:s.user.profile.name||s.user.phone||s.user.email||s.user._id,position:s.position,action:{label:{is:D.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>q(s)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(x.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(B.default,{search:{placeholder:"Search customer...",class:"bg-light mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:s=>w.actions.read(s),state:null},options:{target:e.unref(d).params._id},class:"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(l,$)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:l._id,user:l.user,photo:(m=l.user.profile)==null?void 0:m.photo,name:((p=l.user.profile)==null?void 0:p.name)||l.user.phone||l.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:l.user._id,user:l.user,position:"Member"}),i()},class:"h-4r 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(r.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":a[3]||(a[3]=s=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[G,H,e.createElementVNode("div",J,[K,e.createVNode(r.default,{label:"Read gallery",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.read,"onUpdate:radio":a[4]||(a[4]=s=>t.state.department.accesses.gallery.read=!t.state.department.accesses.gallery.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit gallery",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.edit,"onUpdate:radio":a[5]||(a[5]=s=>t.state.department.accesses.gallery.edit=!t.state.department.accesses.gallery.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete gallery",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.delete,"onUpdate:radio":a[6]||(a[6]=s=>t.state.department.accesses.gallery.delete=!t.state.department.accesses.gallery.delete)},null,8,["radio"]),Q,e.createVNode(r.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":a[7]||(a[7]=s=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(r.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":a[8]||(a[8]=s=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":a[9]||(a[9]=s=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),W,e.createVNode(r.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":a[10]||(a[10]=s=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(r.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":a[11]||(a[11]=s=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":a[12]||(a[12]=s=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),X,e.createVNode(r.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":a[13]||(a[13]=s=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(r.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":a[14]||(a[14]=s=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":a[15]||(a[15]=s=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=Y;
|
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");;/* empty css */const P=require("../../../../components/UploadImage/UploadImage.vue.cjs");;/* empty css */const u=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const r=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");;/* empty css */;/* empty css */;/* empty css */const f=require("../../../../components/Button/Button.vue2.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),D=require("../../../icons/navigation/IconDelete.vue.cjs");;/* empty css */;/* empty css */const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/views/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),U={class:"for-transition pd-thin w-100"},C={class:"mn-b-thin flex-nowrap flex bg-light 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-light 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-light pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),H=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,"Gallery",-1),Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X=e.createElementVNode("h4",null,"Departments",-1),Y={__name:"DepartmentEdit",setup(Z){const N=c.useRouter(),d=c.useRoute();async function V(){e.ref(w.state.memberships),d.params.department&&await t.actions.readOne(d.params.department)}V();const n=e.ref(!1),_=e.ref(null);function y(o){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function k(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function E(){N.push({name:"Organization Members",params:{_id:d.params._id}})}async function v(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(d.params._id,t.state.department)}function q(o){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:o.user._id})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",C,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(d).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:v,callback:o.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:k,callback:E,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(P.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),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":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>y()}],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,(s,l)=>(e.openBlock(),e.createBlock(b.default,{class:"h-4r bg-white pd-thin radius-medium w-100",key:l,user:s.user,photo:s.user.profile.photo,name:s.user.profile.name||s.user.phone||s.user.email||s.user._id,position:s.position,action:{label:{is:D.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>q(s)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(x.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(B.default,{search:{placeholder:"Search customer...",class:"bg-light mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:s=>w.actions.read(s),state:null},options:{target:e.unref(d).params._id},class:"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(l,$)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:l._id,user:l.user,photo:(m=l.user.profile)==null?void 0:m.photo,name:((p=l.user.profile)==null?void 0:p.name)||l.user.phone||l.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:l.user._id,user:l.user,position:"Member"}),i()},class:"h-4r 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(r.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":a[3]||(a[3]=s=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[G,H,e.createElementVNode("div",J,[K,e.createVNode(r.default,{label:"Read gallery",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.read,"onUpdate:radio":a[4]||(a[4]=s=>t.state.department.accesses.gallery.read=!t.state.department.accesses.gallery.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit gallery",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.edit,"onUpdate:radio":a[5]||(a[5]=s=>t.state.department.accesses.gallery.edit=!t.state.department.accesses.gallery.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete gallery",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.delete,"onUpdate:radio":a[6]||(a[6]=s=>t.state.department.accesses.gallery.delete=!t.state.department.accesses.gallery.delete)},null,8,["radio"]),Q,e.createVNode(r.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":a[7]||(a[7]=s=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(r.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":a[8]||(a[8]=s=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":a[9]||(a[9]=s=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),W,e.createVNode(r.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":a[10]||(a[10]=s=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(r.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":a[11]||(a[11]=s=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":a[12]||(a[12]=s=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),X,e.createVNode(r.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":a[13]||(a[13]=s=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(r.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":a[14]||(a[14]=s=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":a[15]||(a[15]=s=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=Y;
|