@ozdao/prometheus-framework 0.2.41 โ†’ 0.2.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. package/dist/events.server.js +9 -0
  2. package/dist/events.server.mjs +9 -0
  3. package/dist/files.server.js +4 -1
  4. package/dist/files.server.mjs +4 -1
  5. package/dist/main.css +1 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -225
  8. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  9. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +225 -2
  10. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +2 -61
  12. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +61 -2
  14. package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.js +26 -28
  16. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +76 -2
  20. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -70
  22. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +70 -2
  24. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -95
  26. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +95 -2
  28. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  30. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  32. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  44. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  46. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +3 -3
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +24 -23
  50. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  53. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -65
  54. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  55. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +65 -2
  56. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +2 -2
  58. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +125 -81
  64. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +3 -3
  65. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +65 -56
  66. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  68. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +67 -53
  70. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +2 -2
  71. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +48 -37
  72. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +71 -57
  74. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  76. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
  78. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  82. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +2 -2
  88. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +20 -11
  90. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
  92. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +6 -6
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
  112. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  114. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  118. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +22 -19
  122. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +6 -6
  124. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  128. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +31 -28
  132. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  134. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  136. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  140. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +78 -80
  144. package/dist/prometheus-framework.cjs.js +19 -19
  145. package/dist/prometheus-framework.es.js +515 -501
  146. package/dist/style.css +1 -1
  147. package/package.json +1 -1
  148. package/src/modules/wallet/components/pages/Wallet.vue +3 -3
@@ -1,7 +1,7 @@
1
1
  import { ref as k, computed as S, onMounted as C, openBlock as c, createElementBlock as d, Fragment as b, createElementVNode as n, toDisplayString as h, unref as _, createVNode as i, withCtx as f, renderList as D, createBlock as L, createCommentVNode as R } from "vue";
2
2
  import v from "../../../../components/Block/Block.vue.js";
3
- import "../../../../components/Field/Field.vue2.js";
4
- import A from "../../../../components/Select/Select.vue.js";
3
+ import "../../../../components/Field/Field.vue.js";
4
+ import A from "../../../../components/Select/Select.vue2.js";
5
5
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
6
6
  import g from "../blocks/CardPosition.vue.js";
