@ozdao/prometheus-framework 0.2.97 → 0.2.98

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  2. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
  3. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
  5. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
  7. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
  9. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +36 -1
  11. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -36
  13. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  31. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  32. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  35. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  41. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  53. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  77. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  85. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  89. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  95. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  103. package/dist/style.css +1 -1
  104. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),c=require("../../../../components/Tab/Tab.vue2.cjs"),u=require("../sections/Feed.vue.cjs"),n=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},b={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),_={__name:"Organizations",setup(p){const t=l.useRoute(),d=l.useRouter();let i=t.query.tab?t.query.tab:"owner";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,o=>{d.replace({query:{...t.query,tab:o}})}),(o,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",b,[f,e.createElementVNode("button",{onClick:a[0]||(a[0]=s=>o.$router.push({name:"Create Organization"})),class:"bg-second radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(c.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=s=>r.value=s),tabs:[{name:"Owner",value:"owner"},{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-b-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="owner"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.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==="member"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.state.user._id,member:e.unref(t).params._id},null,8,["user","member"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),c=require("../../../../components/Tab/Tab.vue.cjs"),u=require("../sections/Feed.vue.cjs"),n=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},b={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),_={__name:"Organizations",setup(p){const t=l.useRoute(),d=l.useRouter();let i=t.query.tab?t.query.tab:"owner";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,o=>{d.replace({query:{...t.query,tab:o}})}),(o,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",b,[f,e.createElementVNode("button",{onClick:a[0]||(a[0]=s=>o.$router.push({name:"Create Organization"})),class:"bg-second radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(c.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=s=>r.value=s),tabs:[{name:"Owner",value:"owner"},{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-b-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="owner"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.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==="member"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.state.user._id,member:e.unref(t).params._id},null,8,["user","member"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as v, watch as w, openBlock as a, createElementBlock as h, createElementVNode as b, createVNode as s, Transition as n, withCtx as u, createBlock as l, unref as m, createCommentVNode as i } from "vue";
2
2
  import { useRoute as g, useRouter as y } from "vue-router";
3
- import k from "../../../../components/Tab/Tab.vue2.js";
3
+ import k from "../../../../components/Tab/Tab.vue.js";
4
4
  import d from "../sections/Feed.vue.js";
5
5
  import { state as c } from "../../../auth/store/auth.js";
6
6
  const q = { class: "pd-thin" }, x = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, C = /* @__PURE__ */ b("h2", { class: "mn-r-medium" }, "Groups", -1), E = {
@@ -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.vue.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Loader/Loader.vue.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Button/Button.vue2.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;
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.vue.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.vue2.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;
@@ -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.vue.js";
4
4
  import "vue-i18n";
5
- import "../../../../components/Popup/Popup.vue2.js";
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.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const m=require("../../../../components/Button/Button.vue.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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const m=require("../../../../components/Button/Button.vue.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;
@@ -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.vue.js";
3
- import "../../../../components/Select/Select.vue2.js";
3
+ import "../../../../components/Select/Select.vue.js";
4
4
  import x from "../../../../components/Button/Button.vue.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.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.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.vue2.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),b=require("../blocks/EmptyState.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let p=n.query.tab?n.query.tab:"details";const i=e.ref(p);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(b.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(m.default,{key:l._id,organization:l,user:q.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.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;
@@ -1,9 +1,9 @@
1
1
  import { ref as m, withAsyncContext as b, watch as _, openBlock as t, createElementBlock as i, createElementVNode as f, createBlock as p, Fragment as g, renderList as h, normalizeClass as w } from "vue";
2
2
  import { useRouter as v, useRoute as z } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
4
- import "../../../../components/Tab/Tab.vue.js";
4
+ import "../../../../components/Tab/Tab.vue2.js";
5
5
  import "../../../../components/Field/Field.vue2.js";
6
- import "../../../../components/Select/Select.vue2.js";
6
+ import "../../../../components/Select/Select.vue.js";
7
7
  import "../../../../components/Loader/Loader.vue.js";
8
8
  import "../../../../components/Button/Button.vue2.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.vue2.js";
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";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Select/Select.vue.cjs"),y=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../icons/navigation/IconAdd.vue.cjs"),V=require("../../../icons/navigation/IconDelete.vue.cjs"),k={class:"gap-thin"},h={class:"gap-thin mn-b-thin flex-nowrap flex"},q=["disabled"],w={class:"gap-thin flex-nowrap flex"},x={__name:"CardPosition",props:{product:Object,array:Array,products:Array},emits:["add","delete","update"],setup(s,{emit:i}){const t=s,c=i,l=e.ref(null),a=e.ref(1),r=e.ref("pcs"),u=e.ref(0),p=e.computed(()=>l.value&&a.value>0&&u.value>0);e.watch(t.array,()=>{l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,r.value=t.product.type}),t.product&&(l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,r.value=t.product.type),e.watch([l,a,u,r],()=>{c("update",{...l.value,price:u.value,quantity:a.value||1,type:r.value})});function m(){c("add",{...l.value,price:u.value,quantity:a.value||1,type:r.value})}function v(){c("delete",{...l.value,price:u.value,quantity:a.value||1,type:r.value})}return(b,d)=>(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",h,[e.createVNode(y.default,{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=o=>l.value=o),options:s.products,label:"name",multiple:!1,taggable:!1,placeholder:"Select a product",class:"bg-white br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["modelValue","options"]),s.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!p.value,onClick:m,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(g.default),{class:"i-semi"})],8,q)),s.product?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(V.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]),e.createElementVNode("div",w,[e.createVNode(n.default,{field:u.value,"onUpdate:field":d[1]||(d[1]=o=>u.value=o),type:"number",label:"Price",symbol:b.returnCurrency(),class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(n.default,{field:a.value,"onUpdate:field":d[3]||(d[3]=o=>a.value=o),type:"number",label:"Qty",class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(f.default,{select:r.value,"onUpdate:select":d[2]||(d[2]=o=>r.value=o),options:["pcs","g","ml"],class:"bg-grey pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])])]))}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Select/Select.vue2.cjs"),y=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../icons/navigation/IconAdd.vue.cjs"),V=require("../../../icons/navigation/IconDelete.vue.cjs"),k={class:"gap-thin"},h={class:"gap-thin mn-b-thin flex-nowrap flex"},q=["disabled"],w={class:"gap-thin flex-nowrap flex"},x={__name:"CardPosition",props:{product:Object,array:Array,products:Array},emits:["add","delete","update"],setup(s,{emit:i}){const t=s,c=i,l=e.ref(null),a=e.ref(1),r=e.ref("pcs"),u=e.ref(0),p=e.computed(()=>l.value&&a.value>0&&u.value>0);e.watch(t.array,()=>{l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,r.value=t.product.type}),t.product&&(l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,r.value=t.product.type),e.watch([l,a,u,r],()=>{c("update",{...l.value,price:u.value,quantity:a.value||1,type:r.value})});function m(){c("add",{...l.value,price:u.value,quantity:a.value||1,type:r.value})}function v(){c("delete",{...l.value,price:u.value,quantity:a.value||1,type:r.value})}return(b,d)=>(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",h,[e.createVNode(y.default,{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=o=>l.value=o),options:s.products,label:"name",multiple:!1,taggable:!1,placeholder:"Select a product",class:"bg-white br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["modelValue","options"]),s.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!p.value,onClick:m,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(g.default),{class:"i-semi"})],8,q)),s.product?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(V.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]),e.createElementVNode("div",w,[e.createVNode(n.default,{field:u.value,"onUpdate:field":d[1]||(d[1]=o=>u.value=o),type:"number",label:"Price",symbol:b.returnCurrency(),class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(n.default,{field:a.value,"onUpdate:field":d[3]||(d[3]=o=>a.value=o),type:"number",label:"Qty",class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(f.default,{select:r.value,"onUpdate:select":d[2]||(d[2]=o=>r.value=o),options:["pcs","g","ml"],class:"bg-grey pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])])]))}};exports.default=x;
@@ -1,6 +1,6 @@
1
1
  import { ref as i, computed as V, watch as m, openBlock as n, createElementBlock as c, createElementVNode as v, createVNode as s, unref as b, createCommentVNode as f, withCtx as C } from "vue";
2
2
  import y from "../../../../components/Field/Field.vue.js";
3
- import P from "../../../../components/Select/Select.vue.js";
3
+ import P from "../../../../components/Select/Select.vue2.js";
4
4
  import q from "../../../../components/SelectMulti/SelectMulti.vue.js";
5
5
  import S from "../../../icons/navigation/IconAdd.vue.js";
6
6
  import U from "../../../icons/navigation/IconDelete.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.vue.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;
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;
@@ -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.vue.js";
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";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Select/Select.vue.cjs"),d=require("../../../../components/Field/Field.vue.cjs"),n=require("../../../../components/Block/Block.vue.cjs"),l=require("../../store/categories.cjs");require("./CategoryEdit.vue2.cjs");const b={class:"mn-r-auto"},h={class:"mn-b-medium w-100 flex-nowrap gap-thin flex"},w={class:"flex-v-center flex-nowrap flex"},x=e.createElementVNode("h4",{class:"mn-r-thin t-medium"},"Localization",-1),N=["onClick"],k=["onClick"],V=["onClick"],y={__name:"CategoryEdit",setup(C){const o=c.useRoute(),u=c.useRouter();o.params.category?l.actions.fetchCategory(o.params.category):l.actions.resetCategory(),e.computed(()=>l.state.current),e.computed(()=>o.name);function m(){o.params.category?l.actions.updateCategory(o.params.category):l.actions.addCategory()}function p(){u.push({name:"Categories Organization",params:{_id:o.params._id}})}return(_,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(n.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",b,e.toDisplayString(e.unref(o).params.category?"Edit Category":"Add Category"),1),e.createVNode(f.default,{submit:m,callback:p,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Save Category ")]),_:1})]),_:1}),e.createVNode(n.default,{title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",h,[e.createVNode(d.default,{field:l.state.current.order,"onUpdate:field":r[0]||(r[0]=t=>l.state.current.order=t),label:"Order",disabled:!0,class:"w-25 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.url,"onUpdate:field":r[1]||(r[1]=t=>l.state.current.url=t),label:"URL",placeholder:"Enter category URL",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.name,"onUpdate:field":r[2]||(r[2]=t=>l.state.current.name=t),label:"Name",placeholder:"Enter category name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),e.createVNode(g.default,{select:l.state.current.status,"onUpdate:select":r[3]||(r[3]=t=>l.state.current.status=t),label:"Status",options:["draft","internal","published","removed"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),e.createElementVNode("div",w,[x,e.createElementVNode("button",{onClick:r[4]||(r[4]=()=>l.state.current.localization.push({locale:"",text:""})),class:"i-small pd-thin button-delete button"}," + ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.localization,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.locale,"onUpdate:field":a=>t.locale=a,placeholder:"Locale",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.text,"onUpdate:field":a=>t.text=a,placeholder:"Text",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.localization.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,N)]))),128))]),_:1}),e.createVNode(n.default,{title:"Subcategories",placeholder:"No subcategories added yet",actions:[{label:"+",function:()=>l.state.current.subcategories.push({name:"",url:""})}],class:"mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.subcategories,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Subcategory name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.url,"onUpdate:field":a=>t.url=a,placeholder:"Subcategory",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.subcategories.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,k)]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Filters",placeholder:"No filters added yet",actions:[{label:"+",function:()=>l.state.current.filters.push({name:"",url:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.filters,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Filter name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.options,"onUpdate:field":a=>t.options=a,placeholder:"Filter options divided by ,",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.filters.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,V)]))),128))]),_:1},8,["actions"])],64))}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Select/Select.vue2.cjs"),d=require("../../../../components/Field/Field.vue.cjs"),n=require("../../../../components/Block/Block.vue.cjs"),l=require("../../store/categories.cjs");require("./CategoryEdit.vue2.cjs");const b={class:"mn-r-auto"},h={class:"mn-b-medium w-100 flex-nowrap gap-thin flex"},w={class:"flex-v-center flex-nowrap flex"},x=e.createElementVNode("h4",{class:"mn-r-thin t-medium"},"Localization",-1),N=["onClick"],k=["onClick"],V=["onClick"],y={__name:"CategoryEdit",setup(C){const o=c.useRoute(),u=c.useRouter();o.params.category?l.actions.fetchCategory(o.params.category):l.actions.resetCategory(),e.computed(()=>l.state.current),e.computed(()=>o.name);function m(){o.params.category?l.actions.updateCategory(o.params.category):l.actions.addCategory()}function p(){u.push({name:"Categories Organization",params:{_id:o.params._id}})}return(_,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(n.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",b,e.toDisplayString(e.unref(o).params.category?"Edit Category":"Add Category"),1),e.createVNode(f.default,{submit:m,callback:p,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Save Category ")]),_:1})]),_:1}),e.createVNode(n.default,{title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",h,[e.createVNode(d.default,{field:l.state.current.order,"onUpdate:field":r[0]||(r[0]=t=>l.state.current.order=t),label:"Order",disabled:!0,class:"w-25 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.url,"onUpdate:field":r[1]||(r[1]=t=>l.state.current.url=t),label:"URL",placeholder:"Enter category URL",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.name,"onUpdate:field":r[2]||(r[2]=t=>l.state.current.name=t),label:"Name",placeholder:"Enter category name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),e.createVNode(g.default,{select:l.state.current.status,"onUpdate:select":r[3]||(r[3]=t=>l.state.current.status=t),label:"Status",options:["draft","internal","published","removed"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),e.createElementVNode("div",w,[x,e.createElementVNode("button",{onClick:r[4]||(r[4]=()=>l.state.current.localization.push({locale:"",text:""})),class:"i-small pd-thin button-delete button"}," + ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.localization,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.locale,"onUpdate:field":a=>t.locale=a,placeholder:"Locale",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.text,"onUpdate:field":a=>t.text=a,placeholder:"Text",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.localization.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,N)]))),128))]),_:1}),e.createVNode(n.default,{title:"Subcategories",placeholder:"No subcategories added yet",actions:[{label:"+",function:()=>l.state.current.subcategories.push({name:"",url:""})}],class:"mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.subcategories,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Subcategory name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.url,"onUpdate:field":a=>t.url=a,placeholder:"Subcategory",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.subcategories.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,k)]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Filters",placeholder:"No filters added yet",actions:[{label:"+",function:()=>l.state.current.filters.push({name:"",url:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.filters,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Filter name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.options,"onUpdate:field":a=>t.options=a,placeholder:"Filter options divided by ,",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.filters.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,V)]))),128))]),_:1},8,["actions"])],64))}};exports.default=y;
@@ -2,7 +2,7 @@ import { computed as h, openBlock as o, createElementBlock as c, Fragment as m,
2
2
  import { useRoute as k, useRouter as v } from "vue-router";
3
3
  import g from "../../../icons/navigation/IconDelete.vue.js";
4
4
  import S from "../../../../components/Button/Button.vue.js";
5
- import E from "../../../../components/Select/Select.vue.js";
5
+ import E from "../../../../components/Select/Select.vue2.js";
6
6
  import i from "../../../../components/Field/Field.vue.js";
7
7
  import p from "../../../../components/Block/Block.vue.js";
8
8
  import { actions as f, state as t } from "../../store/categories.js";
@@ -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"),N=require("../../../../components/Field/Field.vue.cjs"),w=require("../../../../components/Feed/Feed.vue.cjs"),C=require("../../../../components/Select/Select.vue.cjs"),q=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const P=require("../blocks/CardPosition.vue.cjs"),V=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),p=require("../../../globals/store/globals.cjs"),x=require("../../../auth/store/auth.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const E={class:"pd-thin"},B={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},S={class:""},D=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),L={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},R={class:"gap-thin flex-v-center flex-nojustify flex"},F={class:"mn-r-auto"},O={__name:"EditLeftover",setup(z){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 _(){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 g(){r.params.leftover?t.actions.fetch(r.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){t.state.current.organization=r.params._id,r.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")):(t.state.current.creator={type:"user",target:x.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",E,[e.createElementVNode("header",B,[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(()=>[D,e.createElementVNode("div",L,[e.createVNode(w.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(V.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:()=>_()}],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(N.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",R,[e.createElementVNode("h3",F," 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=>g())}," 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=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),N=require("../../../../components/Field/Field.vue.cjs"),w=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"),V=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),p=require("../../../globals/store/globals.cjs"),x=require("../../../auth/store/auth.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const E={class:"pd-thin"},B={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},S={class:""},D=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),L={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},R={class:"gap-thin flex-v-center flex-nojustify flex"},F={class:"mn-r-auto"},O={__name:"EditLeftover",setup(z){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 _(){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 g(){r.params.leftover?t.actions.fetch(r.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){t.state.current.organization=r.params._id,r.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")):(t.state.current.creator={type:"user",target:x.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",E,[e.createElementVNode("header",B,[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(()=>[D,e.createElementVNode("div",L,[e.createVNode(w.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(V.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:()=>_()}],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(N.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",R,[e.createElementVNode("h3",F," 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=>g())}," 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=O;
@@ -2,8 +2,8 @@ import { ref as h, computed as z, onMounted as E, openBlock as l, createElementB
2
2
  import v from "../../../../components/Block/Block.vue.js";
3
3
  import A from "../../../../components/Field/Field.vue.js";
4
4
  import B from "../../../../components/Feed/Feed.vue.js";
5
- import F from "../../../../components/Select/Select.vue.js";
6
- import I from "../../../../components/Popup/Popup.vue.js";
5
+ import F from "../../../../components/Select/Select.vue2.js";
6
+ import I from "../../../../components/Popup/Popup.vue2.js";
7
7
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
8
8
  import O from "../blocks/CardPosition.vue.js";
9
9
  import V 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"),a=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Feed/Feed.vue.cjs"),p=require("../blocks/CardLeftover.vue.cjs"),u=require("../../store/leftovers.cjs");require("./Leftovers.vue2.cjs");const v={class:"pd-thin"},f={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Inventory",-1),h={class:"mn-b-semi pd-medium bg-grey radius-big"},_=e.createElementVNode("p",{class:"mn-b-thin"},"Balance:",-1),g={__name:"Leftovers",setup(k){const l=a.useRoute();a.useRouter();const s=e.ref(l.query.tab?l.query.tab:"all"),c=e.computed(()=>u.state.all.reduce((o,r)=>{const t=r.positions.reduce((n,i)=>n+i.price,0);return r.type==="stock-in"?o-t:r.type==="stock-out"?o+t:o},0));return(o,r)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("header",f,[b,e.createElementVNode("button",{onClick:r[0]||(r[0]=t=>o.$router.push({name:"LeftoverAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createElementVNode("section",h,[_,e.createElementVNode("h3",null,e.toDisplayString(o.formatPrice(c.value)),1)]),e.createVNode(d.default,{selected:s.value,"onUpdate:selected":r[1]||(r[1]=t=>s.value=t),tabs:[{name:"All",value:"all"},{name:"Stock-In",value:"stock-in"},{name:"Stock-Out",value:"stock-out"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(m.default,{search:!0,states:{empty:{title:"No Leftovers Found",description:"Currently, there are no leftovers available."}},store:{read:t=>u.actions.read(t)},options:{limit:15,owner:e.unref(l).params._id,...s.value!=="all"&&{type:s.value}}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(p.default,{leftover:n,class:"bg-grey pd-small mn-b-thin radius-small"},null,8,["leftover"]))),256))]),_:1},8,["store","options"])]))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router"),d=require("../../../../components/Tab/Tab.vue.cjs"),m=require("../../../../components/Feed/Feed.vue.cjs"),p=require("../blocks/CardLeftover.vue.cjs"),u=require("../../store/leftovers.cjs");require("./Leftovers.vue2.cjs");const v={class:"pd-thin"},f={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Inventory",-1),h={class:"mn-b-semi pd-medium bg-grey radius-big"},_=e.createElementVNode("p",{class:"mn-b-thin"},"Balance:",-1),g={__name:"Leftovers",setup(k){const l=a.useRoute();a.useRouter();const s=e.ref(l.query.tab?l.query.tab:"all"),c=e.computed(()=>u.state.all.reduce((o,r)=>{const t=r.positions.reduce((n,i)=>n+i.price,0);return r.type==="stock-in"?o-t:r.type==="stock-out"?o+t:o},0));return(o,r)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("header",f,[b,e.createElementVNode("button",{onClick:r[0]||(r[0]=t=>o.$router.push({name:"LeftoverAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createElementVNode("section",h,[_,e.createElementVNode("h3",null,e.toDisplayString(o.formatPrice(c.value)),1)]),e.createVNode(d.default,{selected:s.value,"onUpdate:selected":r[1]||(r[1]=t=>s.value=t),tabs:[{name:"All",value:"all"},{name:"Stock-In",value:"stock-in"},{name:"Stock-Out",value:"stock-out"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(m.default,{search:!0,states:{empty:{title:"No Leftovers Found",description:"Currently, there are no leftovers available."}},store:{read:t=>u.actions.read(t)},options:{limit:15,owner:e.unref(l).params._id,...s.value!=="all"&&{type:s.value}}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(p.default,{leftover:n,class:"bg-grey pd-small mn-b-thin radius-small"},null,8,["leftover"]))),256))]),_:1},8,["store","options"])]))}};exports.default=g;
@@ -1,6 +1,6 @@
1
1
  import { ref as d, computed as p, openBlock as a, createElementBlock as i, createElementVNode as o, toDisplayString as f, createVNode as u, unref as v, withCtx as b, Fragment as _, renderList as h, createBlock as g } from "vue";
2
2
  import { useRoute as y, useRouter as k } from "vue-router";
3
- import L from "../../../../components/Tab/Tab.vue2.js";
3
+ import L from "../../../../components/Tab/Tab.vue.js";
4
4
  import w from "../../../../components/Feed/Feed.vue.js";
5
5
  import x from "../blocks/CardLeftover.vue.js";
6
6
  import { state as B, actions as C } from "../../store/leftovers.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const c=require("../../../../components/Field/Field.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),k=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),_=require("../../../icons/navigation/IconDelete.vue.cjs"),b=require("../blocks/CardPosition.vue.cjs"),q=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),N=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const P={class:"for-transition w-100 cols-1 pd-thin gap-thin"},y={class:"mn-r-auto"},E={class:"cols-2 gap-thin"},U={key:0,class:"cols-1 gap-thin"},z={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},I={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},D={__name:"ProductEdit",setup(O){const l=h.useRoute(),m=h.useRouter(),p=e.ref(t.state.all),f=e.ref(!1);function v(d){f.value=!0}function s(){f.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 N.actions.fetchCategories();try{const d=await t.actions.read({organization:l.params._id,limit:100});p.value=d}catch{console.error("error")}});function w(){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 g(){m.push({name:"Organization",params:{_id:l.params._id}})}return(d,i)=>(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",y,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(k.default,{key:0,submit:x,callback:g,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(k.default,{submit:w,callback:g,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(C.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":i[0]||(i[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",E,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(q.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>v()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(b.default,{key:a._id,product:a,array:t.state.current.ingredients,products:p.value,onAdd:i[1]||(i[1]=r=>{u.actions.add(t.state.current.ingredients,r),s()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),s()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),s()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(m).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.state.all,(a,n)=>(e.openBlock(),e.createBlock(V.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":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(c.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(c.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",z,[e.createVNode(_.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(c.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(c.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",I,[e.createVNode(_.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add ingredient",onClosePopup:s,isPopupOpen:f.value,class:"bg-white pd-big radius-big"},{default:e.withCtx(()=>[e.createVNode(b.default,{onAdd:i[2]||(i[2]=a=>u.actions.add(t.state.current.ingredients,a)),products:p.value,class:"flex-column"},null,8,["products"])]),_:1},8,["isPopupOpen"])]))}};exports.default=D;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const c=require("../../../../components/Field/Field.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),k=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue2.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),_=require("../../../icons/navigation/IconDelete.vue.cjs"),b=require("../blocks/CardPosition.vue.cjs"),q=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),N=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const P={class:"for-transition w-100 cols-1 pd-thin gap-thin"},y={class:"mn-r-auto"},E={class:"cols-2 gap-thin"},U={key:0,class:"cols-1 gap-thin"},z={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},I={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},D={__name:"ProductEdit",setup(O){const l=h.useRoute(),m=h.useRouter(),p=e.ref(t.state.all),f=e.ref(!1);function v(d){f.value=!0}function s(){f.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 N.actions.fetchCategories();try{const d=await t.actions.read({organization:l.params._id,limit:100});p.value=d}catch{console.error("error")}});function w(){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 g(){m.push({name:"Organization",params:{_id:l.params._id}})}return(d,i)=>(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",y,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(k.default,{key:0,submit:x,callback:g,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(k.default,{submit:w,callback:g,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(C.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":i[0]||(i[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",E,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(q.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>v()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(b.default,{key:a._id,product:a,array:t.state.current.ingredients,products:p.value,onAdd:i[1]||(i[1]=r=>{u.actions.add(t.state.current.ingredients,r),s()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),s()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),s()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(m).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.state.all,(a,n)=>(e.openBlock(),e.createBlock(V.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":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(c.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(c.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",z,[e.createVNode(_.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(c.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(c.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",I,[e.createVNode(_.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add ingredient",onClosePopup:s,isPopupOpen:f.value,class:"bg-white pd-big radius-big"},{default:e.withCtx(()=>[e.createVNode(b.default,{onAdd:i[2]||(i[2]=a=>u.actions.add(t.state.current.ingredients,a)),products:p.value,class:"flex-column"},null,8,["products"])]),_:1},8,["isPopupOpen"])]))}};exports.default=D;
@@ -4,11 +4,11 @@ import "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import d from "../../../../components/Block/Block.vue.js";
7
- import "../../../../components/Tab/Tab.vue.js";
7
+ import "../../../../components/Tab/Tab.vue2.js";
8
8
  import b from "../../../../components/Field/Field.vue.js";
9
9
  import S from "../../../../components/Checkbox/Checkbox.vue.js";
10
10
  import z from "../../../../components/Button/Button.vue.js";
11
- import T from "../../../../components/Popup/Popup.vue.js";
11
+ import T from "../../../../components/Popup/Popup.vue2.js";
12
12
  import F from "../../../../components/EditImages/EditImages.vue.js";
13
13
  import N from "../../../icons/navigation/IconDelete.vue.js";
14
14
  import D from "../blocks/CardPosition.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/store/auth.cjs"),l=require("../../store/products.cjs"),f={class:"pd-thin"},y={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},g=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),q={class:"cols-2-1_3 bg-grey pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=c.useRoute(),n=c.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",y,[g,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",q,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>l.actions.read(o),state:l.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/store/auth.cjs"),l=require("../../store/products.cjs"),f={class:"pd-thin"},y={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},g=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),q={class:"cols-2-1_3 bg-grey pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=c.useRoute(),n=c.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",y,[g,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",q,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>l.actions.read(o),state:l.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as _, watch as f, openBlock as i, createElementBlock as l, unref as t, createElementVNode as n, createCommentVNode as m, createBlock as p, createVNode as c, withCtx as b, Fragment as v, renderList as y } from "vue";
2
2
  import { useRoute as g, useRouter as q } from "vue-router";
3
- import P from "../../../../components/Tab/Tab.vue2.js";
3
+ import P from "../../../../components/Tab/Tab.vue.js";
4
4
  import $ from "../../../../components/Feed/Feed.vue.js";
5
5
  import k from "../sections/FilterProducts.vue.js";
6
6
  import C from "../../../globals/components/blocks/BlockSearch.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");const r=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/Select/Select.vue.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,t)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":t[0]||(t[0]=l=>e.product.status=l),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":t[1]||(t[1]=l=>e.product.name=l),label:"Name",placeholder:"Enter product name",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":t[3]||(t[3]=l=>e.product.price=l),label:"Price",placeholder:"Enter product price",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":t[2]||(t[2]=l=>e.product.price.currency=l),placeholder:"฿",options:["฿"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":t[4]||(t[4]=l=>e.product.description=l),label:"Description",placeholder:"Enter product description",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");const r=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/Select/Select.vue2.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,t)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":t[0]||(t[0]=l=>e.product.status=l),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":t[1]||(t[1]=l=>e.product.name=l),label:"Name",placeholder:"Enter product name",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":t[3]||(t[3]=l=>e.product.price=l),label:"Price",placeholder:"Enter product price",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":t[2]||(t[2]=l=>e.product.price.currency=l),placeholder:"฿",options:["฿"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":t[4]||(t[4]=l=>e.product.description=l),label:"Description",placeholder:"Enter product description",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
@@ -2,7 +2,7 @@ import { openBlock as u, createElementBlock as a, Fragment as o, createVNode as
2
2
  import "../../../../components/Loader/Loader.vue.js";
3
3
  import "../../../../components/Button/Button.vue2.js";
4
4
  import r from "../../../../components/Field/Field.vue.js";
5
- import i from "../../../../components/Select/Select.vue.js";
5
+ import i from "../../../../components/Select/Select.vue2.js";
6
6
  const w = {
7
7
  __name: "EditProductInfo",
8
8
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue.cjs"),d=require("../../../../components/Button/Button.vue.cjs"),m=require("../../../../components/Select/Select.vue.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:o[1]||(o[1]=n=>u())},[e.renderSlot(p.$slots,"default"),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[0]||(o[0]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue2.cjs"),d=require("../../../../components/Button/Button.vue.cjs"),m=require("../../../../components/Select/Select.vue2.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:o[1]||(o[1]=n=>u())},[e.renderSlot(p.$slots,"default"),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[0]||(o[0]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};exports.default=h;
@@ -1,7 +1,7 @@
1
1
  import { reactive as d, ref as f, openBlock as b, createElementBlock as g, renderSlot as h, createVNode as s, withCtx as l, createTextVNode as y, createElementVNode as a } from "vue";
2
- import _ from "../../../../components/Popup/Popup.vue.js";
2
+ import _ from "../../../../components/Popup/Popup.vue2.js";
3
3
  import v from "../../../../components/Button/Button.vue.js";
4
- import w from "../../../../components/Select/Select.vue.js";
4
+ import w from "../../../../components/Select/Select.vue2.js";
5
5
  import { actions as S } from "../../store/reports.js";
6
6
  const k = /* @__PURE__ */ a("h3", { class: "mn-b-small" }, " Report Content ", -1), P = /* @__PURE__ */ a("p", { class: "p-medium mn-b-small" }, " We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ", -1), R = /* @__PURE__ */ a("p", { class: "p-medium mn-b-small" }, "Our moderators will review your report within 24 hours and take action if it violates our policies.", -1), O = {
7
7
  __name: "FormReport",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),u=require("../../../community/components/sections/Feed.vue.cjs"),o=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(k){const t=n.useRoute(),c=n.useRouter();let d=t.query.tab?t.query.tab:"posts";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,a=>{c.replace({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[f,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=l=>a.$router.push({name:"Create BlogPost"})),class:"radius-100 t-white t-semi i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(i.default,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=l=>r.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u.default,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u.default,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u.default,{key:3,user:o.state.user._id,following:e.unref(t).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),i=require("../../../../components/Tab/Tab.vue.cjs"),u=require("../../../community/components/sections/Feed.vue.cjs"),o=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(k){const t=n.useRoute(),c=n.useRouter();let d=t.query.tab?t.query.tab:"posts";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,a=>{c.replace({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[f,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=l=>a.$router.push({name:"Create BlogPost"})),class:"radius-100 t-white t-semi i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(i.default,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=l=>r.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u.default,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u.default,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u.default,{key:3,user:o.state.user._id,following:e.unref(t).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as _, watch as b, openBlock as r, createElementBlock as d, createElementVNode as c, unref as s, createCommentVNode as o, createBlock as l } from "vue";
2
2
  import { useRoute as g, useRouter as v } from "vue-router";
3
- import y from "../../../../components/Tab/Tab.vue2.js";
3
+ import y from "../../../../components/Tab/Tab.vue.js";
4
4
  import i from "../../../community/components/sections/Feed.vue.js";
5
5
  import { state as a } from "../../../auth/store/auth.js";
6
6
  const h = { class: "pd-thin" }, k = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ c("h2", { class: "mn-r-medium" }, "Posts", -1), E = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");const i=require("../../../../components/Field/Field.vue.cjs"),m=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),h=require("../sections/ProfileCompletion.vue.cjs"),c=require("vue-router"),r=require("../../../auth/store/auth.cjs"),s=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const N={class:"pd-medium for-transition w-100"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),w={class:"mn-b-semi"},y=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),U={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},_=e.createElementVNode("h4",null,"Upload userpic",-1),k=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),q=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),E=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),P={__name:"ProfileEdit",async setup(S){let n,d;e.ref(null);const f=c.useRoute(),u=c.useRouter();[n,d]=e.withAsyncContext(()=>s.actions.read({_id:r.state.user._id})),await n,d();const l=e.ref(s.state.current);async function p(){await s.actions.update(s.state.current)}async function b(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.state.current.status="removed",await s.actions.update(s.state.current),r.actions.logout())}function v(){u.replace({name:"User Profile",params:{_id:s.state.current._id}})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",N,[e.unref(f).params._id===r.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,user:r.state.user._id,target:l.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),V,e.createVNode(i.default,{field:l.value.username,"onUpdate:field":a[0]||(a[0]=t=>l.value.username=t),label:"@",placeholder:"Not specified",class:"mn-b-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createElementVNode("p",w,"Your username will be used for URL of profile like "+e.toDisplayString(o.API_URL)+"/users/username",1),y,e.createElementVNode("div",U,[e.createVNode(g.default,{photo:l.value.profile.photo,"onUpdate:photo":a[1]||(a[1]=t=>l.value.profile.photo=t),uploadPath:"users/"+l.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),_]),e.createVNode(i.default,{field:l.value.profile.name,"onUpdate:field":a[2]||(a[2]=t=>l.value.profile.name=t),label:"Name",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium radius-small",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.profile.description,"onUpdate:field":a[3]||(a[3]=t=>l.value.profile.description=t),label:"Description",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),k,q,e.createVNode(i.default,{field:l.value.socials.instagram,"onUpdate:field":a[4]||(a[4]=t=>l.value.socials.instagram=t),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.twitter,"onUpdate:field":a[5]||(a[5]=t=>l.value.socials.twitter=t),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.facebook,"onUpdate:field":a[6]||(a[6]=t=>l.value.socials.facebook=t),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.telegram,"onUpdate:field":a[7]||(a[7]=t=>l.value.socials.telegram=t),label:"Telegram",placeholder:"",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["field"]),E,e.createVNode(i.default,{field:l.value.phone,"onUpdate:field":a[8]||(a[8]=t=>l.value.phone=t),label:"Phone",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium mn-b-thin radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.email,"onUpdate:field":a[9]||(a[9]=t=>l.value.email=t),label:"Email",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:!0,validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{submit:p,callback:v,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(m.default,{submit:b,callback:o.a=()=>{e.unref(u).push({name:"Sign In"})},class:"mn-b-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const i=require("../../../../components/Field/Field.vue.cjs"),m=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),h=require("../sections/ProfileCompletion.vue.cjs"),c=require("vue-router"),r=require("../../../auth/store/auth.cjs"),s=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const N={class:"pd-medium for-transition w-100"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),w={class:"mn-b-semi"},y=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),U={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},_=e.createElementVNode("h4",null,"Upload userpic",-1),k=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),q=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),E=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),P={__name:"ProfileEdit",async setup(S){let n,d;e.ref(null);const f=c.useRoute(),u=c.useRouter();[n,d]=e.withAsyncContext(()=>s.actions.read({_id:r.state.user._id})),await n,d();const l=e.ref(s.state.current);async function p(){await s.actions.update(s.state.current)}async function b(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.state.current.status="removed",await s.actions.update(s.state.current),r.actions.logout())}function v(){u.replace({name:"User Profile",params:{_id:s.state.current._id}})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",N,[e.unref(f).params._id===r.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,user:r.state.user._id,target:l.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),V,e.createVNode(i.default,{field:l.value.username,"onUpdate:field":a[0]||(a[0]=t=>l.value.username=t),label:"@",placeholder:"Not specified",class:"mn-b-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createElementVNode("p",w,"Your username will be used for URL of profile like "+e.toDisplayString(o.API_URL)+"/users/username",1),y,e.createElementVNode("div",U,[e.createVNode(g.default,{photo:l.value.profile.photo,"onUpdate:photo":a[1]||(a[1]=t=>l.value.profile.photo=t),uploadPath:"users/"+l.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),_]),e.createVNode(i.default,{field:l.value.profile.name,"onUpdate:field":a[2]||(a[2]=t=>l.value.profile.name=t),label:"Name",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium radius-small",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.profile.description,"onUpdate:field":a[3]||(a[3]=t=>l.value.profile.description=t),label:"Description",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),k,q,e.createVNode(i.default,{field:l.value.socials.instagram,"onUpdate:field":a[4]||(a[4]=t=>l.value.socials.instagram=t),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.twitter,"onUpdate:field":a[5]||(a[5]=t=>l.value.socials.twitter=t),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.facebook,"onUpdate:field":a[6]||(a[6]=t=>l.value.socials.facebook=t),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.telegram,"onUpdate:field":a[7]||(a[7]=t=>l.value.socials.telegram=t),label:"Telegram",placeholder:"",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["field"]),E,e.createVNode(i.default,{field:l.value.phone,"onUpdate:field":a[8]||(a[8]=t=>l.value.phone=t),label:"Phone",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium mn-b-thin radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.email,"onUpdate:field":a[9]||(a[9]=t=>l.value.email=t),label:"Email",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:!0,validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{submit:p,callback:v,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(m.default,{submit:b,callback:o.a=()=>{e.unref(u).push({name:"Sign In"})},class:"mn-b-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}};exports.default=P;
@@ -1,6 +1,6 @@
1
1
  import { ref as f, withAsyncContext as U, openBlock as c, createElementBlock as k, unref as b, createBlock as P, createCommentVNode as S, createVNode as i, createElementVNode as s, toDisplayString as z, withCtx as h, createTextVNode as g } from "vue";
2
2
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
- import "../../../../components/Tab/Tab.vue.js";
3
+ import "../../../../components/Tab/Tab.vue2.js";
4
4
  import t from "../../../../components/Field/Field.vue.js";
5
5
  import v from "../../../../components/Button/Button.vue.js";
6
6
  import A from "../../../../components/UploadImage/UploadImage.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),l=require("../../../events/components/sections/Feed.vue.cjs"),n=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},v=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),_={__name:"ProfileEvents",setup(b){const t=c.useRoute(),o=c.useRouter();let i=t.query.tab?t.query.tab:"owner";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,s=>{o.replace({query:{...t.query,tab:s}})}),(s,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[v,n.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=u=>e.unref(o).push({name:"Create Event"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=u=>r.value=u),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),r.value==="owner"?(e.openBlock(),e.createBlock(l.default,{key:0,user:n.state.user._id,creator:e.unref(t).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="participant"?(e.openBlock(),e.createBlock(l.default,{key:1,user:n.state.user._id,participant:e.unref(t).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue.cjs"),l=require("../../../events/components/sections/Feed.vue.cjs"),n=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},v=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),_={__name:"ProfileEvents",setup(b){const t=c.useRoute(),o=c.useRouter();let i=t.query.tab?t.query.tab:"owner";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,s=>{o.replace({query:{...t.query,tab:s}})}),(s,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[v,n.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=u=>e.unref(o).push({name:"Create Event"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=u=>r.value=u),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),r.value==="owner"?(e.openBlock(),e.createBlock(l.default,{key:0,user:n.state.user._id,creator:e.unref(t).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="participant"?(e.openBlock(),e.createBlock(l.default,{key:1,user:n.state.user._id,participant:e.unref(t).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as f, watch as b, openBlock as a, createElementBlock as l, createElementVNode as p, unref as s, createCommentVNode as o, createVNode as v, createBlock as m } from "vue";
2
2
  import { useRoute as y, useRouter as h } from "vue-router";
3
- import k from "../../../../components/Tab/Tab.vue2.js";
3
+ import k from "../../../../components/Tab/Tab.vue.js";
4
4
  import d from "../../../events/components/sections/Feed.vue.js";
5
5
  import { state as n } from "../../../auth/store/auth.js";
6
6
  const g = { class: "pd-thin" }, w = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ p("h2", { class: "mn-r-medium" }, " Events ", -1), V = {