@ozdao/prometheus-framework 0.2.59 → 0.2.60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/dist/community.server.js +1 -1
  2. package/dist/community.server.mjs +1 -1
  3. package/dist/events.server.js +23 -3
  4. package/dist/events.server.mjs +23 -3
  5. package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
  6. package/dist/metadata.schema-doiYQfuO.js +209 -0
  7. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  9. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -373
  11. package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +51 -1
  13. package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +1 -51
  15. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  17. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  19. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  21. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  36. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  37. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  42. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +44 -44
  43. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +31 -31
  51. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  55. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +166 -123
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +56 -45
  61. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/orders/store/orders.js +19 -24
  63. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +15 -15
  77. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +8 -8
  81. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  89. package/dist/style.css +1 -1
  90. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const C=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const v=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const n=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const N=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Popup/Popup.vue.cjs"),V=require("../../../../components/Block/Block.vue.cjs");require("../blocks/EditArray.vue2.cjs");const P=require("../blocks/DepartmentSub.vue.cjs"),k=require("../blocks/DepartmentMemberModify.vue.cjs"),x=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),p=require("../../store/memberships.cjs"),O={class:"for-transition pd-thin w-100"},M={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},S={key:0,class:"mn-r-auto"},T={key:1,class:"mn-r-auto"},U={class:"flex-nowrap flex pd-thin"},z={class:"cols-2-fit-content"},F={class:"w-100 flex-child-grow-1 flex-child"},R={class:"cols-2 gap-thin"},$={class:"bg-grey pd-medium o-hidden radius-big"},A=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),L=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),j={class:"cols-1 gap-thin"},H=e.createElementVNode("h4",null,"Products",-1),I={class:"bg-grey pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),J=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),K={class:"cols-1 gap-thin"},Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X={key:1,class:"flex-nowrap flex pd-thin"},Y={id:"dash",class:"pd-medium bg-white"},Z={class:"mn-b-regular flex-v-center flex-nowrap flex"},ee=e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1),te={class:"mn-b-small"},ae={key:0},le={__name:"DepartmentEdit",setup(re){const w=_.useRouter(),l=_.useRoute();async function y(){l.params.department&&await p.actions.read({target:l.params._id}),e.ref(p.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}y();const d=e.ref(!1),i=e.ref(null);function u(r){d.value=!0,typeof r=="number"&&(i.value=r)}function f(){d.value=!1,i.value=null}const m=e.ref(!1),c=e.ref(null);function h(r){m.value=!0,typeof r=="number"&&(c.value=r)}function b(){m.value=!1,c.value=null}async function E(){l.params.department&&await t.actions.update(l.params._id,t.state.department),l.params.department||await t.actions.create(l.params._id,t.state.department)}function D(){w.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function q(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",M,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",S,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",T,"Create Department")),e.createElementVNode("section",U,[e.createVNode(N.default,{submit:E,callback:D,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(V.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createVNode(C.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",F,[e.createVNode(v.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(v.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(V.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>u()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,o)=>(e.openBlock(),e.createBlock(x.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:o,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,onClick:B=>u(o)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(g.default,{title:"Добавить участника",onClosePopup:f,isPopupOpen:d.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(k.default,{members:t.state.department.members,member:i.value,users:p.state.memberships,onCallback:f},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",R,[e.createElementVNode("div",$,[A,L,e.createElementVNode("div",j,[H,e.createVNode(n.default,{label:"Hidden department",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])]),e.createElementVNode("div",I,[G,J,e.createElementVNode("div",K,[Q,e.createVNode(n.default,{label:"See products",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Edit products",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),W,e.createVNode(n.default,{label:"See orders",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Confirm orders",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])])]),e.unref(l).params.department?(e.openBlock(),e.createElementBlock("section",X,[e.createVNode(N.default,{submit:q,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createVNode(g.default,{title:"Добавить подотдел",onClosePopup:b,isPopupOpen:m.value},{default:e.withCtx(()=>[e.createVNode(k.default,{departments:t.state.department.subdepartments,department:c.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:b},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",Z,[ee,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>h())},"+")])]),e.createElementVNode("ul",te,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",ae,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,o)=>(e.openBlock(),e.createBlock(P.default,{key:o,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:B=>h(o)},null,8,["department","onClick"]))),128))])])]))}};exports.default=le;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const C=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const v=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const n=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue2.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const N=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Popup/Popup.vue.cjs"),V=require("../../../../components/Block/Block.vue.cjs");require("../blocks/EditArray.vue2.cjs");const P=require("../blocks/DepartmentSub.vue.cjs"),k=require("../blocks/DepartmentMemberModify.vue.cjs"),x=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),p=require("../../store/memberships.cjs"),O={class:"for-transition pd-thin w-100"},M={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},S={key:0,class:"mn-r-auto"},T={key:1,class:"mn-r-auto"},U={class:"flex-nowrap flex pd-thin"},z={class:"cols-2-fit-content"},F={class:"w-100 flex-child-grow-1 flex-child"},R={class:"cols-2 gap-thin"},$={class:"bg-grey pd-medium o-hidden radius-big"},A=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),L=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),j={class:"cols-1 gap-thin"},H=e.createElementVNode("h4",null,"Products",-1),I={class:"bg-grey pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),J=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),K={class:"cols-1 gap-thin"},Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X={key:1,class:"flex-nowrap flex pd-thin"},Y={id:"dash",class:"pd-medium bg-white"},Z={class:"mn-b-regular flex-v-center flex-nowrap flex"},ee=e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1),te={class:"mn-b-small"},ae={key:0},le={__name:"DepartmentEdit",setup(re){const w=_.useRouter(),l=_.useRoute();async function y(){l.params.department&&await p.actions.read({target:l.params._id}),e.ref(p.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}y();const d=e.ref(!1),i=e.ref(null);function u(r){d.value=!0,typeof r=="number"&&(i.value=r)}function f(){d.value=!1,i.value=null}const m=e.ref(!1),c=e.ref(null);function h(r){m.value=!0,typeof r=="number"&&(c.value=r)}function b(){m.value=!1,c.value=null}async function E(){l.params.department&&await t.actions.update(l.params._id,t.state.department),l.params.department||await t.actions.create(l.params._id,t.state.department)}function D(){w.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function q(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",M,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",S,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",T,"Create Department")),e.createElementVNode("section",U,[e.createVNode(N.default,{submit:E,callback:D,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(V.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createVNode(C.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",F,[e.createVNode(v.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(v.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(V.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>u()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,o)=>(e.openBlock(),e.createBlock(x.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:o,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,onClick:B=>u(o)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(g.default,{title:"Добавить участника",onClosePopup:f,isPopupOpen:d.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(k.default,{members:t.state.department.members,member:i.value,users:p.state.memberships,onCallback:f},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",R,[e.createElementVNode("div",$,[A,L,e.createElementVNode("div",j,[H,e.createVNode(n.default,{label:"Hidden department",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])]),e.createElementVNode("div",I,[G,J,e.createElementVNode("div",K,[Q,e.createVNode(n.default,{label:"See products",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Edit products",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),W,e.createVNode(n.default,{label:"See orders",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Confirm orders",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])])]),e.unref(l).params.department?(e.openBlock(),e.createElementBlock("section",X,[e.createVNode(N.default,{submit:q,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createVNode(g.default,{title:"Добавить подотдел",onClosePopup:b,isPopupOpen:m.value},{default:e.withCtx(()=>[e.createVNode(k.default,{departments:t.state.department.subdepartments,department:c.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:b},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",Z,[ee,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>h())},"+")])]),e.createElementVNode("ul",te,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",ae,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,o)=>(e.openBlock(),e.createBlock(P.default,{key:o,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:B=>h(o)},null,8,["department","onClick"]))),128))])])]))}};exports.default=le;
@@ -10,7 +10,7 @@ import $ from "../../../../components/Field/Field.vue.js";
10
10
  import "../../../../components/Select/Select.vue2.js";
11
11
  import m from "../../../../components/Checkbox/Checkbox.vue.js";
12
12
  import "../../../../components/Address/Address.vue.js";
13
- import "../../../../components/Loader/Loader.vue.js";
13
+ import "../../../../components/Loader/Loader.vue2.js";
14
14
  import "../../../../components/LocationMarker/LocationMarker.vue.js";
15
15
  import O from "../../../../components/Button/Button.vue.js";
16
16
  import S from "../../../../components/Popup/Popup.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");require("../../../../components/Field/Field.vue2.cjs");const _=require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue2.cjs");require("vue-i18n");require("../../../../components/Field/Field.vue2.cjs");const _=require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
@@ -1,12 +1,12 @@
1
1
  import { ref as p, onMounted as $, computed as k, openBlock as a, createBlock as _, Transition as x, withCtx as C, createElementVNode as t, createVNode as f, createElementBlock as r, Fragment as b, renderList as v, createCommentVNode as l, toDisplayString as d } from "vue";
2
2
  import { useRoute as M, useRouter as I } from "vue-router";
3
- import "../../../../components/Loader/Loader.vue.js";
3
+ import "../../../../components/Loader/Loader.vue2.js";
4
4
  import "vue-i18n";
5
5
  import "../../../../components/Field/Field.vue2.js";
6
6
  import S from "../../../../components/Tab/Tab.vue2.js";
7
7
  import "../../../../components/Tooltip/Tooltip.vue2.js";
8
8
  import z from "../sections/MembersAdd.vue.js";
9
- import "../../../mobile/components/Menu/Menu.vue2.js";
9
+ import "../../../mobile/components/Menu/Menu.vue.js";
10
10
  import "../../../mobile/components/Menu/MenuItem.vue.js";
11
11
  import B from "../blocks/User.vue.js";
12
12
  import { state as E } from "../../../auth/store/auth.js";
@@ -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 k=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),B=require("../../store/departments.cjs"),N=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const V={key:0,class:"pd-thin for-transition w-100"},x={class:"pos-relative"},z={key:0},T={__name:"Organization",setup($){const _=m.useRouter(),t=m.useRoute();let b=t.query.tab?t.query.tab:"products";const c=e.ref(null);e.onMounted(async()=>{c.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(b);return t.query.tab=r.value,e.watch(r,i=>{_.replace({query:null})}),(i,n)=>{const u=e.resolveComponent("router-link");return c.value?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(w.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${a.state.current.numberOfMembers} members`,actions:[{label:">",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}],class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(f.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:o=>B.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(h.default,{key:d,department:l,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["title","actions"]),e.createVNode(k.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=o=>r.value=o),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",x,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(g.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(p.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:o=>N.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=o=>i.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=T;
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 k=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),B=require("../../store/departments.cjs"),N=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const V={key:0,class:"pd-thin for-transition w-100"},x={class:"pos-relative"},z={key:0},T={__name:"Organization",setup($){const _=m.useRouter(),t=m.useRoute();let b=t.query.tab?t.query.tab:"products";const c=e.ref(null);e.onMounted(async()=>{c.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(b);return t.query.tab=r.value,e.watch(r,i=>{_.replace({query:null})}),(i,n)=>{const u=e.resolveComponent("router-link");return c.value?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(w.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${a.state.current.numberOfMembers} members`,actions:[{label:">",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}],class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(f.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:o=>B.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(h.default,{key:d,department:l,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["title","actions"]),e.createVNode(k.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=o=>r.value=o),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",x,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(g.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(p.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:o=>N.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=o=>i.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=T;
@@ -6,7 +6,7 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import P from "../../../../components/Tab/Tab.vue2.js";
7
7
  import $ from "../../../../components/Block/Block.vue.js";
8
8
  import z from "../../../../components/Feed/Feed.vue.js";
9
- import "../../../mobile/components/Menu/Menu.vue2.js";
9
+ import "../../../mobile/components/Menu/Menu.vue.js";
10
10
  import "../../../mobile/components/Menu/MenuItem.vue.js";
11
11
  import "../blocks/DepartmentSub.vue2.js";
12
12
  import "../blocks/User.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const g=require("../../../../components/EmptyState/EmptyState.vue.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),p=require("../../../icons/skeletons/SkeletonOrganization.vue.cjs"),c=require("../../store/organizations.cjs"),f={class:"pos-relative"},y={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(s){const t=s,r=e.ref([]),n=e.ref(!1),o=e.ref(!0),i=e.ref(0),u=e.ref(20),d=async()=>{if(n.value){i.value+=u.value;const a=await c.actions.read({skip:i.value,limit:u.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=[...r.value,...a]}};return e.onMounted(async()=>{o.value=!0;const a=await c.actions.read({skip:i.value,limit:u.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=a,o.value=!1}),(a,b)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[o.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,l=>(e.openBlock(),e.createBlock(p.default,{key:l}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!o.value&&r.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-b-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"cols-1"},{default:e.withCtx(()=>[!o.value&&r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(l,v)=>(e.openBlock(),e.createBlock(m.default,{onClick:k=>a.$router.push({name:"Organization",params:{_id:l._id}}),key:l._id,organization:l,user:s.user,type:"normal",class:"w-100 radius-big mn-b-medium"},null,8,["onClick","organization","user"]))),128)):e.createCommentVNode("",!0),n.value&&r.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue2.cjs");const g=require("../../../../components/EmptyState/EmptyState.vue.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),p=require("../../../icons/skeletons/SkeletonOrganization.vue.cjs"),c=require("../../store/organizations.cjs"),f={class:"pos-relative"},y={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(s){const t=s,r=e.ref([]),n=e.ref(!1),o=e.ref(!0),i=e.ref(0),u=e.ref(20),d=async()=>{if(n.value){i.value+=u.value;const a=await c.actions.read({skip:i.value,limit:u.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=[...r.value,...a]}};return e.onMounted(async()=>{o.value=!0;const a=await c.actions.read({skip:i.value,limit:u.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=a,o.value=!1}),(a,b)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[o.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,l=>(e.openBlock(),e.createBlock(p.default,{key:l}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!o.value&&r.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-b-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"cols-1"},{default:e.withCtx(()=>[!o.value&&r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(l,v)=>(e.openBlock(),e.createBlock(m.default,{onClick:k=>a.$router.push({name:"Organization",params:{_id:l._id}}),key:l._id,organization:l,user:s.user,type:"normal",class:"w-100 radius-big mn-b-medium"},null,8,["onClick","organization","user"]))),128)):e.createCommentVNode("",!0),n.value&&r.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=y;
@@ -1,5 +1,5 @@
1
1
  import { ref as i, onMounted as h, openBlock as a, createElementBlock as o, createVNode as m, TransitionGroup as y, withCtx as g, Fragment as b, renderList as v, createBlock as p, createCommentVNode as d, Transition as z } from "vue";
2
- import "../../../../components/Loader/Loader.vue.js";
2
+ import "../../../../components/Loader/Loader.vue2.js";
3
3
  import S from "../../../../components/EmptyState/EmptyState.vue.js";
4
4
  import w from "../blocks/CardOrganization.vue.js";
5
5
  import O from "../../../icons/skeletons/SkeletonOrganization.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Field/Field.vue.cjs"),y=require("../../../../components/Select/Select.vue.cjs"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../icons/navigation/IconAdd.vue.cjs"),V=require("../../../icons/navigation/IconDelete.vue.cjs"),q={class:"gap-thin flex-nowrap flex"},k=["disabled"],N={__name:"CardPosition",props:{product:Object,array:Array,products:Array},emits:["add","delete","update"],setup(c,{emit:n}){const t=c,s=n,l=e.ref(null),a=e.ref(1),d=e.ref("pcs"),u=e.ref(0),p=e.computed(()=>l.value&&a.value>0&&u.value>0);e.watch(t.array,()=>{l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,d.value=t.product.type}),t.product&&(l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,d.value=t.product.type),e.watch([l,a,u,d],()=>{s("update",{...l.value,price:u.value,quantity:a.value||1,type:d.value})});function m(){s("add",{...l.value,price:u.value,quantity:a.value||1,type:d.value})}function v(){s("delete",{...l.value,price:u.value,quantity:a.value||1,type:d.value})}return(f,r)=>(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(b.default,{modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=o=>l.value=o),options:c.products,label:"name",multiple:!1,taggable:!1,placeholder:"Select a product",class:"bg-white pd-small radius-small"},null,8,["modelValue","options"]),e.createVNode(i.default,{field:u.value,"onUpdate:field":r[1]||(r[1]=o=>u.value=o),type:"number",label:"Price",symbol:f.returnCurrency(),class:"bg-white pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(i.default,{field:a.value,"onUpdate:field":r[3]||(r[3]=o=>a.value=o),type:"number",label:"Quantity",class:"bg-white pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(y.default,{select:d.value,"onUpdate:select":r[2]||(r[2]=o=>d.value=o),options:["pcs","g","ml"],class:"bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),c.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!p.value,onClick:m,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(g.default),{class:"i-semi"})],8,k)),c.product?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(V.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Field/Field.vue.cjs"),y=require("../../../../components/Select/Select.vue.cjs"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../icons/navigation/IconAdd.vue.cjs"),V=require("../../../icons/navigation/IconDelete.vue.cjs"),q={class:"gap-thin flex-nowrap flex"},k=["disabled"],N={__name:"CardPosition",props:{product:Object,array:Array,products:Array},emits:["add","delete","update"],setup(c,{emit:n}){const t=c,s=n,l=e.ref(null),a=e.ref(1),d=e.ref("pcs"),u=e.ref(0),p=e.computed(()=>l.value&&a.value>0&&u.value>0);e.watch(t.array,()=>{l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,d.value=t.product.type}),t.product&&(l.value=t.product,a.value=t.product.quantity||1,u.value=t.product.price,d.value=t.product.type),e.watch([l,a,u,d],()=>{s("update",{...l.value,price:u.value,quantity:a.value||1,type:d.value})});function m(){s("add",{...l.value,price:u.value,quantity:a.value||1,type:d.value})}function v(){s("delete",{...l.value,price:u.value,quantity:a.value||1,type:d.value})}return(f,r)=>(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(b.default,{modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=o=>l.value=o),options:c.products,label:"name",multiple:!1,taggable:!1,placeholder:"Select a product",class:"bg-white pd-small radius-small"},null,8,["modelValue","options"]),e.createVNode(i.default,{field:u.value,"onUpdate:field":r[1]||(r[1]=o=>u.value=o),type:"number",label:"Price",symbol:f.returnCurrency(),class:"bg-white pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(i.default,{field:a.value,"onUpdate:field":r[3]||(r[3]=o=>a.value=o),type:"number",label:"Qty",class:"bg-white pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(y.default,{select:d.value,"onUpdate:select":r[2]||(r[2]=o=>d.value=o),options:["pcs","g","ml"],class:"bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),c.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!p.value,onClick:m,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(g.default),{class:"i-semi"})],8,k)),c.product?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(V.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]))}};exports.default=N;
@@ -17,39 +17,39 @@ const U = { class: "gap-thin flex-nowrap flex" }, Q = ["disabled"], F = {
17
17
  "update"
18
18
  ],
19
19
  setup(s, { emit: b }) {
20
- const e = s, p = b, t = i(null), l = i(1), u = i("pcs"), a = i(0), g = C(
21
- () => t.value && l.value > 0 && a.value > 0
20
+ const e = s, p = b, l = i(null), t = i(1), u = i("pcs"), a = i(0), g = C(
21
+ () => l.value && t.value > 0 && a.value > 0
22
22
  );
23
23
  m(e.array, () => {
24
- t.value = e.product, l.value = e.product.quantity || 1, a.value = e.product.price, u.value = e.product.type;
25
- }), e.product && (t.value = e.product, l.value = e.product.quantity || 1, a.value = e.product.price, u.value = e.product.type), m([t, l, a, u], () => {
24
+ l.value = e.product, t.value = e.product.quantity || 1, a.value = e.product.price, u.value = e.product.type;
25
+ }), e.product && (l.value = e.product, t.value = e.product.quantity || 1, a.value = e.product.price, u.value = e.product.type), m([l, t, a, u], () => {
26
26
  p("update", {
27
- ...t.value,
27
+ ...l.value,
28
28
  price: a.value,
29
- quantity: l.value || 1,
29
+ quantity: t.value || 1,
30
30
  type: u.value
31
31
  });
32
32
  });
33
33
  function k() {
34
34
  p("add", {
35
- ...t.value,
35
+ ...l.value,
36
36
  price: a.value,
37
- quantity: l.value || 1,
37
+ quantity: t.value || 1,
38
38
  type: u.value
39
39
  });
40
40
  }
41
41
  function w() {
42
42
  p("delete", {
43
- ...t.value,
43
+ ...l.value,
44
44
  price: a.value,
45
- quantity: l.value || 1,
45
+ quantity: t.value || 1,
46
46
  type: u.value
47
47
  });
48
48
  }
49
49
  return (x, o) => (c(), n("div", U, [
50
50
  d(q, {
51
- modelValue: t.value,
52
- "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
51
+ modelValue: l.value,
52
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => l.value = r),
53
53
  options: s.products,
54
54
  label: "name",
55
55
  multiple: !1,
@@ -66,10 +66,10 @@ const U = { class: "gap-thin flex-nowrap flex" }, Q = ["disabled"], F = {
66
66
  class: "bg-white pd-small radius-small"
67
67
  }, null, 8, ["field", "symbol"]),
68
68
  d(y, {
69
- field: l.value,
70
- "onUpdate:field": o[3] || (o[3] = (r) => l.value = r),
69
+ field: t.value,
70
+ "onUpdate:field": o[3] || (o[3] = (r) => t.value = r),
71
71
  type: "number",
72
- label: "Quantity",
72
+ label: "Qty",
73
73
  class: "bg-white pd-small radius-small"
74
74
  }, {
75
75
  default: P(() => [
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=require("../../../../components/Loader/Loader.vue2.cjs");require("./Images360.vue2.cjs");const b=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),k={class:"product-360-viewer"},y=e.createStaticVNode('<svg class="pos-absolute z-index-2 pos-b-0 pd-small" width="73" height="50" viewBox="0 0 73 50" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c6fa6581><path d="M42.5934 17.2017C42.5934 20.8208 39.8428 23.7544 36.45 23.7544C33.0573 23.7544 30.3066 20.8208 30.3066 17.2017C30.3066 13.5826 33.0573 10.6484 36.45 10.6484C39.8428 10.6484 42.5934 13.5826 42.5934 17.2017Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M22.5953 29.4883H50.3053C53.7389 29.4883 56.5197 26.778 56.5197 23.4405V10.8396C56.5197 7.49996 53.739 4.79176 50.3053 4.79176H48.8712C48.2747 2.05313 45.7826 0 42.7962 0H30.1063C27.1179 0 24.6257 2.053 24.0313 4.78967H22.5971C19.1656 4.78967 16.3828 7.49788 16.3828 10.8375V23.4384C16.3807 26.778 19.1634 29.4882 22.595 29.4882L22.5953 29.4883ZM36.449 8.31471C41.4535 8.31471 45.5123 12.2648 45.5123 17.1352C45.5123 22.0062 41.4535 25.9582 36.449 25.9582C31.4445 25.9582 27.3856 22.0081 27.3856 17.1377C27.3856 12.2673 31.4445 8.31471 36.449 8.31471ZM20.9092 9.32597H24.0182C24.9472 9.32597 25.7019 10.0584 25.7019 10.9625C25.7019 11.8686 24.9493 12.6011 24.0182 12.6011H20.9092C19.9823 12.6011 19.2254 11.8707 19.2254 10.9625C19.2275 10.0604 19.9822 9.32597 20.9092 9.32597Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M58.8645 12.2878C58.8645 12.2878 77.1839 21.8549 65.5604 32.0445C63.6718 33.6967 55.2747 38.9138 42.5947 39.9368V45.0519C50.0424 44.2514 61.7635 41.887 68.4037 34.9253C82.5323 20.1097 58.8657 12.2871 58.8657 12.2871L58.8645 12.2878Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M37.6664 41.209L29.1818 35.5097C28.077 34.7658 27.1702 35.2358 27.1702 36.5516V39.5855C16.2598 38.0408 9.07761 33.565 7.35125 32.0517C-4.2894 21.858 14.0557 12.2871 14.0557 12.2871C14.0557 12.2871 -9.64257 20.1134 4.5039 34.9343C10.2723 40.9769 19.8619 43.5552 27.1712 44.656V44.952V48.5701C27.1712 49.8901 28.078 50.3554 29.1827 49.6141L37.6673 43.9127C38.7757 43.1683 38.7757 41.9525 37.6673 41.2092L37.6664 41.209Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path></svg>',1),V={key:0,class:"h-100 w-100 transition-ease"},I=["src"],B={__name:"Images360",props:{imagePath:{type:String,required:!0},imageCount:{type:Number,default:36},autoRotateSpeed:{type:Number,default:100}},setup(m){const n=m,r=e.ref(0),c=e.ref(!1),u=e.ref(0),v=e.ref(0);e.ref(!0);const g=async()=>{const t=[];for(let a=1;a<=n.imageCount;a++){const l=new Image;l.src=`${n.imagePath}/${a}.jpg`;try{await l.decode(),v.value++}catch(d){console.warn(`Failed to decode ${n.imagePath}/${a}.jpg:`,d)}t.push(l)}return t},C=e.computed(()=>Math.round(v.value/n.imageCount*100)),s=e.ref([]),o=e.ref(""),h=e.ref(null);e.watch(r,t=>{o.value=s.value[t]||""});function p(t){c.value=!0,u.value=t.clientX||t.touches[0].clientX}function f(t){if(!c.value)return;const a=t.clientX||t.touches[0].clientX,l=a-u.value;if(Math.abs(l)>=5){const d=l>0?1:-1;r.value=(r.value+d)%n.imageCount,r.value<0&&(r.value=n.imageCount-1),u.value=a}}function i(){c.value=!1}let _=null;const w=()=>{s.value=[]};return e.onMounted(async()=>{s.value=await g(),o.value=s.value[0]||""}),e.onUnmounted(()=>{clearInterval(_),w()}),(t,a)=>(e.openBlock(),e.createElementBlock("div",k,[y,e.createVNode(e.Transition,{name:"scale5",css:!h.value,appear:""},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",V,[o.value?(e.openBlock(),e.createElementBlock("img",{key:o.value,class:"h-100 w-100 transition-ease",src:(t.FILE_SERVER_URL||"")+o.value.src,alt:"360 product view",onMousedown:p,onMousemove:f,onMouseup:i,onMouseleave:i,onTouchstart:p,onTouchmove:f,onTouchend:i,onDragstart:a[0]||(a[0]=e.withModifiers(()=>{},["prevent"]))},null,40,I)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1},8,["css"]),e.createVNode(e.Transition,{name:"scale5"},{default:e.withCtx(()=>[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:0,progress:C.value,class:"center z-index-5"},null,8,["progress"]))]),_:1})]))}},L=b.default(B,[["__scopeId","data-v-c6fa6581"]]);exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=require("../../../../components/Loader/Loader.vue.cjs");require("./Images360.vue2.cjs");const b=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),k={class:"product-360-viewer"},y=e.createStaticVNode('<svg class="pos-absolute z-index-2 pos-b-0 pd-small" width="73" height="50" viewBox="0 0 73 50" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c6fa6581><path d="M42.5934 17.2017C42.5934 20.8208 39.8428 23.7544 36.45 23.7544C33.0573 23.7544 30.3066 20.8208 30.3066 17.2017C30.3066 13.5826 33.0573 10.6484 36.45 10.6484C39.8428 10.6484 42.5934 13.5826 42.5934 17.2017Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M22.5953 29.4883H50.3053C53.7389 29.4883 56.5197 26.778 56.5197 23.4405V10.8396C56.5197 7.49996 53.739 4.79176 50.3053 4.79176H48.8712C48.2747 2.05313 45.7826 0 42.7962 0H30.1063C27.1179 0 24.6257 2.053 24.0313 4.78967H22.5971C19.1656 4.78967 16.3828 7.49788 16.3828 10.8375V23.4384C16.3807 26.778 19.1634 29.4882 22.595 29.4882L22.5953 29.4883ZM36.449 8.31471C41.4535 8.31471 45.5123 12.2648 45.5123 17.1352C45.5123 22.0062 41.4535 25.9582 36.449 25.9582C31.4445 25.9582 27.3856 22.0081 27.3856 17.1377C27.3856 12.2673 31.4445 8.31471 36.449 8.31471ZM20.9092 9.32597H24.0182C24.9472 9.32597 25.7019 10.0584 25.7019 10.9625C25.7019 11.8686 24.9493 12.6011 24.0182 12.6011H20.9092C19.9823 12.6011 19.2254 11.8707 19.2254 10.9625C19.2275 10.0604 19.9822 9.32597 20.9092 9.32597Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M58.8645 12.2878C58.8645 12.2878 77.1839 21.8549 65.5604 32.0445C63.6718 33.6967 55.2747 38.9138 42.5947 39.9368V45.0519C50.0424 44.2514 61.7635 41.887 68.4037 34.9253C82.5323 20.1097 58.8657 12.2871 58.8657 12.2871L58.8645 12.2878Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M37.6664 41.209L29.1818 35.5097C28.077 34.7658 27.1702 35.2358 27.1702 36.5516V39.5855C16.2598 38.0408 9.07761 33.565 7.35125 32.0517C-4.2894 21.858 14.0557 12.2871 14.0557 12.2871C14.0557 12.2871 -9.64257 20.1134 4.5039 34.9343C10.2723 40.9769 19.8619 43.5552 27.1712 44.656V44.952V48.5701C27.1712 49.8901 28.078 50.3554 29.1827 49.6141L37.6673 43.9127C38.7757 43.1683 38.7757 41.9525 37.6673 41.2092L37.6664 41.209Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path></svg>',1),V={key:0,class:"h-100 w-100 transition-ease"},I=["src"],B={__name:"Images360",props:{imagePath:{type:String,required:!0},imageCount:{type:Number,default:36},autoRotateSpeed:{type:Number,default:100}},setup(m){const n=m,r=e.ref(0),c=e.ref(!1),u=e.ref(0),v=e.ref(0);e.ref(!0);const g=async()=>{const t=[];for(let a=1;a<=n.imageCount;a++){const l=new Image;l.src=`${n.imagePath}/${a}.jpg`;try{await l.decode(),v.value++}catch(d){console.warn(`Failed to decode ${n.imagePath}/${a}.jpg:`,d)}t.push(l)}return t},C=e.computed(()=>Math.round(v.value/n.imageCount*100)),s=e.ref([]),o=e.ref(""),h=e.ref(null);e.watch(r,t=>{o.value=s.value[t]||""});function p(t){c.value=!0,u.value=t.clientX||t.touches[0].clientX}function f(t){if(!c.value)return;const a=t.clientX||t.touches[0].clientX,l=a-u.value;if(Math.abs(l)>=5){const d=l>0?1:-1;r.value=(r.value+d)%n.imageCount,r.value<0&&(r.value=n.imageCount-1),u.value=a}}function i(){c.value=!1}let _=null;const w=()=>{s.value=[]};return e.onMounted(async()=>{s.value=await g(),o.value=s.value[0]||""}),e.onUnmounted(()=>{clearInterval(_),w()}),(t,a)=>(e.openBlock(),e.createElementBlock("div",k,[y,e.createVNode(e.Transition,{name:"scale5",css:!h.value,appear:""},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",V,[o.value?(e.openBlock(),e.createElementBlock("img",{key:o.value,class:"h-100 w-100 transition-ease",src:(t.FILE_SERVER_URL||"")+o.value.src,alt:"360 product view",onMousedown:p,onMousemove:f,onMouseup:i,onMouseleave:i,onTouchstart:p,onTouchmove:f,onTouchend:i,onDragstart:a[0]||(a[0]=e.withModifiers(()=>{},["prevent"]))},null,40,I)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1},8,["css"]),e.createVNode(e.Transition,{name:"scale5"},{default:e.withCtx(()=>[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:0,progress:C.value,class:"center z-index-5"},null,8,["progress"]))]),_:1})]))}},L=b.default(B,[["__scopeId","data-v-c6fa6581"]]);exports.default=L;
@@ -1,5 +1,5 @@
1
1
  import { ref as a, computed as L, watch as x, onMounted as R, onUnmounted as H, openBlock as c, createElementBlock as p, createVNode as h, Transition as _, withCtx as w, withModifiers as X, createCommentVNode as m, createBlock as Z, createStaticVNode as N } from "vue";
2
- import B from "../../../../components/Loader/Loader.vue2.js";
2
+ import B from "../../../../components/Loader/Loader.vue.js";
3
3
  import "./Images360.vue2.js";
4
4
  import E from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
5
  const P = { class: "product-360-viewer" }, S = /* @__PURE__ */ N('<svg class="pos-absolute z-index-2 pos-b-0 pd-small" width="73" height="50" viewBox="0 0 73 50" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c6fa6581><path d="M42.5934 17.2017C42.5934 20.8208 39.8428 23.7544 36.45 23.7544C33.0573 23.7544 30.3066 20.8208 30.3066 17.2017C30.3066 13.5826 33.0573 10.6484 36.45 10.6484C39.8428 10.6484 42.5934 13.5826 42.5934 17.2017Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M22.5953 29.4883H50.3053C53.7389 29.4883 56.5197 26.778 56.5197 23.4405V10.8396C56.5197 7.49996 53.739 4.79176 50.3053 4.79176H48.8712C48.2747 2.05313 45.7826 0 42.7962 0H30.1063C27.1179 0 24.6257 2.053 24.0313 4.78967H22.5971C19.1656 4.78967 16.3828 7.49788 16.3828 10.8375V23.4384C16.3807 26.778 19.1634 29.4882 22.595 29.4882L22.5953 29.4883ZM36.449 8.31471C41.4535 8.31471 45.5123 12.2648 45.5123 17.1352C45.5123 22.0062 41.4535 25.9582 36.449 25.9582C31.4445 25.9582 27.3856 22.0081 27.3856 17.1377C27.3856 12.2673 31.4445 8.31471 36.449 8.31471ZM20.9092 9.32597H24.0182C24.9472 9.32597 25.7019 10.0584 25.7019 10.9625C25.7019 11.8686 24.9493 12.6011 24.0182 12.6011H20.9092C19.9823 12.6011 19.2254 11.8707 19.2254 10.9625C19.2275 10.0604 19.9822 9.32597 20.9092 9.32597Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M58.8645 12.2878C58.8645 12.2878 77.1839 21.8549 65.5604 32.0445C63.6718 33.6967 55.2747 38.9138 42.5947 39.9368V45.0519C50.0424 44.2514 61.7635 41.887 68.4037 34.9253C82.5323 20.1097 58.8657 12.2871 58.8657 12.2871L58.8645 12.2878Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path><path d="M37.6664 41.209L29.1818 35.5097C28.077 34.7658 27.1702 35.2358 27.1702 36.5516V39.5855C16.2598 38.0408 9.07761 33.565 7.35125 32.0517C-4.2894 21.858 14.0557 12.2871 14.0557 12.2871C14.0557 12.2871 -9.64257 20.1134 4.5039 34.9343C10.2723 40.9769 19.8619 43.5552 27.1712 44.656V44.952V48.5701C27.1712 49.8901 28.078 50.3554 29.1827 49.6141L37.6673 43.9127C38.7757 43.1683 38.7757 41.9525 37.6673 41.2092L37.6664 41.209Z" fill="rgb(var(--black))" fill-opacity="0.1" data-v-c6fa6581></path></svg>', 1), T = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");const b=require("../../../../components/Select/Select.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const p=require("../blocks/CardPosition.vue.cjs"),m=require("vue-router"),l=require("../../../globals/store/globals.cjs"),t=require("../../store/leftovers.cjs"),f=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const g={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},h={class:""},N={class:"gap-thin flex-v-center flex-nojustify flex"},V={class:"mn-r-auto"},q={__name:"EditLeftover",setup(E){const o=m.useRoute(),i=m.useRouter(),c=e.ref(f.state.all);e.ref(null);const v=e.computed(()=>t.state.current.positions.reduce((s,r)=>s+r.price,0));e.onMounted(async()=>{if(o.params.leftover)try{await t.actions.fetch(o.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const s=await f.actions.read({organization:o.params._id,limit:100});c.value=s}catch{console.error("error")}});function y(){o.params.leftover?t.actions.fetch(o.params.leftover):t.state.current={type:"",order:"",positions:[]}}function k(){t.state.current.organization=o.params._id,o.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:o.params._id}}),s=>console.error("error")):t.actions.create(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:o.params._id}}),s=>console.error("error"))}function _(){t.actions.delete(o.params.leftover).then(()=>i.push({name:"Leftovers",params:{_id:o.params._id}}),s=>console.error("error"))}return(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",g,[e.createElementVNode("h2",h,e.toDisplayString(e.unref(o).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(b.default,{select:t.state.current.type,"onUpdate:select":r[0]||(r[0]=n=>t.state.current.type=n),options:["stock-in","stock-out","write-off"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(u.default,{title:"Add Position",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(p.default,{onAdd:r[1]||(r[1]=n=>l.actions.add(t.state.current.positions,n)),products:c.value},null,8,["products"])]),_:1}),e.createVNode(u.default,{title:"Invetory Sheet",placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(n,d)=>(e.openBlock(),e.createBlock(p.default,{key:n._id,product:n,array:t.state.current.positions,products:c.value,onAdd:r[2]||(r[2]=a=>l.actions.add(t.state.current.positions,a)),onUpdate:a=>l.actions.update(t.state.current.positions,a,d),onDelete:a=>l.actions.delete(t.state.current.positions,a,d)},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1}),e.createVNode(u.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",N,[e.createElementVNode("h3",V," In total: "+e.toDisplayString(s.formatPrice(v.value)),1),e.createElementVNode("a",{onClick:r[3]||(r[3]=n=>k()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:r[4]||(r[4]=n=>y())}," Reset "),e.unref(o).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:r[5]||(r[5]=n=>_()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})],64))}};exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");const _=require("../../../../components/Select/Select.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const p=require("../blocks/CardPosition.vue.cjs"),m=require("vue-router"),l=require("../../../globals/store/globals.cjs"),t=require("../../store/leftovers.cjs"),f=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const g={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},h={class:""},N={class:"gap-thin flex-v-center flex-nojustify flex"},V={class:"mn-r-auto"},q={__name:"EditLeftover",setup(E){const o=m.useRoute(),i=m.useRouter(),c=e.ref(f.state.all);e.ref(null);const v=e.computed(()=>Number(t.state.current.positions.reduce((s,r)=>s+r.price,0)));e.onMounted(async()=>{if(o.params.leftover)try{await t.actions.fetch(o.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const s=await f.actions.read({organization:o.params._id,limit:100});c.value=s}catch{console.error("error")}});function y(){o.params.leftover?t.actions.fetch(o.params.leftover):t.state.current={type:"",order:"",positions:[]}}function b(){t.state.current.organization=o.params._id,o.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:o.params._id}}),s=>console.error("error")):t.actions.create(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:o.params._id}}),s=>console.error("error"))}function k(){t.actions.delete(o.params.leftover).then(()=>i.push({name:"Leftovers",params:{_id:o.params._id}}),s=>console.error("error"))}return(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",g,[e.createElementVNode("h2",h,e.toDisplayString(e.unref(o).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(_.default,{select:t.state.current.type,"onUpdate:select":r[0]||(r[0]=n=>t.state.current.type=n),options:["stock-in","stock-out","write-off"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(u.default,{title:"Add Position",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(p.default,{onAdd:r[1]||(r[1]=n=>l.actions.add(t.state.current.positions,n)),products:c.value},null,8,["products"])]),_:1}),e.createVNode(u.default,{title:"Invetory Sheet",placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(n,d)=>(e.openBlock(),e.createBlock(p.default,{key:n._id,product:n,array:t.state.current.positions,products:c.value,onAdd:r[2]||(r[2]=a=>l.actions.add(t.state.current.positions,a)),onUpdate:a=>l.actions.update(t.state.current.positions,a,d),onDelete:a=>l.actions.delete(t.state.current.positions,a,d)},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1}),e.createVNode(u.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",N,[e.createElementVNode("h3",V," In total: "+e.toDisplayString(s.formatPrice(v.value)),1),e.createElementVNode("a",{onClick:r[3]||(r[3]=n=>b()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:r[4]||(r[4]=n=>y())}," Reset "),e.unref(o).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:r[5]||(r[5]=n=>k()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})],64))}};exports.default=q;
@@ -1,10 +1,10 @@
1
- import { ref as y, computed as C, onMounted as D, openBlock as c, createElementBlock as d, Fragment as b, createElementVNode as n, toDisplayString as h, unref as g, createVNode as i, withCtx as f, renderList as L, createBlock as R, createCommentVNode as A } from "vue";
1
+ import { ref as y, computed as C, onMounted as D, openBlock as c, createElementBlock as d, Fragment as b, createElementVNode as n, toDisplayString as h, unref as g, createVNode as i, withCtx as f, renderList as L, createBlock as N, createCommentVNode as R } from "vue";
2
2
  import v from "../../../../components/Block/Block.vue.js";
3
3
  import "../../../../components/Field/Field.vue2.js";
4
- import E from "../../../../components/Select/Select.vue.js";
4
+ import A from "../../../../components/Select/Select.vue.js";
5
5
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
6
6
  import k from "../blocks/CardPosition.vue.js";
7
- import { useRoute as N, useRouter as P } from "vue-router";
7
+ import { useRoute as E, useRouter as P } from "vue-router";
8
8
  import { actions as p } from "../../../globals/store/globals.js";
9
9
  import { state as t, actions as l } from "../../store/leftovers.js";
10
10
  import { state as B, actions as I } from "../../store/products.js";
@@ -12,9 +12,9 @@ import "./EditLeftover.vue2.js";
12
12
  const U = { class: "mn-b-medium gap-small flex-v-center flex-nowrap flex" }, V = { class: "" }, z = { class: "gap-thin flex-v-center flex-nojustify flex" }, j = { class: "mn-r-auto" }, Y = {
13
13
  __name: "EditLeftover",
14
14
  setup(F) {
15
- const r = N(), u = P(), m = y(B.all);
15
+ const r = E(), u = P(), m = y(B.all);
16
16
  y(null);
17
- const w = C(() => t.current.positions.reduce((o, e) => o + e.price, 0));
17
+ const w = C(() => Number(t.current.positions.reduce((o, e) => o + e.price, 0)));
18
18
  D(async () => {
19
19
  if (r.params.leftover)
20
20
  try {
@@ -55,7 +55,7 @@ const U = { class: "mn-b-medium gap-small flex-v-center flex-nowrap flex" }, V =
55
55
  return (o, e) => (c(), d(b, null, [
56
56
  n("header", U, [
57
57
  n("h2", V, h(g(r).params.leftover ? "Edit " : "Add ") + " Inventory", 1),
58
- i(E, {
58
+ i(A, {
59
59
  select: t.current.type,
60
60
  "onUpdate:select": e[0] || (e[0] = (s) => t.current.type = s),
61
61
  options: [
@@ -88,7 +88,7 @@ const U = { class: "mn-b-medium gap-small flex-v-center flex-nowrap flex" }, V =
88
88
  class: "mn-b-semi"
89
89
  }, {
90
90
  default: f(() => [
91
- (c(!0), d(b, null, L(t.current.positions, (s, _) => (c(), R(k, {
91
+ (c(!0), d(b, null, L(t.current.positions, (s, _) => (c(), N(k, {
92
92
  key: s._id,
93
93
  product: s,
94
94
  array: t.current.positions,
@@ -127,7 +127,7 @@ const U = { class: "mn-b-medium gap-small flex-v-center flex-nowrap flex" }, V =
127
127
  key: 0,
128
128
  onClick: e[5] || (e[5] = (s) => S()),
129
129
  class: "t-white bg-red button"
130
- }, " Delete ")) : A("", !0)
130
+ }, " Delete ")) : R("", !0)
131
131
  ])
132
132
  ]),
133
133
  _: 1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("vue-router"),f=require("vue-i18n"),h=require("../../../../components/Loader/Loader.vue2.cjs");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const g=require("../../../../components/FieldBig/FieldBig.vue.cjs"),_=require("../sections/SectionProduct.vue.cjs"),s=require("../../store/products.cjs");require("../sections/HeroRecommendation.vue2.cjs");require("./ProductRecommmendation.vue2.cjs");const I=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),q={id:"product-recommendation",class:"h-min-100vh t-white bg-black"},y={key:1,class:"section"},k={key:0,class:"mn-b-big"},R={__name:"ProductRecommmendation",setup(T){const r=b.useRouter(),t=e.ref(!0),m=e.ref(!1),u=e.ref(["Loading all we know about the buds","Processing the cannabis universe","Creating a strain of knowledge","Harvesting taste insights"]),p={messages:{en:{TITLE:"Increase Your High,<br><b class='t-white'>Powered by AI Budtender</b>",DESCRIPTION:"AI's got your chill, bro. We're picking out the most cosmic weed strains based on your desired vibe:",placeholder:"Describe your desired high, bro...",action:"Transmit Vibes →"},ru:{TITLE:"Персональный Накур,<br><b class='t-white'>Напрямую от AI</b>",DESCRIPTION:"AI на страже твоего релакса, бро. Мы подбираем самые космические сорта травы, исходя из твоего желаемого настроения:",placeholder:"Опиши свой желамый хай, bro...",action:"Передать Вайб →"}}},{t:o}=f.useI18n(p),a=e.ref(u.value[0]);let c=e.ref(r.currentRoute.value.query.mood||o("Recommend me something"));e.watchEffect(async()=>{c.value=r.currentRoute.value.query.mood||o("Recommend me something"),t.value=!0,await s.actions.submitMood(c.value),t.value=!1}),e.onMounted(async()=>{}),setInterval(()=>{const i=u.value.indexOf(a.value);a.value=u.value[(i+1)%u.value.length]},2e3);let n=e.ref(r.currentRoute.value.query.mood||o("Recommend me something"));function v(){r.push({name:"Product Recommmendation",query:{mood:n.value}})}return(i,l)=>(e.openBlock(),e.createElementBlock("div",q,[t.value?(e.openBlock(),e.createBlock(h.default,{key:0,status:a.value,class:"pos-fixed"},null,8,["status"])):e.createCommentVNode("",!0),!t.value&&!m.value?(e.openBlock(),e.createElementBlock("div",y,[t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",k,[e.createVNode(g.default,{input:e.unref(n),loopTyping:!1,enableTyping:!1,placeholder:e.unref(o)("placeholder"),action:e.unref(o)("action"),"onUpdate:input":l[0]||(l[0]=d=>e.isRef(n)?n.value=d:n=d),onAction:v,class:"t-white bs-blur-regular w-100"},null,8,["input","placeholder","action"])])),e.createVNode(_.default,{product:s.state.current,recommendation:s.state.current.recommendation},null,8,["product","recommendation"])])):e.createCommentVNode("",!0)]))}},w=I.default(R,[["__scopeId","data-v-5fd744d4"]]);exports.default=w;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("vue-router"),f=require("vue-i18n"),h=require("../../../../components/Loader/Loader.vue.cjs");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const g=require("../../../../components/FieldBig/FieldBig.vue.cjs"),_=require("../sections/SectionProduct.vue.cjs"),s=require("../../store/products.cjs");require("../sections/HeroRecommendation.vue2.cjs");require("./ProductRecommmendation.vue2.cjs");const I=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),q={id:"product-recommendation",class:"h-min-100vh t-white bg-black"},y={key:1,class:"section"},k={key:0,class:"mn-b-big"},R={__name:"ProductRecommmendation",setup(T){const r=b.useRouter(),t=e.ref(!0),m=e.ref(!1),u=e.ref(["Loading all we know about the buds","Processing the cannabis universe","Creating a strain of knowledge","Harvesting taste insights"]),p={messages:{en:{TITLE:"Increase Your High,<br><b class='t-white'>Powered by AI Budtender</b>",DESCRIPTION:"AI's got your chill, bro. We're picking out the most cosmic weed strains based on your desired vibe:",placeholder:"Describe your desired high, bro...",action:"Transmit Vibes →"},ru:{TITLE:"Персональный Накур,<br><b class='t-white'>Напрямую от AI</b>",DESCRIPTION:"AI на страже твоего релакса, бро. Мы подбираем самые космические сорта травы, исходя из твоего желаемого настроения:",placeholder:"Опиши свой желамый хай, bro...",action:"Передать Вайб →"}}},{t:o}=f.useI18n(p),a=e.ref(u.value[0]);let c=e.ref(r.currentRoute.value.query.mood||o("Recommend me something"));e.watchEffect(async()=>{c.value=r.currentRoute.value.query.mood||o("Recommend me something"),t.value=!0,await s.actions.submitMood(c.value),t.value=!1}),e.onMounted(async()=>{}),setInterval(()=>{const i=u.value.indexOf(a.value);a.value=u.value[(i+1)%u.value.length]},2e3);let n=e.ref(r.currentRoute.value.query.mood||o("Recommend me something"));function v(){r.push({name:"Product Recommmendation",query:{mood:n.value}})}return(i,l)=>(e.openBlock(),e.createElementBlock("div",q,[t.value?(e.openBlock(),e.createBlock(h.default,{key:0,status:a.value,class:"pos-fixed"},null,8,["status"])):e.createCommentVNode("",!0),!t.value&&!m.value?(e.openBlock(),e.createElementBlock("div",y,[t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",k,[e.createVNode(g.default,{input:e.unref(n),loopTyping:!1,enableTyping:!1,placeholder:e.unref(o)("placeholder"),action:e.unref(o)("action"),"onUpdate:input":l[0]||(l[0]=d=>e.isRef(n)?n.value=d:n=d),onAction:v,class:"t-white bs-blur-regular w-100"},null,8,["input","placeholder","action"])])),e.createVNode(_.default,{product:s.state.current,recommendation:s.state.current.recommendation},null,8,["product","recommendation"])])):e.createCommentVNode("",!0)]))}},w=I.default(R,[["__scopeId","data-v-5fd744d4"]]);exports.default=w;
@@ -1,7 +1,7 @@
1
1
  import { ref as e, watchEffect as I, onMounted as y, openBlock as s, createElementBlock as u, createBlock as w, createCommentVNode as c, createVNode as v, unref as l, isRef as R } from "vue";
2
2
  import { useRouter as T } from "vue-router";
3
3
  import { useI18n as k } from "vue-i18n";
4
- import x from "../../../../components/Loader/Loader.vue2.js";
4
+ import x from "../../../../components/Loader/Loader.vue.js";
5
5
  import "../../../globals/localization/vue-i18n.js";
6
6
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
7
7
  import P from "../../../../components/FieldBig/FieldBig.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),b=require("../../../../components/Checkbox/Checkbox.vue.cjs"),q=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const x={class:"pd-medium bg-white-transp-50 radius-big"},F={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small t-transp"},null,-1),B={class:"cursor-pointer mn-r-auto t-medium p-big"},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();let _={status:"published"};[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 k=h,w=()=>{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}=q.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",F,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(b.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(f.default,{class:"radius-small o-hidden mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",B,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(b.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}),e.createElementVNode("button",{onClick:w,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"),f=require("../../../../components/Spoiler/Spoiler.vue.cjs"),b=require("../../../../components/Checkbox/Checkbox.vue.cjs"),q=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const x={class:"pd-medium bg-white-transp-50 radius-big"},F={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small t-transp"},null,-1),B={class:"cursor-pointer mn-r-auto t-medium p-big"},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();let _={status:"published"};[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 k=h,w=()=>{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}=q.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",F,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(b.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(f.default,{class:"radius-small o-hidden mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",B,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(b.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}),e.createElementVNode("button",{onClick:w,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=C;
@@ -1,5 +1,5 @@
1
1
  import { withAsyncContext as P, ref as T, watch as V, onMounted as B, openBlock as a, createElementBlock as p, createVNode as h, withCtx as n, createElementVNode as c, toDisplayString as d, unref as f, Fragment as v, renderList as _, createBlock as w } from "vue";
2
- import x from "../../../../components/Spoiler/Spoiler.vue2.js";
2
+ import x from "../../../../components/Spoiler/Spoiler.vue.js";
3
3
  import F from "../../../../components/Checkbox/Checkbox.vue.js";
4
4
  import { useI18n as R } from "vue-i18n";
5
5
  import { useRoute as U, useRouter as $ } from "vue-router";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router"),b=require("vue-i18n"),f=require("../../../../../../node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs"),v=require("../../../../../../node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs"),g=require("../../../../components/Loader/Loader.vue2.cjs"),h=require("../blocks/CardProduct.vue.cjs"),k=require("../../store/products.cjs");require("./PopularProducts.vue2.cjs");const y={id:"popularProducts",class:"pd-thin"},B={class:"bg-grey radius-big pd-t-big pd-b-big"},q=["innerHTML"],E={class:"embla__container"},S={key:0,class:"h-100 w-100 radius-big flex-center bg-grey"},N={__name:"PopularProducts",setup(I){_.useRouter();const l={messages:{en:{title:"<b>Best Sellers 🔥</b>",subtitle:"We attach great importance to high quality and customer satisfaction"},ru:{title:"Самое Горячее 🔥",subtitle:"Мы придаем большое значение высокому качеству товаров и удовлетворенности клиентов"}}},{t:c}=b.useI18n(l),r=e.ref(10),i=e.ref(0),u=e.ref([]),d={delay:2e3,jump:!1,stopOnInteraction:!1,stopOnMouseEnter:!1,stopOnFocusIn:!0,stopOnLastSnap:!1,rootNode:o=>o.parentElement},[p,t]=f.default({loop:!0},[v.default(d)]),s=o=>u.value=t.value.scrollSnapList(),a=o=>i.value=t.value.selectedScrollSnap();return e.onMounted(async()=>{r.value=await k.actions.read({limit:10,organization:"657e7134efb8110c51b8b713"}),s(),a(),t.value.on("reInit",s),t.value.on("reInit",a),t.value.on("select",a)}),(o,O)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",B,[e.createElementVNode("h2",{class:"mn-b-semi t-center",innerHTML:e.unref(c)("title")},null,8,q),e.createElementVNode("div",{class:"embla",ref_key:"emblaNode",ref:p},[e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(n,m,V)=>(e.openBlock(),e.createElementBlock("div",{class:"embla__slide pd-nano",key:m},[e.createVNode(e.Transition,{name:"fade",mode:"out-in",appear:""},{default:e.withCtx(()=>[n.name?(e.openBlock(),e.createBlock(h.default,{key:1,onClick:C=>o.$router.push({name:"Product Organization",params:{_id:n.organization,product:n._id}}),product:n,class:"cursor-pointer transition-ease-in hover-scale-0 h-100 w-100"},null,8,["onClick","product"])):(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(g.default,{class:"pos-relative"})]))]),_:2},1024)]))),128))])],512)])]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router"),b=require("vue-i18n"),f=require("../../../../../../node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs"),v=require("../../../../../../node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs"),g=require("../../../../components/Loader/Loader.vue.cjs"),h=require("../blocks/CardProduct.vue.cjs"),k=require("../../store/products.cjs");require("./PopularProducts.vue2.cjs");const y={id:"popularProducts",class:"pd-thin"},B={class:"bg-grey radius-big pd-t-big pd-b-big"},q=["innerHTML"],E={class:"embla__container"},S={key:0,class:"h-100 w-100 radius-big flex-center bg-grey"},N={__name:"PopularProducts",setup(I){_.useRouter();const l={messages:{en:{title:"<b>Best Sellers 🔥</b>",subtitle:"We attach great importance to high quality and customer satisfaction"},ru:{title:"Самое Горячее 🔥",subtitle:"Мы придаем большое значение высокому качеству товаров и удовлетворенности клиентов"}}},{t:c}=b.useI18n(l),r=e.ref(10),i=e.ref(0),u=e.ref([]),d={delay:2e3,jump:!1,stopOnInteraction:!1,stopOnMouseEnter:!1,stopOnFocusIn:!0,stopOnLastSnap:!1,rootNode:o=>o.parentElement},[p,t]=f.default({loop:!0},[v.default(d)]),s=o=>u.value=t.value.scrollSnapList(),a=o=>i.value=t.value.selectedScrollSnap();return e.onMounted(async()=>{r.value=await k.actions.read({limit:10,organization:"657e7134efb8110c51b8b713"}),s(),a(),t.value.on("reInit",s),t.value.on("reInit",a),t.value.on("select",a)}),(o,O)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",B,[e.createElementVNode("h2",{class:"mn-b-semi t-center",innerHTML:e.unref(c)("title")},null,8,q),e.createElementVNode("div",{class:"embla",ref_key:"emblaNode",ref:p},[e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(n,m,V)=>(e.openBlock(),e.createElementBlock("div",{class:"embla__slide pd-nano",key:m},[e.createVNode(e.Transition,{name:"fade",mode:"out-in",appear:""},{default:e.withCtx(()=>[n.name?(e.openBlock(),e.createBlock(h.default,{key:1,onClick:C=>o.$router.push({name:"Product Organization",params:{_id:n.organization,product:n._id}}),product:n,class:"cursor-pointer transition-ease-in hover-scale-0 h-100 w-100"},null,8,["onClick","product"])):(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(g.default,{class:"pos-relative"})]))]),_:2},1024)]))),128))])],512)])]))}};exports.default=N;
@@ -3,7 +3,7 @@ import { useRouter as L } from "vue-router";
3
3
  import { useI18n as O } from "vue-i18n";
4
4
  import N from "../../../../../../node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js";
5
5
  import w from "../../../../../../node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";
6
- import B from "../../../../components/Loader/Loader.vue2.js";
6
+ import B from "../../../../components/Loader/Loader.vue.js";
7
7
  import C from "../blocks/CardProduct.vue.js";
8
8
  import { actions as E } from "../../store/products.js";
9
9
  import "./PopularProducts.vue2.js";
@@ -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.vue.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"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),a=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),C=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"},O={key:5,class:"mn-t-small mn-b-thin"},L=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),W=e.createElementVNode("span",null,"Posts",-1),z=e.createElementVNode("span",null,"Wallet",-1),A=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),T={__name:"Profile",setup(H){const o=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:o.params._id,user:a.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{C.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){a.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(o).params._id===a.state.user._id&&u.value?(e.openBlock(),e.createBlock(V.default,{key:0,user:a.state.user._id,target:t.state.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(o).params._id&&e.unref(o).params._id!==a.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:a.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),a.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:a.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(o).params._id===a.state.user._id?(e.openBlock(),e.createBlock(y.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:a.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),a.state.user._id&&e.unref(o).params._id&&e.unref(o).params._id!==a.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:4,user:a.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",O," 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(o).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"i-semi",icon:!0}),L]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(o).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(o).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),W]),_: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(o).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),z]),_:1})]),_:1})):e.createCommentVNode("",!0),a.state.user._id===e.unref(o).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(o).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[A]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[8]||(r[8]=s=>b())},{default:e.withCtx(()=>[G]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=T;
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"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),a=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),C=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"},O={key:5,class:"mn-t-small mn-b-thin"},L=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),W=e.createElementVNode("span",null,"Posts",-1),z=e.createElementVNode("span",null,"Wallet",-1),A=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),T={__name:"Profile",setup(H){const o=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:o.params._id,user:a.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{C.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){a.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(o).params._id===a.state.user._id&&u.value?(e.openBlock(),e.createBlock(V.default,{key:0,user:a.state.user._id,target:t.state.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(o).params._id&&e.unref(o).params._id!==a.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:a.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),a.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:a.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(o).params._id===a.state.user._id?(e.openBlock(),e.createBlock(y.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:a.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),a.state.user._id&&e.unref(o).params._id&&e.unref(o).params._id!==a.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:4,user:a.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",O," 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(o).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"i-semi",icon:!0}),L]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(o).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(o).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),W]),_: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(o).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),z]),_:1})]),_:1})):e.createCommentVNode("",!0),a.state.user._id===e.unref(o).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(o).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[A]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[8]||(r[8]=s=>b())},{default:e.withCtx(()=>[G]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=T;
@@ -2,7 +2,7 @@ import { ref as U, onMounted as C, openBlock as i, createElementBlock as d, unre
2
2
  import "../../../../components/Field/Field.vue2.js";
3
3
  import "../../../../components/Button/Button.vue2.js";
4
4
  import M from "../../../../components/Dropdown/Dropdown.vue.js";
5
- import k from "../../../mobile/components/Menu/Menu.vue.js";
5
+ import k from "../../../mobile/components/Menu/Menu.vue2.js";
6
6
  import f from "../../../mobile/components/Menu/MenuItem.vue.js";
7
7
  import y from "../../../organizations/components/elements/ButtonToggleMembership.vue.js";
8
8
  import N from "../../../reports/components/sections/FormReport.vue.js";