7
7
  import { useRoute as E, useRouter as N } from "vue-router";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Tab/Tab.vue.cjs"),m=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../blocks/CardLeftover.vue.cjs"),i=require("../../store/leftovers.cjs");require("./Leftovers.vue2.cjs");const v={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Inventory",-1),g={class:"mn-b-semi pd-medium bg-grey radius-big"},_=e.createElementVNode("p",{class:"mn-b-thin"},"Spended:",-1),h={__name:"Leftovers",setup(k){const s=u.useRoute();u.useRouter();const l=e.ref(s.query.tab?s.query.tab:"all"),c=e.computed(()=>i.state.all.reduce((o,r)=>{const t=r.positions.reduce((n,a)=>n+a.price*(a.quantity||1),0);return o+t},0));return(o,r)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("header",p,[b,e.createElementVNode("button",{onClick:r[0]||(r[0]=t=>o.$router.push({name:"LeftoverAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createElementVNode("section",g,[_,e.createElementVNode("h3",null,e.toDisplayString(o.formatPrice(c.value)),1)]),e.createVNode(d.default,{selected:l.value,"onUpdate:selected":r[1]||(r[1]=t=>l.value=t),tabs:[{name:"All",value:"all"},{name:"Stock-In",value:"stock-in"},{name:"Stock-Out",value:"stock-out"},{name:"Write-Off",value:"write-off"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(m.default,{states:{empty:{title:"No Leftovers Found",description:"Currently, there are no leftovers available."}},store:{read:t=>i.actions.read(t)},options:{limit:15,organization:e.unref(s).params._id}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(f.default,{leftover:n,class:"bg-grey pd-small radius-big"},null,8,["leftover"]))),256))]),_:1},8,["states","store","options"])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../blocks/CardLeftover.vue.cjs"),i=require("../../store/leftovers.cjs");require("./Leftovers.vue2.cjs");const v={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Inventory",-1),g={class:"mn-b-semi pd-medium bg-grey radius-big"},_=e.createElementVNode("p",{class:"mn-b-thin"},"Spended:",-1),h={__name:"Leftovers",setup(k){const s=u.useRoute();u.useRouter();const l=e.ref(s.query.tab?s.query.tab:"all"),c=e.computed(()=>i.state.all.reduce((o,r)=>{const t=r.positions.reduce((n,a)=>n+a.price*(a.quantity||1),0);return o+t},0));return(o,r)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("header",p,[b,e.createElementVNode("button",{onClick:r[0]||(r[0]=t=>o.$router.push({name:"LeftoverAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createElementVNode("section",g,[_,e.createElementVNode("h3",null,e.toDisplayString(o.formatPrice(c.value)),1)]),e.createVNode(d.default,{selected:l.value,"onUpdate:selected":r[1]||(r[1]=t=>l.value=t),tabs:[{name:"All",value:"all"},{name:"Stock-In",value:"stock-in"},{name:"Stock-Out",value:"stock-out"},{name:"Write-Off",value:"write-off"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(m.default,{states:{empty:{title:"No Leftovers Found",description:"Currently, there are no leftovers available."}},store:{read:t=>i.actions.read(t)},options:{limit:15,organization:e.unref(s).params._id}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(f.default,{leftover:n,class:"bg-grey pd-small radius-big"},null,8,["leftover"]))),256))]),_:1},8,["states","store","options"])]))}};exports.default=h;
@@ -1,6 +1,6 @@
1
1
  import { ref as d, computed as p, openBlock as a, createElementBlock as u, createElementVNode as r, toDisplayString as f, createVNode as m, unref as v, withCtx as b, Fragment as _, renderList as g, createBlock as h } from "vue";
2
2
  import { useRoute as y, useRouter as k } from "vue-router";
3
- import L from "../../../../components/Tab/Tab.vue.js";
3
+ import L from "../../../../components/Tab/Tab.vue2.js";
4
4
  import w from "../../../../components/Feed/Feed.vue.js";
5
5
  import x from "../blocks/CardLeftover.vue.js";
6
6
  import { state as C, actions as S } from "../../store/leftovers.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),d=require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const l=require("../sections/PopularProducts.vue.cjs"),p=require("../sections/SectionProduct.vue.cjs");require("../../store/categories.cjs");const m=require("../../../../../../node_modules/vue-meta/dist/vue-meta.esm-browser.min.cjs"),t=require("../../store/products.cjs");require("./Product.vue2.cjs");const _={class:"flex flex-column w-100 o-hidden gap-thin pd-thin"},q={__name:"Product",async setup(v){let u,o;const r=n.useRoute();n.useRouter(),[u,o]=e.withAsyncContext(()=>t.actions.fetchProduct(r.params.product)),await u,o(),r.meta.title.en=t.state.current.name,r.meta.title.ru=t.state.current.name;const c=e.computed(()=>t.state.current),s={messages:{en:{},ru:{}}},{t:a}=d.useI18n(s),i=e.computed(()=>({title:t.state.current.name,description:a("description")}));return m.useMeta(i),e.onMounted(()=>{}),(f,h)=>(e.openBlock(),e.createElementBlock("div",_,[c.value?(e.openBlock(),e.createBlock(p.default,{key:0,product:c.value,class:"pos-relative"},null,8,["product"])):e.createCommentVNode("",!0),e.createVNode(l.default)]))}};exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),l=require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const d=require("../sections/PopularProducts.vue.cjs"),p=require("../sections/SectionProduct.vue.cjs");require("../../store/categories.cjs");const m=require("../../../../../../node_modules/vue-meta/dist/vue-meta.esm-browser.min.cjs"),_=require("../../../auth/store/auth.cjs"),t=require("../../store/products.cjs");require("./Product.vue2.cjs");const q={class:"flex flex-column w-100 o-hidden gap-thin pd-thin"},v={__name:"Product",async setup(f){let o,c;const r=s.useRoute();s.useRouter(),[o,c]=e.withAsyncContext(()=>t.actions.fetchProduct(r.params.product)),await o,c(),r.meta.title.en=t.state.current.name,r.meta.title.ru=t.state.current.name;const u=e.computed(()=>t.state.current),n={messages:{en:{},ru:{}}},{t:a}=l.useI18n(n),i=e.computed(()=>({title:t.state.current.name,description:a("description")}));return m.useMeta(i),e.onMounted(()=>{}),(h,x)=>(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(e.toDisplayString(u.value.quantity)+" ",1),u.value?(e.openBlock(),e.createBlock(p.default,{key:0,product:u.value,user:_.state.user,class:"pos-relative"},null,8,["product","user"])):e.createCommentVNode("",!0),e.createVNode(d.default)]))}};exports.default=v;
@@ -1,40 +1,43 @@
1
- import { withAsyncContext as i, computed as n, onMounted as p, openBlock as m, createElementBlock as d, createBlock as l, createCommentVNode as _, createVNode as f } from "vue";
2
- import { useRoute as h, useRouter as x } from "vue-router";
1
+ import { withAsyncContext as i, computed as s, onMounted as p, openBlock as n, createElementBlock as l, createTextVNode as d, toDisplayString as _, createBlock as f, createCommentVNode as h, createVNode as x } from "vue";
2
+ import { useRoute as v, useRouter as y } from "vue-router";
3
3
  import { useI18n as k } from "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
- import v from "../sections/PopularProducts.vue.js";
7
- import B from "../sections/SectionProduct.vue.js";
6
+ import B from "../sections/PopularProducts.vue.js";
7
+ import g from "../sections/SectionProduct.vue.js";
8
8
  import "../../store/categories.js";
9
9
  import { useMeta as w } from "../../../../../../node_modules/vue-meta/dist/vue-meta.esm-browser.min.js";
10
- import { actions as y, state as t } from "../../store/products.js";
10
+ import { state as M } from "../../../auth/store/auth.js";
11
+ import { actions as N, state as t } from "../../store/products.js";
11
12
  import "./Product.vue2.js";
12
- const M = { class: "flex flex-column w-100 o-hidden gap-thin pd-thin" }, D = {
13
+ const V = { class: "flex flex-column w-100 o-hidden gap-thin pd-thin" }, G = {
13
14
  __name: "Product",
14
- async setup(g) {
15
- let o, r;
16
- const e = h();
17
- x(), [o, r] = i(() => y.fetchProduct(e.params.product)), await o, r(), e.meta.title.en = t.current.name, e.meta.title.ru = t.current.name;
18
- const c = n(() => t.current), s = {
15
+ async setup($) {
16
+ let r, c;
17
+ const e = v();
18
+ y(), [r, c] = i(() => N.fetchProduct(e.params.product)), await r, c(), e.meta.title.en = t.current.name, e.meta.title.ru = t.current.name;
19
+ const o = s(() => t.current), a = {
19
20
  messages: {
20
21
  en: {},
21
22
  ru: {}
22
23
  }
23
- }, { t: a } = k(s), u = n(() => ({
24
+ }, { t: m } = k(a), u = s(() => ({
24
25
  title: t.current.name,
25
- description: a("description")
26
+ description: m("description")
26
27
  }));
27
28
  return w(u), p(() => {
28
- }), (C, N) => (m(), d("div", M, [
29
- c.value ? (m(), l(B, {
29
+ }), (C, P) => (n(), l("div", V, [
30
+ d(_(o.value.quantity) + " ", 1),
31
+ o.value ? (n(), f(g, {
30
32
  key: 0,
31
- product: c.value,
33
+ product: o.value,
34
+ user: M.user,
32
35
  class: "pos-relative"
33
- }, null, 8, ["product"])) : _("", !0),
34
- f(v)
36
+ }, null, 8, ["product", "user"])) : h("", !0),
37
+ x(B)
35
38
  ]));
36
39
  }
37
40
  };
38
41
  export {
39
- D as default
42
+ G as default
40
43
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const n=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const i=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const b=require("../../../../components/Checkbox/Checkbox.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");const w=require("../../../../components/EditImages/EditImages.vue.cjs"),c=require("../../../icons/navigation/IconDelete.vue.cjs"),h=require("../blocks/CardPosition.vue.cjs"),x=require("../sections/EditProductInfo.vue.cjs"),s=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),g=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const V={class:"for-transition w-100 cols-1 pd-thin gap-thin"},v={class:"mn-r-auto"},B={class:"cols-2 gap-thin"},q={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},C={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},y={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},E={__name:"ProductEdit",setup(U){const o=m.useRoute(),k=m.useRouter(),u=e.ref(t.state.all);e.onMounted(async()=>{await g.actions.fetchCategories(),o.params.product&&await t.actions.read({_id:o.params.product})});function N(){o.params.product?t.actions.update(o.params.product,t.state.current):t.actions.create(o.params._id,t.state.current)}function _(){t.actions.deleteProduct(t.state.current._id)}function p(){k.push({name:"Organization",params:{_id:o.params._id}})}return(D,d)=>(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(n.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",v,e.toDisplayString(e.unref(o).params.product?t.state.current.name:"Create Product"),1),e.unref(o).params.product?(e.openBlock(),e.createBlock(f.default,{key:0,submit:_,callback:p,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:N,callback:p,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(n.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(w.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":d[0]||(d[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",B,[e.createVNode(n.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(x.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(n.default,{title:"Categories"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.state.all,(a,r)=>(e.openBlock(),e.createBlock(b.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":l=>t.state.current.category=l},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1}),e.createVNode(n.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:r},[e.createVNode(i.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"ะ—ะฝะฐั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",q,[e.createVNode(c.default,{onClick:()=>t.state.current.information.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(i.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"ะ—ะฝะฐั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",C,[e.createVNode(c.default,{onClick:()=>t.state.current.localization.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]),e.createVNode(n.default,{title:"Quantity Discount",class:"mn-b-semi",actions:[{label:"+",function:()=>t.state.current.quantityDiscount.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.quantityDiscount,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(i.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Quantity",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Discount",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",y,[e.createVNode(c.default,{onClick:()=>t.state.current.quantityDiscount.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Add Ingridient",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(h.default,{onAdd:d[1]||(d[1]=a=>s.actions.add(t.state.current.ingridients,a)),products:u.value},null,8,["products"]),e.createVNode(n.default,{placeholder:"No positions added yet",class:"pd-zero mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingridients,(a,r)=>(e.openBlock(),e.createBlock(h.default,{key:a._id,product:a,array:t.state.current.ingridients,products:u.value,onAdd:d[2]||(d[2]=l=>s.actions.add(t.state.current.ingridients,l)),onUpdate:l=>s.actions.update(t.state.current.ingridients,l,r),onDelete:l=>s.actions.delete(t.state.current.ingridients,l,r)},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1})]),_:1})]))}};exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const n=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const i=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const b=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");const w=require("../../../../components/EditImages/EditImages.vue.cjs"),c=require("../../../icons/navigation/IconDelete.vue.cjs"),h=require("../blocks/CardPosition.vue.cjs"),x=require("../sections/EditProductInfo.vue.cjs"),s=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),g=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const V={class:"for-transition w-100 cols-1 pd-thin gap-thin"},v={class:"mn-r-auto"},B={class:"cols-2 gap-thin"},q={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},C={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},y={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},E={__name:"ProductEdit",setup(U){const o=m.useRoute(),k=m.useRouter(),u=e.ref(t.state.all);e.onMounted(async()=>{await g.actions.fetchCategories(),o.params.product&&await t.actions.read({_id:o.params.product})});function N(){o.params.product?t.actions.update(o.params.product,t.state.current):t.actions.create(o.params._id,t.state.current)}function _(){t.actions.deleteProduct(t.state.current._id)}function p(){k.push({name:"Organization",params:{_id:o.params._id}})}return(D,d)=>(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(n.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",v,e.toDisplayString(e.unref(o).params.product?t.state.current.name:"Create Product"),1),e.unref(o).params.product?(e.openBlock(),e.createBlock(f.default,{key:0,submit:_,callback:p,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:N,callback:p,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(n.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(w.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":d[0]||(d[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",B,[e.createVNode(n.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(x.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(n.default,{title:"Categories"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.state.all,(a,r)=>(e.openBlock(),e.createBlock(b.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":l=>t.state.current.category=l},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1}),e.createVNode(n.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:r},[e.createVNode(i.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"ะ—ะฝะฐั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",q,[e.createVNode(c.default,{onClick:()=>t.state.current.information.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(i.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"ะ—ะฝะฐั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",C,[e.createVNode(c.default,{onClick:()=>t.state.current.localization.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]),e.createVNode(n.default,{title:"Quantity Discount",class:"mn-b-semi",actions:[{label:"+",function:()=>t.state.current.quantityDiscount.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.quantityDiscount,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(i.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Quantity",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Discount",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",y,[e.createVNode(c.default,{onClick:()=>t.state.current.quantityDiscount.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Add Ingridient",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(h.default,{onAdd:d[1]||(d[1]=a=>s.actions.add(t.state.current.ingridients,a)),products:u.value},null,8,["products"]),e.createVNode(n.default,{placeholder:"No positions added yet",class:"pd-zero mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingridients,(a,r)=>(e.openBlock(),e.createBlock(h.default,{key:a._id,product:a,array:t.state.current.ingridients,products:u.value,onAdd:d[2]||(d[2]=l=>s.actions.add(t.state.current.ingridients,l)),onUpdate:l=>s.actions.update(t.state.current.ingridients,l,r),onDelete:l=>s.actions.delete(t.state.current.ingridients,l,r)},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1})]),_:1})]))}};exports.default=E;
@@ -4,12 +4,12 @@ import "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import s from "../../../../components/Block/Block.vue.js";
7
- import "../../../../components/Tab/Tab.vue2.js";
8
- import c from "../../../../components/Field/Field.vue.js";
9
- import "../../../../components/Select/Select.vue2.js";
10
- import B from "../../../../components/Checkbox/Checkbox.vue.js";
11
- import k from "../../../../components/Button/Button.vue.js";
12
- import "../../../../components/Popup/Popup.vue2.js";
7
+ import "../../../../components/Tab/Tab.vue.js";
8
+ import c from "../../../../components/Field/Field.vue2.js";
9
+ import "../../../../components/Select/Select.vue.js";
10
+ import B from "../../../../components/Checkbox/Checkbox.vue2.js";
11
+ import k from "../../../../components/Button/Button.vue2.js";
12
+ import "../../../../components/Popup/Popup.vue.js";
13
13
  import E from "../../../../components/EditImages/EditImages.vue.js";
14
14
  import b from "../../../icons/navigation/IconDelete.vue.js";
15
15
  import U from "../blocks/CardPosition.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),n=require("../../store/products.cjs"),d=require("../../../../components/Feed/Feed.vue.cjs"),i=require("../blocks/CardProduct.vue.cjs"),m=require("../../../../components/Tab/Tab.vue.cjs"),p={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),v={__name:"ProductsBackoffice",setup(h){const r=l.useRoute(),c=l.useRouter(),o=e.ref(r.query.tab?r.query.tab:"posts");return r.query.tab=o.value,e.watch(o,u=>{c.replace({query:{...r.query,tab:u}})}),e.onMounted(async()=>{await n.actions.fetchProducts()}),(u,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",p,[b,e.createElementVNode("button",{onClick:a[0]||(a[0]=t=>u.$router.push({name:"AddProduct"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(m.default,{selected:o.value,"onUpdate:selected":a[1]||(a[1]=t=>o.value=t),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(d.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:t=>n.actions.read(t),state:n.state},options:{limit:15,organization:e.unref(r).params._id,status:o.value}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,s=>(e.openBlock(),e.createBlock(i.default,{key:s._id,product:s,onClick:f=>u.$router.push({name:"ProductEdit",params:{product:s._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])],64))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),n=require("../../store/products.cjs"),d=require("../../../../components/Feed/Feed.vue.cjs"),i=require("../blocks/CardProduct.vue.cjs"),m=require("../../../../components/Tab/Tab.vue2.cjs"),p={class:"mn-b-medium flex-v-center flex-nowrap flex"},b=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),v={__name:"ProductsBackoffice",setup(h){const r=l.useRoute(),c=l.useRouter(),o=e.ref(r.query.tab?r.query.tab:"posts");return r.query.tab=o.value,e.watch(o,u=>{c.replace({query:{...r.query,tab:u}})}),e.onMounted(async()=>{await n.actions.fetchProducts()}),(u,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",p,[b,e.createElementVNode("button",{onClick:a[0]||(a[0]=t=>u.$router.push({name:"AddProduct"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(m.default,{selected:o.value,"onUpdate:selected":a[1]||(a[1]=t=>o.value=t),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(d.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:t=>n.actions.read(t),state:n.state},options:{limit:15,organization:e.unref(r).params._id,status:o.value}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,s=>(e.openBlock(),e.createBlock(i.default,{key:s._id,product:s,onClick:f=>u.$router.push({name:"ProductEdit",params:{product:s._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])],64))}};exports.default=v;
@@ -3,7 +3,7 @@ import { useRoute as k, useRouter as g } from "vue-router";
3
3
  import { actions as c, state as P } from "../../store/products.js";
4
4
  import $ from "../../../../components/Feed/Feed.vue.js";
5
5
  import q from "../blocks/CardProduct.vue.js";
6
- import w from "../../../../components/Tab/Tab.vue.js";
6
+ import w from "../../../../components/Tab/Tab.vue2.js";
7
7
  const C = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, x = /* @__PURE__ */ u("h2", { class: "mn-r-medium" }, "Products", -1), z = {
8
8
  __name: "ProductsBackoffice",
9
9
  setup(B) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");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,l)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":l[0]||(l[0]=t=>e.product.status=t),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":l[1]||(l[1]=t=>e.product.name=t),label:"Name",placeholder:"ะ’ะฒะตะดะธั‚ะต ะฝะฐะทะฒะฐะฝะธะต",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":l[3]||(l[3]=t=>e.product.price=t),label:"Price",placeholder:"ะ’ะฒะตะดะธั‚ะต ั†ะตะฝัƒ",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":l[2]||(l[2]=t=>e.product.price.currency=t),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":l[4]||(l[4]=t=>e.product.description=t),label:"Description",placeholder:"ะ’ะฒะตะดะธั‚ะต ะพะฟะธัะฐะฝะธะต",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/Button/Button.vue.cjs");const r=require("../../../../components/Field/Field.vue2.cjs"),u=require("../../../../components/Select/Select.vue2.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,l)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":l[0]||(l[0]=t=>e.product.status=t),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":l[1]||(l[1]=t=>e.product.name=t),label:"Name",placeholder:"ะ’ะฒะตะดะธั‚ะต ะฝะฐะทะฒะฐะฝะธะต",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":l[3]||(l[3]=t=>e.product.price=t),label:"Price",placeholder:"ะ’ะฒะตะดะธั‚ะต ั†ะตะฝัƒ",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":l[2]||(l[2]=t=>e.product.price.currency=t),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":l[4]||(l[4]=t=>e.product.description=t),label:"Description",placeholder:"ะ’ะฒะตะดะธั‚ะต ะพะฟะธัะฐะฝะธะต",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
@@ -1,7 +1,7 @@
1
1
  import { openBlock as a, createElementBlock as u, Fragment as s, createVNode as d, withCtx as o } from "vue";
2
- import "../../../../components/Button/Button.vue2.js";
3
- import i from "../../../../components/Field/Field.vue.js";
4
- import r from "../../../../components/Select/Select.vue.js";
2
+ import "../../../../components/Button/Button.vue.js";
3
+ import i from "../../../../components/Field/Field.vue2.js";
4
+ import r from "../../../../components/Select/Select.vue2.js";
5
5
  const f = {
6
6
  __name: "EditProductInfo",
7
7
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),f=require("../../../../components/Checkbox/Checkbox.vue.cjs"),x=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const w={class:"pd-medium bg-grey radius-big"},q={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),F={class:"cursor-pointer mn-r-auto t-medium p-big"},B=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),C={__name:"FilterProducts",props:{selectedFilters:Object,prices:{type:Array,default:()=>[{label:"Under 300เธฟ",value:"<300"},{label:"300เธฟ to 600เธฟ",value:"300-600"},{label:"600เธฟ to 1200เธฟ",value:"600-1200"},{label:"$1200 and above",value:">1200"}]},deliveryOptions:{type:Array,default:()=>[{label:"Pickup",value:{min:0,max:25}},{label:"Courier",value:{min:25,max:50}},{label:"Post",value:{min:50,max:100}}]}},emits:["updateFilters","resetFilters"],async setup(y,{emit:h}){let d,m;const n=g.useRoute(),v=g.useRouter();[d,m]=e.withAsyncContext(()=>u.actions.fetchCategories()),await d,m(),e.ref({categories:[],prices:[],delivery:[],extra:[]}),e.watch(()=>a.state.filter,(t,r)=>{const l={...n.query};Object.keys(r).forEach(s=>{l[s]&&delete l[s]});const i=Object.fromEntries(Object.entries(t).filter(([s,o])=>Array.isArray(o)&&o.length>0).map(([s,o])=>[s,o.join(",")]));Object.assign(l,i),v.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(n.query){const t=n.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};a.state.filter=r}});const _=h,k=()=>{_("resetFilters")},p={locale:"en",messages:{en:{categoriesTitle:"Category",categories:[],filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{categoriesTitle:"ะšะฐั‚ะตะณะพั€ะธั",categories:[],filters:{title:"ะคะธะปัŒั‚ั€ั‹",price:{title:"ะฆะตะฝะฐ",from:"ะžั‚",to:"ะ”ะพ"},filters:[],reset:"ะกะฑั€ะพัะธั‚ัŒ ั„ะธะปัŒั‚ั€ั‹"}}}};u.state.all.forEach(t=>{t.localization.forEach(r=>{p.messages[r.locale].categories.push(r.text)})});const{t:c}=x.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",q,e.toDisplayString(e.unref(c)("categoriesTitle")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.state.all,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.name,value:l.url,class:"w-100 mn-t-small mn-b-small bg-white radius-small pd-small",radio:a.state.filter.categories,"onUpdate:radio":r[0]||(r[0]=s=>a.state.filter.categories=s)},null,8,["label","value","radio"]))),128))]),_:1}),E,e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",F,e.toDisplayString(e.unref(c)("filters.price.title")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.prices,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.prices,"onUpdate:radio":r[1]||(r[1]=s=>a.state.filter.prices=s)},null,8,["label","value","radio"]))),128))]),_:1}),B,e.createElementVNode("button",{onClick:k,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),f=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),x=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const w={class:"pd-medium bg-grey radius-big"},q={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),F={class:"cursor-pointer mn-r-auto t-medium p-big"},B=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),C={__name:"FilterProducts",props:{selectedFilters:Object,prices:{type:Array,default:()=>[{label:"Under 300เธฟ",value:"<300"},{label:"300เธฟ to 600เธฟ",value:"300-600"},{label:"600เธฟ to 1200เธฟ",value:"600-1200"},{label:"$1200 and above",value:">1200"}]},deliveryOptions:{type:Array,default:()=>[{label:"Pickup",value:{min:0,max:25}},{label:"Courier",value:{min:25,max:50}},{label:"Post",value:{min:50,max:100}}]}},emits:["updateFilters","resetFilters"],async setup(y,{emit:h}){let d,m;const n=g.useRoute(),v=g.useRouter();[d,m]=e.withAsyncContext(()=>u.actions.fetchCategories()),await d,m(),e.ref({categories:[],prices:[],delivery:[],extra:[]}),e.watch(()=>a.state.filter,(t,r)=>{const l={...n.query};Object.keys(r).forEach(s=>{l[s]&&delete l[s]});const i=Object.fromEntries(Object.entries(t).filter(([s,o])=>Array.isArray(o)&&o.length>0).map(([s,o])=>[s,o.join(",")]));Object.assign(l,i),v.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(n.query){const t=n.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};a.state.filter=r}});const _=h,k=()=>{_("resetFilters")},p={locale:"en",messages:{en:{categoriesTitle:"Category",categories:[],filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{categoriesTitle:"ะšะฐั‚ะตะณะพั€ะธั",categories:[],filters:{title:"ะคะธะปัŒั‚ั€ั‹",price:{title:"ะฆะตะฝะฐ",from:"ะžั‚",to:"ะ”ะพ"},filters:[],reset:"ะกะฑั€ะพัะธั‚ัŒ ั„ะธะปัŒั‚ั€ั‹"}}}};u.state.all.forEach(t=>{t.localization.forEach(r=>{p.messages[r.locale].categories.push(r.text)})});const{t:c}=x.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",q,e.toDisplayString(e.unref(c)("categoriesTitle")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.state.all,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.name,value:l.url,class:"w-100 mn-t-small mn-b-small bg-white radius-small pd-small",radio:a.state.filter.categories,"onUpdate:radio":r[0]||(r[0]=s=>a.state.filter.categories=s)},null,8,["label","value","radio"]))),128))]),_:1}),E,e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",F,e.toDisplayString(e.unref(c)("filters.price.title")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.prices,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.prices,"onUpdate:radio":r[1]||(r[1]=s=>a.state.filter.prices=s)},null,8,["label","value","radio"]))),128))]),_:1}),B,e.createElementVNode("button",{onClick:k,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=C;
@@ -1,6 +1,6 @@
1
1
  import { withAsyncContext as A, ref as P, watch as T, onMounted as V, openBlock as a, createElementBlock as d, createVNode as h, withCtx as c, createElementVNode as o, toDisplayString as p, unref as b, Fragment as _, renderList as v, createBlock as x } from "vue";
2
2
  import w from "../../../../components/Spoiler/Spoiler.vue2.js";
3
- import F from "../../../../components/Checkbox/Checkbox.vue.js";
3
+ import F from "../../../../components/Checkbox/Checkbox.vue2.js";
4
4
  import { useI18n as B } from "vue-i18n";
5
5
  import { useRoute as R, useRouter as U } from "vue-router";
6
6
  import { actions as $, state as k } from "../../store/categories.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../icons/navigation/IconEdit.vue.cjs"),h=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),p=require("../blocks/Images360.vue.cjs"),k=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const f=require("../elements/Price.vue.cjs"),b=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),y={class:"cols-2-1_2 w-100 gap-big"},v={class:"flex-nowrap flex-column flex pos-relative"},B={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},V=["src"],E={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},N={key:0,class:"t-main t-semi p-big"},w={class:"w-100 h1-product mn-b-thin"},C={key:1,class:"mn-b-semi"},S={key:2,class:"w-100 mn-b-medium t-transp"},q={key:3,class:"w-100 mn-b-medium t-transp"},x={class:"cols-2 w-100 gap-small mn-b-semi"},z={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},I={class:"t-demi"},D={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},P={__name:"SectionProduct",props:{product:{type:Object,required:!0},recommendation:{type:String}},setup(t){const s=t,a=e.computed(()=>s.product.images),d={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI ะ ะตะบะพะผะตะฝะดัƒะตั‚ ะฒะฐะผ",description:"",addtoorder:"ะ”ะพะฑะฐะฒะธั‚ัŒ ะฒ ะบะพั€ะทะธะฝัƒ",fastorder:"ะ‘ั‹ัั‚ั€ั‹ะน ะทะฐะบะฐะท"}}},{t:c}=b.useI18n(d);function l(o){return!(o.quantity>0)}function m(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,i)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",v,[e.createElementVNode("div",B,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(p.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,V)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(h.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(k.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",E,[e.createVNode(g.default,{onClick:i[0]||(i[0]=r=>o.$router.push({name:"ProductEdit",params:{_id:t.product.organization,product:t.product._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),t.recommendation?(e.openBlock(),e.createElementBlock("h2",N,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",w,e.toDisplayString(t.product.name),1),e.createVNode(f.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",C,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",q,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",x,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("p",I,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",D,[e.createVNode(u.default,{submit:r=>m(t.product),disabled:l(t.product),text:{success:" โœ” Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../icons/navigation/IconEdit.vue.cjs"),h=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),p=require("../blocks/Images360.vue.cjs"),k=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const f=require("../elements/Price.vue.cjs"),y=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),b={class:"cols-2-1_2 w-100 gap-big"},v={class:"flex-nowrap flex-column flex pos-relative"},B={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},V=["src"],E={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},N={key:0,class:"t-main t-semi p-big"},w={class:"w-100 h1-product mn-b-thin"},C={key:1,class:"mn-b-semi"},S={key:2,class:"w-100 mn-b-medium t-transp"},q={key:3,class:"w-100 mn-b-medium t-transp"},x={class:"cols-2 w-100 gap-small mn-b-semi"},z={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},I={class:"t-demi"},D={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},P={__name:"SectionProduct",props:{product:{type:Object,required:!0},user:{type:String},recommendation:{type:String}},setup(t){const s=t,a=e.computed(()=>s.product.images),d={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI ะ ะตะบะพะผะตะฝะดัƒะตั‚ ะฒะฐะผ",description:"",addtoorder:"ะ”ะพะฑะฐะฒะธั‚ัŒ ะฒ ะบะพั€ะทะธะฝัƒ",fastorder:"ะ‘ั‹ัั‚ั€ั‹ะน ะทะฐะบะฐะท"}}},{t:c}=y.useI18n(d);function l(o){return!(o.quantity>0)}function m(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,i)=>(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("div",v,[e.createElementVNode("div",B,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(p.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,V)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(h.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(k.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",E,[e.createVNode(g.default,{onClick:i[0]||(i[0]=r=>o.$router.push({name:"ProductEdit",params:{_id:t.product.organization,product:t.product._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),t.recommendation?(e.openBlock(),e.createElementBlock("h2",N,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",w,e.toDisplayString(t.product.name),1),e.createVNode(f.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",C,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",q,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",x,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("p",I,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",D,[e.createVNode(u.default,{submit:r=>m(t.product),disabled:l(t.product),text:{success:" โœ” Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=P;
@@ -1,14 +1,14 @@
1
- import { computed as y, openBlock as e, createElementBlock as i, createElementVNode as r, createBlock as m, createCommentVNode as a, createVNode as l, toDisplayString as s, unref as u, Fragment as w, renderList as k, withCtx as x, createTextVNode as z } from "vue";
2
- import C from "../../../../components/Button/Button.vue.js";
1
+ import { computed as v, openBlock as e, createElementBlock as a, createElementVNode as r, createBlock as m, createCommentVNode as i, createVNode as l, toDisplayString as s, unref as u, Fragment as w, renderList as k, withCtx as x, createTextVNode as z } from "vue";
2
+ import C from "../../../../components/Button/Button.vue2.js";
3
3
  import I from "../../../icons/navigation/IconEdit.vue.js";
4
4
  import E from "../../../icons/placeholders/PlaceholderImage.vue.js";
5
5
  import P from "../blocks/Images360.vue.js";
6
6
  import $ from "../blocks/ImagesThumbnails.vue.js";
7
7
  import "../elements/THC.vue2.js";
8
- import T from "../elements/Price.vue.js";
9
- import { useI18n as V } from "vue-i18n";
10
- import { state as g, actions as j } from "../../../orders/store/shopcart.js";
11
- const A = { class: "cols-2-1_2 w-100 gap-big" }, N = { class: "flex-nowrap flex-column flex pos-relative" }, R = { class: "h-100 h-max-50vh bg-grey radius-big o-hidden" }, S = ["src"], B = { class: "pos-relative w-100 h-100 flex-column flex-justify flex col" }, F = {
8
+ import S from "../elements/Price.vue.js";
9
+ import { useI18n as T } from "vue-i18n";
10
+ import { state as g, actions as V } from "../../../orders/store/shopcart.js";
11
+ const j = { class: "cols-2-1_2 w-100 gap-big" }, A = { class: "flex-nowrap flex-column flex pos-relative" }, N = { class: "h-100 h-max-50vh bg-grey radius-big o-hidden" }, R = ["src"], B = { class: "pos-relative w-100 h-100 flex-column flex-justify flex col" }, F = {
12
12
  key: 0,
13
13
  class: "t-main t-semi p-big"
14
14
  }, L = { class: "w-100 h1-product mn-b-thin" }, q = {
@@ -27,12 +27,15 @@ const A = { class: "cols-2-1_2 w-100 gap-big" }, N = { class: "flex-nowrap flex-
27
27
  type: Object,
28
28
  required: !0
29
29
  },
30
+ user: {
31
+ type: String
32
+ },
30
33
  recommendation: {
31
34
  type: String
32
35
  }
33
36
  },
34
37
  setup(t) {
35
- const f = t, n = y(() => f.product.images), b = {
38
+ const f = t, n = v(() => f.product.images), p = {
36
39
  messages: {
37
40
  en: {
38
41
  airecommend: "AI Recommends You",
@@ -47,39 +50,39 @@ const A = { class: "cols-2-1_2 w-100 gap-big" }, N = { class: "flex-nowrap flex-
47
50
  fastorder: "ะ‘ั‹ัั‚ั€ั‹ะน ะทะฐะบะฐะท"
48
51
  }
49
52
  }
50
- }, { t: c } = V(b);
51
- function p(o) {
53
+ }, { t: c } = T(p);
54
+ function b(o) {
52
55
  return !(o.quantity > 0);
53
56
  }
54
- function v(o) {
55
- g.organization !== o.organization && (g.positions = [], g.organization = o.organization), j.addProductToCart(o, o.organization);
57
+ function y(o) {
58
+ g.organization !== o.organization && (g.positions = [], g.organization = o.organization), V.addProductToCart(o, o.organization);
56
59
  }
57
- return (o, h) => (e(), i("div", A, [
58
- r("div", N, [
59
- r("div", R, [
60
+ return (o, h) => (e(), a("div", j, [
61
+ r("div", A, [
62
+ r("div", N, [
60
63
  t.product && t.product.image3d ? (e(), m(P, {
61
64
  key: 0,
62
65
  class: "h-100 w-100",
63
66
  imagePath: `/assets/images/products/${t.product.image3d}`,
64
67
  imageCount: 36
65
- }, null, 8, ["imagePath"])) : a("", !0),
66
- n.value[0] && !t.product.image3d ? (e(), i("img", {
68
+ }, null, 8, ["imagePath"])) : i("", !0),
69
+ n.value[0] && !t.product.image3d ? (e(), a("img", {
67
70
  key: 1,
68
71
  class: "h-100 bg-grey w-100",
69
72
  style: { "object-fit": "contain" },
70
73
  src: (o.FILE_SERVER_URL || "") + n.value[0]
71
- }, null, 8, S)) : a("", !0),
74
+ }, null, 8, R)) : i("", !0),
72
75
  !n.value[0] && !t.product.image3d ? (e(), m(E, {
73
76
  key: 2,
74
77
  class: "h-100 w-100",
75
78
  style: { "object-fit": "cover" }
76
- })) : a("", !0)
79
+ })) : i("", !0)
77
80
  ]),
78
81
  n.value.length > 1 ? (e(), m($, {
79
82
  key: 0,
80
83
  images: n.value,
81
84
  class: "mn-t-medium"
82
- }, null, 8, ["images"])) : a("", !0)
85
+ }, null, 8, ["images"])) : i("", !0)
83
86
  ]),
84
87
  r("div", B, [
85
88
  l(I, {
@@ -92,26 +95,26 @@ const A = { class: "cols-2-1_2 w-100 gap-big" }, N = { class: "flex-nowrap flex-
92
95
  })),
93
96
  class: "pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
94
97
  }),
95
- t.recommendation ? (e(), i("h2", F, s(u(c)("airecommend")), 1)) : a("", !0),
98
+ t.recommendation ? (e(), a("h2", F, s(u(c)("airecommend")), 1)) : i("", !0),
96
99
  r("h1", L, s(t.product.name), 1),
97
- l(T, {
100
+ l(S, {
98
101
  product: t.product,
99
102
  size: "big",
100
103
  class: "mn-b-semi"
101
104
  }, null, 8, ["product"]),
102
- t.recommendation ? (e(), i("h3", q, s(t.recommendation), 1)) : a("", !0),
103
- t.product.description && !t.product.localization < 1 && !t.recommendation ? (e(), i("p", O, s(t.product.description), 1)) : a("", !0),
104
- t.product.localization && t.product.localization.length > 1 && !t.recommendation ? (e(), i("p", D, s(u(c)("description")), 1)) : a("", !0),
105
+ t.recommendation ? (e(), a("h3", q, s(t.recommendation), 1)) : i("", !0),
106
+ t.product.description && !t.product.localization < 1 && !t.recommendation ? (e(), a("p", O, s(t.product.description), 1)) : i("", !0),
107
+ t.product.localization && t.product.localization.length > 1 && !t.recommendation ? (e(), a("p", D, s(u(c)("description")), 1)) : i("", !0),
105
108
  r("div", U, [
106
- t.product.information.length > 0 ? (e(!0), i(w, { key: 0 }, k(t.product.information, (d) => (e(), i("div", Y, [
109
+ t.product.information.length > 0 ? (e(!0), a(w, { key: 0 }, k(t.product.information, (d) => (e(), a("div", Y, [
107
110
  r("p", G, s(d.name), 1),
108
111
  r("p", null, s(d.value), 1)
109
- ]))), 256)) : a("", !0)
112
+ ]))), 256)) : i("", !0)
110
113
  ]),
111
114
  r("div", H, [
112
115
  l(C, {
113
- submit: (d) => v(t.product),
114
- disabled: p(t.product),
116
+ submit: (d) => y(t.product),
117
+ disabled: b(t.product),
115
118
  text: {
116
119
  success: " โœ” Added",
117
120
  error: "error"
@@ -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(l){const t=l,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function i(){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(e.Fragment,null,[e.createElementVNode("div",{onClick:o[0]||(o[0]=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[1]||(o[1]=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:i,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])],64))}};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.vue2.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(l){const t=l,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function i(){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(e.Fragment,null,[e.createElementVNode("div",{onClick:o[0]||(o[0]=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[1]||(o[1]=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:i,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])],64))}};exports.default=h;
@@ -1,7 +1,7 @@
1
1
  import { reactive as d, ref as f, openBlock as b, createElementBlock as g, Fragment as h, createElementVNode as o, renderSlot as y, createVNode as a, withCtx as l, createTextVNode as _ } from "vue";
2
- import v from "../../../../components/Popup/Popup.vue.js";
3
- import w from "../../../../components/Button/Button.vue.js";
4
- import S from "../../../../components/Select/Select.vue.js";
2
+ import v from "../../../../components/Popup/Popup.vue2.js";
3
+ import w from "../../../../components/Button/Button.vue2.js";
4
+ import S from "../../../../components/Select/Select.vue2.js";
5
5
  import { actions as k } from "../../store/reports.js";
6
6
  const P = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, " Report Content ", -1), R = /* @__PURE__ */ o("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), x = /* @__PURE__ */ o("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), V = {
7
7
  __name: "FormReport",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");const g=require("../../../../components/Dropdown/Dropdown.vue.cjs"),d=require("../../../mobile/components/Menu/Menu.vue2.cjs"),l=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),h=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=require("../sections/ProfileCompletion.vue.cjs"),B=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),C=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),y=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const v={key:0,class:"for-transition w-100"},x={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},L={key:5,class:"mn-t-small mn-b-thin"},O=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),A=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",null," About ",-1),T=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),H={__name:"Profile",setup(J){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{y.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",v,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",x," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(V.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(g.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(h.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(C.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(E.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Not specified"),1),e.createElementVNode("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:4,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",L," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(N.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"i-semi",icon:!0}),O]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),j]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),A]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{onClick:r[8]||(r[8]=s=>e.unref(n).push({name:"Legal",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[G]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[9]||(r[9]=s=>b())},{default:e.withCtx(()=>[T]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=H;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const g=require("../../../../components/Dropdown/Dropdown.vue.cjs"),d=require("../../../mobile/components/Menu/Menu.vue2.cjs"),l=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),h=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=require("../sections/ProfileCompletion.vue.cjs"),B=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),C=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),y=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const v={key:0,class:"for-transition w-100"},x={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},L={key:5,class:"mn-t-small mn-b-thin"},O=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),A=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",null," About ",-1),T=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),H={__name:"Profile",setup(J){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{y.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",v,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",x," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(V.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(g.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(h.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(C.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(E.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Not specified"),1),e.createElementVNode("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:4,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",L," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(N.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"i-semi",icon:!0}),O]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),j]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),A]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{onClick:r[8]||(r[8]=s=>e.unref(n).push({name:"Legal",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[G]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[9]||(r[9]=s=>b())},{default:e.withCtx(()=>[T]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=H;
@@ -1,6 +1,6 @@
1
1
  import { ref as U, onMounted as C, openBlock as o, createElementBlock as p, unref as r, createBlock as c, createCommentVNode as m, createElementVNode as i, withCtx as u, createVNode as n, toDisplayString as f, Fragment as E, renderList as S, normalizeClass as B } from "vue";
2
- import "../../../../components/Field/Field.vue2.js";
3
- import "../../../../components/Button/Button.vue2.js";
2
+ import "../../../../components/Field/Field.vue.js";
3
+ import "../../../../components/Button/Button.vue.js";
4
4
  import M from "../../../../components/Dropdown/Dropdown.vue.js";
5
5
  import k from "../../../mobile/components/Menu/Menu.vue2.js";
6
6
  import _ from "../../../mobile/components/Menu/MenuItem.vue.js";
@@ -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.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 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.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 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 t, 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.vue.js";
3
+ import y from "../../../../components/Tab/Tab.vue2.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.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
+ "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.vue2.cjs"),m=require("../../../../components/Button/Button.vue2.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,8 +1,8 @@
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.vue2.js";
4
- import t from "../../../../components/Field/Field.vue.js";
5
- import v from "../../../../components/Button/Button.vue.js";
3
+ import "../../../../components/Tab/Tab.vue.js";
4
+ import t from "../../../../components/Field/Field.vue2.js";
5
+ import v from "../../../../components/Button/Button.vue2.js";
6
6
  import A from "../../../../components/UploadImage/UploadImage.vue.js";
7
7
  import R from "../sections/ProfileCompletion.vue.js";
8
8
  import { useRoute as $, useRouter as D } from "vue-router";
@@ -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.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
+ "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=_;