@ozdao/prometheus-framework 0.2.197 → 0.2.198

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -1
  2. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +21 -20
  3. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
  4. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +629 -622
  5. package/dist/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs +1 -1
  6. package/dist/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js +19 -17
  7. package/dist/node_modules/qrcode/lib/core/byte-data.cjs +1 -1
  8. package/dist/node_modules/qrcode/lib/core/byte-data.js +6 -7
  9. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs +1 -1
  10. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js +3 -3
  11. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
  12. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +3356 -3363
  13. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
  14. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
  15. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +17 -17
  29. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +12 -12
  35. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  41. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +32 -32
  49. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  69. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  77. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  87. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  93. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  99. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  105. package/dist/prometheus-framework.cjs.js +27 -27
  106. package/dist/prometheus-framework.es.js +2528 -2518
  107. package/dist/style.css +1 -1
  108. package/package.json +25 -25
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
@@ -1,7 +1,7 @@
1
1
  import { ref as p, onMounted as B, unref as _, openBlock as i, createElementBlock as o, createElementVNode as r, createVNode as l, withCtx as u, Fragment as $, renderList as q, createTextVNode as v, toDisplayString as f, createBlock as P, createCommentVNode as b } from "vue";
2
2
  import V from "../../../../components/Feed/Feed.vue.js";
3
3
  import F from "../../../../components/Block/Block.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import g from "../../../../components/Field/Field.vue2.js";
6
6
  import w from "../../../../components/Button/Button.vue2.js";
7
7
  import S from "../elements/ButtonCheck.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue2.cjs"),m=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),b=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 h-min-10r pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),o=e.ref("all");let r=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),s=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function p(a){u.value=!0,n.value=a}function c(){u.value=!1,n.value=null}return(a,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(b.default,{title:a.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>o.value=t),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:c,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(m.default,{photoUrl:(a.FILE_SERVER_URL||"")+n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(r),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(r)?r.value=t:r=t),date:e.unref(s),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),showLoadMore:!1,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...o.value!=="all"&&{tags:o.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:E=>p(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue.cjs"),m=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),b=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 h-min-10r pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),o=e.ref("all");let r=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),s=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function p(a){u.value=!0,n.value=a}function c(){u.value=!1,n.value=null}return(a,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(b.default,{title:a.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>o.value=t),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:c,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(m.default,{photoUrl:(a.FILE_SERVER_URL||"")+n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(r),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(r)?r.value=t:r=t),date:e.unref(s),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),showLoadMore:!1,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...o.value!=="all"&&{tags:o.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:E=>p(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
@@ -1,6 +1,6 @@
1
1
  import { ref as t, openBlock as d, createElementBlock as m, createVNode as n, withCtx as f, unref as c, isRef as _, Fragment as P, renderList as w, createElementVNode as b } from "vue";
2
2
  import k from "../../../../components/Feed/Feed.vue.js";
3
- import E from "../../../../components/Popup/Popup.vue2.js";
3
+ import E from "../../../../components/Popup/Popup.vue.js";
4
4
  import y from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
5
5
  import U from "../../../globals/views/components/sections/SectionPageTitle.vue.js";
6
6
  import R from "../../store/gallery.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue2.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue2.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
@@ -2,10 +2,10 @@ import { ref as s, openBlock as d, createElementBlock as h, createVNode as o, un
2
2
  import { useRoute as j } from "vue-router";
3
3
  /* empty css */
4
4
  import I from "../../../../components/Button/Button.vue2.js";
5
- /* empty css */
6
- import G from "../../../../components/Chips/Chips.vue.js";
5
+ /* empty css */
6
+ import G from "../../../../components/Chips/Chips.vue2.js";
7
7
  /* empty css */
8
- import O from "../../../../components/Popup/Popup.vue2.js";
8
+ import O from "../../../../components/Popup/Popup.vue.js";
9
9
  import z from "../../../../components/Feed/Feed.vue.js";
10
10
  import q from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
11
11
  import { state as D } from "../../../auth/views/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("vue-router"),t=require("../../store/globals.cjs"),v=require("../../../../../components/Loader/Loader.vue2.cjs"),_=require("../../../../../components/Status/Status.vue.cjs"),g=require("../../../../../components/Popup/Popup.vue2.cjs");require("vue-i18n");;/* empty css */const h=require("../partials/LocationSelection.vue.cjs");require("../../../../products/store/categories.cjs");const w=require("../../../../orders/components/partials/ShopCart.vue.cjs");;/* empty css */const k={id:"app-wrapper",class:"pos-relative"},C={__name:"Client",setup(q){const s=i.useRoute();i.useRouter();let r=e.ref(!1);const a=e.ref(null);e.ref(null);const l=e.ref(s.query.referalCode);function c(){t.state.isOpenLocationPopup=!1}function u(){document.getElementById("app").scrollIntoView()}const p=e.ref(0);return e.ref(null),e.computed(()=>p.value>50?"light":s.meta.header_theme||"light"),e.onMounted(async()=>{"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/service-worker.js").then(o=>{console.log("SW registered: ",o)}).catch(o=>{console.log("SW registration failed: ",o)})}),a&&(r.value=!0);const n=localStorage.getItem("position");n?t.state.position=JSON.parse(n):t.state.isOpenLocationPopup=!0,l.value&&localStorage.setItem("referalCode",l.value)}),(n,o)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",k,[e.createVNode(e.Transition,{name:"moveFromTop",appear:""},{default:e.withCtx(()=>[!a.value&&!e.unref(r)?(e.openBlock(),e.createBlock(v.default,{key:0,class:"pos-fixed"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(g.default,{onClosePopup:c,isPopupOpen:t.state.isOpenLocationPopup,class:"bg-white pd-semi w-m-33r radius-big"},{default:e.withCtx(()=>[e.createVNode(h.default)]),_:1},8,["isPopupOpen"]),e.createVNode(w.default),t.state.error.show?(e.openBlock(),e.createBlock(_.default,{key:0,data:t.state.error,class:"z-index-7"},null,8,["data"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.withDirectives(e.createVNode(d,{class:"o-scroll"},{default:e.withCtx(({Component:f,route:m})=>[e.createVNode(e.Transition,{onBeforeEnter:u,name:"scaleIn",mode:"out-in",appear:""},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f),{ref_key:"page",ref:a,key:m.path}))]),_:2},1024)]),_:1},512),[[e.vShow,e.unref(r)]])]),_:1}))])}}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("vue-router"),t=require("../../store/globals.cjs"),v=require("../../../../../components/Loader/Loader.vue2.cjs"),_=require("../../../../../components/Status/Status.vue.cjs"),g=require("../../../../../components/Popup/Popup.vue.cjs");require("vue-i18n");;/* empty css */const h=require("../partials/LocationSelection.vue.cjs");require("../../../../products/store/categories.cjs");const w=require("../../../../orders/components/partials/ShopCart.vue.cjs");;/* empty css */const k={id:"app-wrapper",class:"pos-relative"},C={__name:"Client",setup(q){const s=i.useRoute();i.useRouter();let r=e.ref(!1);const a=e.ref(null);e.ref(null);const l=e.ref(s.query.referalCode);function c(){t.state.isOpenLocationPopup=!1}function u(){document.getElementById("app").scrollIntoView()}const p=e.ref(0);return e.ref(null),e.computed(()=>p.value>50?"light":s.meta.header_theme||"light"),e.onMounted(async()=>{"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/service-worker.js").then(o=>{console.log("SW registered: ",o)}).catch(o=>{console.log("SW registration failed: ",o)})}),a&&(r.value=!0);const n=localStorage.getItem("position");n?t.state.position=JSON.parse(n):t.state.isOpenLocationPopup=!0,l.value&&localStorage.setItem("referalCode",l.value)}),(n,o)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",k,[e.createVNode(e.Transition,{name:"moveFromTop",appear:""},{default:e.withCtx(()=>[!a.value&&!e.unref(r)?(e.openBlock(),e.createBlock(v.default,{key:0,class:"pos-fixed"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(g.default,{onClosePopup:c,isPopupOpen:t.state.isOpenLocationPopup,class:"bg-white pd-semi w-m-33r radius-big"},{default:e.withCtx(()=>[e.createVNode(h.default)]),_:1},8,["isPopupOpen"]),e.createVNode(w.default),t.state.error.show?(e.openBlock(),e.createBlock(_.default,{key:0,data:t.state.error,class:"z-index-7"},null,8,["data"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.withDirectives(e.createVNode(d,{class:"o-scroll"},{default:e.withCtx(({Component:f,route:m})=>[e.createVNode(e.Transition,{onBeforeEnter:u,name:"scaleIn",mode:"out-in",appear:""},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f),{ref_key:"page",ref:a,key:m.path}))]),_:2},1024)]),_:1},512),[[e.vShow,e.unref(r)]])]),_:1}))])}}};exports.default=C;
@@ -3,7 +3,7 @@ import { useRoute as I, useRouter as E } from "vue-router";
3
3
  import { state as t } from "../../store/globals.js";
4
4
  import W from "../../../../../components/Loader/Loader.vue2.js";
5
5
  import $ from "../../../../../components/Status/Status.vue.js";
6
- import N from "../../../../../components/Popup/Popup.vue2.js";
6
+ import N from "../../../../../components/Popup/Popup.vue.js";
7
7
  import "vue-i18n";
8
8
  /* empty css */
9
9
  import T from "../partials/LocationSelection.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),b=require("vue-i18n"),a=require("../../store/globals.cjs"),n=require("../../../../orders/store/shopcart.cjs"),m=require("../../../../auth/views/store/auth.cjs");;/* empty css */const h=require("../../../../../components/Button/Button.vue2.cjs"),g=require("../../../../../components/Select/Select.vue2.cjs"),f=require("../../../../../components/Checkbox/Checkbox.vue.cjs"),k=require("../../../../icons/entities/IconShopcart.vue.cjs"),p=require("../../../../icons/entities/IconProfile.vue.cjs");;/* empty css */const w={class:"i-small",fill:"inherit",xmlns:"http://www.w3.org/2000/svg",width:"50",height:"67",viewBox:"0 0 50 67"},v=e.createElementVNode("path",{d:"M25 0C11.207 0 0 11.207 0 25C0 38.793 20.832 66.668 25 66.668C29.168 66.668 50 38.793 50 25C50 11.207 38.793 0 25 0ZM25 33.332C20.418 33.332 16.668 29.582 16.668 25C16.668 20.418 20.418 16.668 25 16.668C29.582 16.668 33.332 20.418 33.332 25C33.332 29.582 29.582 33.332 25 33.332Z",fill:"inherit"},null,-1),C=[v],S={__name:"Header",props:{theme:{type:String,default:"light"},logotype:{type:Object}},setup(t){const s=t,o=u.useRouter();u.useRoute(),b.useI18n();function d(){a.state.isOpenLocationPopup=!0}return e.onMounted(()=>{n.actions.setShopcart()}),(i,l)=>{var c;return e.openBlock(),e.createElementBlock("header",{id:"header",class:e.normalizeClass(["pd-thin gap-micro flex-center flex-nowrap flex h-4r w-100 z-index-2",{"t-black bg-white":t.theme==="light","t-white bg-black":t.theme==="dark"}])},[e.createElementVNode("button",{"aria-label":"menu",onClick:l[0]||(l[0]=()=>a.state.isOpenSidebar=!a.state.isOpenSidebar),class:e.normalizeClass(["mobile-only menu-btn",{"menu-btn_active":a.state.isOpenSidebar}])},[e.createElementVNode("span",{class:e.normalizeClass(["no-events",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},[e.createElementVNode("span",{class:e.normalizeClass(["menu-btn__before",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},null,2),e.createElementVNode("span",{class:e.normalizeClass(["menu-btn__after",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},null,2)],2)],2),s.logotype?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.logotype),{key:0,onClick:l[1]||(l[1]=r=>e.unref(o).push({path:"/"})),theme:t.theme,class:"h-2r w-auto cursor-pointer"},null,8,["theme"])):e.createCommentVNode("",!0),e.createElementVNode("button",{"aria-label":"button_location",class:e.normalizeClass(["cursor-pointer bg-transp pd-l-micro pd-r-micro radius-extra uppercase t-semi br-solid br-2px transition-linear",{"fill-black br-black t-black hover-bg-black hover-t-white hover-fill-white":t.theme==="light","fill-white br-white t-white hover-bg-white hover-t-black hover-fill-black":t.theme==="dark"}]),onClick:l[2]||(l[2]=r=>d())},[(e.openBlock(),e.createElementBlock("svg",w,C)),e.createTextVNode(" "+e.toDisplayString((c=a.state.position)!=null&&c.country?a.state.position.country:"World"),1)],2),e.renderSlot(i.$slots,"default"),e.createVNode(f.default,{name:"darkmode",label:"Darkmode",radio:a.state.theme.darkmode,"onUpdate:radio":l[3]||(l[3]=r=>a.actions.toggleTheme()),class:e.normalizeClass(["mn-l-thin mn-r-auto desktop-only t-semi pd-micro br-2px br-solid radius-extra",{"br-light t-black":t.theme==="light","br-dark t-white":t.theme==="dark"}]),theme:t.theme},null,8,["radio","theme","class"]),e.createVNode(h.default,{"aria-label":"shopcart",submit:r=>n.actions.toggleShopcart(),counter:n.getters.cartTotalAmount,showSucces:!1,showLoader:!1,class:"pd-zero mn-l-auto mn-r-micro"},{default:e.withCtx(()=>[e.createVNode(k.default,{class:"i-semi",fill:t.theme==="light"?"rgb(var(--black))":"rgb(var(--white))"},null,8,["fill"])]),_:1},8,["submit","counter"]),e.createVNode(h.default,{"aria-label":"profile",class:"pd-zero bg-transp",submit:m.state.access.status===!1?r=>e.unref(o).push({name:"Sign In"}):r=>e.unref(o).push({name:"User Profile",params:{_id:m.state.user._id}}),showSucces:!1,showLoader:!1},{default:e.withCtx(()=>[e.createVNode(p.default,{class:"i-semi",fill:t.theme==="light"?"rgb(var(--black))":"rgb(var(--white))"},null,8,["fill"])]),_:1},8,["submit"]),e.createVNode(g.default,{select:i.$i18n.locale,"onUpdate:select":l[4]||(l[4]=r=>i.$i18n.locale=r),options:[{name:"🌎 En",value:"en"},{name:"🇷🇺 Ru",value:"ru"}],property:"value",class:e.normalizeClass(["pos-relative uppercase pd-micro t-semi radius-thin",{"bg-light t-black":t.theme==="light","bg-dark t-white":t.theme==="dark"}])},null,8,["select","class"])],2)}}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),b=require("vue-i18n"),a=require("../../store/globals.cjs"),n=require("../../../../orders/store/shopcart.cjs"),m=require("../../../../auth/views/store/auth.cjs");;/* empty css */const h=require("../../../../../components/Button/Button.vue2.cjs"),g=require("../../../../../components/Select/Select.vue.cjs"),f=require("../../../../../components/Checkbox/Checkbox.vue.cjs"),k=require("../../../../icons/entities/IconShopcart.vue.cjs"),p=require("../../../../icons/entities/IconProfile.vue.cjs");;/* empty css */const w={class:"i-small",fill:"inherit",xmlns:"http://www.w3.org/2000/svg",width:"50",height:"67",viewBox:"0 0 50 67"},v=e.createElementVNode("path",{d:"M25 0C11.207 0 0 11.207 0 25C0 38.793 20.832 66.668 25 66.668C29.168 66.668 50 38.793 50 25C50 11.207 38.793 0 25 0ZM25 33.332C20.418 33.332 16.668 29.582 16.668 25C16.668 20.418 20.418 16.668 25 16.668C29.582 16.668 33.332 20.418 33.332 25C33.332 29.582 29.582 33.332 25 33.332Z",fill:"inherit"},null,-1),C=[v],S={__name:"Header",props:{theme:{type:String,default:"light"},logotype:{type:Object}},setup(t){const s=t,o=u.useRouter();u.useRoute(),b.useI18n();function d(){a.state.isOpenLocationPopup=!0}return e.onMounted(()=>{n.actions.setShopcart()}),(i,l)=>{var c;return e.openBlock(),e.createElementBlock("header",{id:"header",class:e.normalizeClass(["pd-thin gap-micro flex-center flex-nowrap flex h-4r w-100 z-index-2",{"t-black bg-white":t.theme==="light","t-white bg-black":t.theme==="dark"}])},[e.createElementVNode("button",{"aria-label":"menu",onClick:l[0]||(l[0]=()=>a.state.isOpenSidebar=!a.state.isOpenSidebar),class:e.normalizeClass(["mobile-only menu-btn",{"menu-btn_active":a.state.isOpenSidebar}])},[e.createElementVNode("span",{class:e.normalizeClass(["no-events",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},[e.createElementVNode("span",{class:e.normalizeClass(["menu-btn__before",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},null,2),e.createElementVNode("span",{class:e.normalizeClass(["menu-btn__after",{"bg-black":t.theme==="light","bg-white":t.theme==="dark"}])},null,2)],2)],2),s.logotype?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.logotype),{key:0,onClick:l[1]||(l[1]=r=>e.unref(o).push({path:"/"})),theme:t.theme,class:"h-2r w-auto cursor-pointer"},null,8,["theme"])):e.createCommentVNode("",!0),e.createElementVNode("button",{"aria-label":"button_location",class:e.normalizeClass(["cursor-pointer bg-transp pd-l-micro pd-r-micro radius-extra uppercase t-semi br-solid br-2px transition-linear",{"fill-black br-black t-black hover-bg-black hover-t-white hover-fill-white":t.theme==="light","fill-white br-white t-white hover-bg-white hover-t-black hover-fill-black":t.theme==="dark"}]),onClick:l[2]||(l[2]=r=>d())},[(e.openBlock(),e.createElementBlock("svg",w,C)),e.createTextVNode(" "+e.toDisplayString((c=a.state.position)!=null&&c.country?a.state.position.country:"World"),1)],2),e.renderSlot(i.$slots,"default"),e.createVNode(f.default,{name:"darkmode",label:"Darkmode",radio:a.state.theme.darkmode,"onUpdate:radio":l[3]||(l[3]=r=>a.actions.toggleTheme()),class:e.normalizeClass(["mn-l-thin mn-r-auto desktop-only t-semi pd-micro br-2px br-solid radius-extra",{"br-light t-black":t.theme==="light","br-dark t-white":t.theme==="dark"}]),theme:t.theme},null,8,["radio","theme","class"]),e.createVNode(h.default,{"aria-label":"shopcart",submit:r=>n.actions.toggleShopcart(),counter:n.getters.cartTotalAmount,showSucces:!1,showLoader:!1,class:"pd-zero mn-l-auto mn-r-micro"},{default:e.withCtx(()=>[e.createVNode(k.default,{class:"i-semi",fill:t.theme==="light"?"rgb(var(--black))":"rgb(var(--white))"},null,8,["fill"])]),_:1},8,["submit","counter"]),e.createVNode(h.default,{"aria-label":"profile",class:"pd-zero bg-transp",submit:m.state.access.status===!1?r=>e.unref(o).push({name:"Sign In"}):r=>e.unref(o).push({name:"User Profile",params:{_id:m.state.user._id}}),showSucces:!1,showLoader:!1},{default:e.withCtx(()=>[e.createVNode(p.default,{class:"i-semi",fill:t.theme==="light"?"rgb(var(--black))":"rgb(var(--white))"},null,8,["fill"])]),_:1},8,["submit"]),e.createVNode(g.default,{select:i.$i18n.locale,"onUpdate:select":l[4]||(l[4]=r=>i.$i18n.locale=r),options:[{name:"🌎 En",value:"en"},{name:"🇷🇺 Ru",value:"ru"}],property:"value",class:e.normalizeClass(["pos-relative uppercase pd-micro t-semi radius-thin",{"bg-light t-black":t.theme==="light","bg-dark t-white":t.theme==="dark"}])},null,8,["select","class"])],2)}}};exports.default=S;
@@ -6,7 +6,7 @@ import { actions as g, getters as N } from "../../../../orders/store/shopcart.js
6
6
  import { state as f } from "../../../../auth/views/store/auth.js";
7
7
  /* empty css */
8
8
  import p from "../../../../../components/Button/Button.vue2.js";
9
- import V from "../../../../../components/Select/Select.vue2.js";
9
+ import V from "../../../../../components/Select/Select.vue.js";
10
10
  import D from "../../../../../components/Checkbox/Checkbox.vue.js";
11
11
  import E from "../../../../icons/entities/IconShopcart.vue.js";
12
12
  import M from "../../../../icons/entities/IconProfile.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */const a=require("../../../../components/Menu/Menu.vue2.cjs"),r=require("../../../../components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/views/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-light radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */const a=require("../../../../components/Menu/Menu.vue.cjs"),r=require("../../../../components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/views/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-light radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
@@ -2,7 +2,7 @@ import { ref as l, openBlock as m, createElementBlock as u, createVNode as t, wi
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  /* empty css */
5
- import p from "../../../../components/Menu/Menu.vue2.js";
5
+ import p from "../../../../components/Menu/Menu.vue.js";
6
6
  import n from "../../../../components/Menu/MenuItem.vue.js";
7
7
  import { useRoute as d, useRouter as h } from "vue-router";
8
8
  import "../../../auth/views/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router"),O=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */;/* empty css */const P=require("../../../../components/Popup/Popup.vue2.cjs"),I=require("../../../icons/entities/IconTime.vue.cjs"),B=require("../blocks/CardOrderItem.vue.cjs"),z=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),M=require("../../../chats/components/pages/ChatPage.vue.cjs"),F=require("../blocks/StatusHistory.vue.cjs"),L=require("../../../globals/views/store/globals.cjs"),d=require("../../store/orders.cjs"),R=require("../../../products/store/products.cjs"),T=require("../../../organizations/store/organizations.cjs");;/* empty css */const A=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=b=>(e.pushScopeId("data-v-ad498447"),b=b(),e.popScopeId(),b),H={key:0,class:"pd-thin"},U={key:0,class:"mn-b-thin pos-relative w-100 bg-main radius-big pd-medium"},W={class:"mn-b-small flex-nowrap flex"},j={class:"t-medium p-medium"},G={class:"p-small t-transp"},J={class:"flex-nowrap flex gap-thin pos-relative"},K={class:"bg-light mn-b-thin pd-thin radius-extra flex-nowrap flex"},Q={class:"w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20"},X={class:"t-medium mn-r-auto"},Y=l(()=>e.createElementVNode("span",{class:"p-small t-transp"},"Estimated Arrival",-1)),Z=l(()=>e.createElementVNode("br",null,null,-1)),$=l(()=>e.createElementVNode("p",{class:"t-medium p-medium mn-b-thin"}," Positions ",-1)),ee={class:"bg-light pd-small radius-small flex gap-thin flex-column mn-b-semi"},te={key:1,class:"gap-thin cols-2"},se={class:"w-100"},ae={class:"mn-b-thin bg-light w-100 o-hidden radius-medium"},le={class:"pd-small flex-nowrap flex"},re={class:"mn-r-auto"},ne=l(()=>e.createElementVNode("span",{class:"d-block t-medium p-medium"},"Order is",-1)),oe=l(()=>e.createElementVNode("span",{class:"t-lh-075 h2 d-block mn-b-small"},"created",-1)),ie={class:"pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max"},ce={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},de=l(()=>e.createElementVNode("p",{class:"w-100 t-medium p-medium"}," Phone ",-1)),ue={class:"w-100 t-right"},me={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},pe=l(()=>e.createElementVNode("p",{class:"t-medium p-medium"}," Address ",-1)),he={class:"w-100 t-right"},_e={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},be=l(()=>e.createElementVNode("p",{class:"mn-b-small t-medium p-medium"}," Delivery ",-1)),ve={class:"w-100 t-right mn-b-small"},ge={key:2,class:"t-transp"},fe={class:"bg-light radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100"},Ne=l(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Order Summary",-1)),Ve={class:"flex gap-thin flex-column mn-b-semi"},Ee={class:"mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100"},ke={class:"pd-small br-solid br-b br-black-transp-10 flex"},ye=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total",-1)),we={class:"pd-small br-solid br-b br-black-transp-10 flex"},Se=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"Delivery",-1)),xe={class:"pd-small flex-bottom flex"},Ce=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total to pay",-1)),Be={class:"p-big t-semi"},De=l(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Chat With Us",-1)),qe={__name:"OrderBackoffice",setup(b){C.useRouter();const h=C.useRoute(),s=e.ref(null),v=e.ref(null),n=e.ref(null),o=["created","confirmed","packing","in delivery","delivered"],V=["Created","Confirmed","Packing","In Delivery","Delivered"],g=t=>o.slice(t).includes(s.value.status),f=e.ref(!1),E=e.ref(null),N=e.ref([]);function D(t){f.value=!0,typeof t=="number"&&(E.value=t)}function k(){f.value=!1,E.value=null}e.onMounted(async()=>{var a,r;s.value=await d.actions.read({_id:h.params.order}),s.value=s.value[0],v.value=await R.actions.read({organization:s.value.owner.target._id,limit:1e3}),console.log(v.value);const t=v.value.reduce((u,m)=>(u[m._id]=m,u),{});console.log(t),N.value=s.value.positions.map(({_id:u,quantity:m})=>{const p=t[u];return{name:p.name,images:p.images,price:p.price,_id:p._id,quantity:m}}),n.value=await T.actions.read({_id:(a=s.value)==null?void 0:a.owner.target._id,location:(r=L.state.position)==null?void 0:r.location})});let y=e.computed(()=>{var t;return Number((t=s.value)==null?void 0:t.positions.reduce((a,r)=>a+r.price*r.quantity,0))});e.computed(()=>{var t;return Number((t=s.value)==null?void 0:t.positions.reduce((a,r)=>a+r.quantity,0))});function _(t){const a=o.indexOf(t);return a!==-1&&a+1<o.length?o[a+1]:null}function w(t){const a=o.indexOf(t);return t?V[a]:""}async function q(){const t=_(d.state.current.status);t?(d.state.current.status=t,await d.actions.update(d.state.current)):console.error("Next status is void. Must handle somehow."),k()}return(t,a)=>{var r,u,m,p,S,x;return s.value&&n.value?(e.openBlock(),e.createElementBlock("div",H,[s.value?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",W,[e.createElementVNode("p",j,[e.createTextVNode(" Order No: "),e.createElementVNode("span",G,"#"+e.toDisplayString(s.value._id),1)])]),e.createElementVNode("div",J,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(i,c)=>e.createElementVNode("div",{key:c,class:"w-20"},[e.createElementVNode("div",{class:e.normalizeClass(["bg-light br-anim br-glow radius-extra h-1r w-100",{"br-glow-anim":g(c)},{"t-transp":!g(c)},{blink:s.value.status===o[c]&&_(s.value.status)}])},null,2),e.createElementVNode("div",{class:e.normalizeClass([{"t-transp":!g(c)},"mn-t-thin p-small t-medium uppercase"])},e.toDisplayString(V[c]),3)])),64))])])):e.createCommentVNode("",!0),e.createElementVNode("div",K,[e.createElementVNode("div",Q,[e.createVNode(I.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),e.createElementVNode("p",X,[Y,Z,e.createTextVNode(e.toDisplayString(t.formatDate(s.value.deadline)),1)])]),_(s.value.status)&&e.unref(h).name==="Order Edit"?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:D,class:"mn-l-auto bg-black t-white button"}," Mark as "+e.toDisplayString(w(_(s.value.status))),1)):e.createCommentVNode("",!0)]),e.createVNode(P.default,{title:"Change status",onClosePopup:k,isPopupOpen:f.value,class:"bg-white w-min-30r w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(e.unref(O.default),{modelValue:s.value.deadline,"onUpdate:modelValue":a[0]||(a[0]=i=>s.value.deadline=i),"hide-navigation":["calendar"],flow:["time"],class:"z-index-3 bg-light radius-small pd-small mn-b-thin mn-b-semi"},null,8,["modelValue"]),$,e.createElementVNode("ul",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createBlock(B.default,{key:i._id,editable:!1,product:i},null,8,["product"]))),128))]),e.createElementVNode("button",{onClick:q,class:"w-100 bg-black-small t-white button"},e.toDisplayString("Confirm Changing to "+w(_(s.value.status))),1)]),_:1},8,["isPopupOpen"]),s.value?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",se,[n.value[0]?(e.openBlock(),e.createBlock(z.default,{key:0,organization:n.value[0],showRating:!0,showFollowers:!1,showProducts:!1,class:"bg-light mn-b-thin w-100 o-hidden radius-big pd-small"},null,8,["organization"])):e.createCommentVNode("",!0),e.createElementVNode("div",ae,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[ne,oe,e.createElementVNode("p",ie,e.toDisplayString(t.formatDate(s.value.createdAt)),1)])]),e.createElementVNode("div",ce,[de,e.createElementVNode("p",ue,e.toDisplayString(((r=s.value.customer.target)==null?void 0:r.number)||"Not specified"),1)]),e.createElementVNode("div",me,[pe,e.createElementVNode("p",he,e.toDisplayString(s.value.delivery.address?s.value.delivery.address.slice(0,64):"Not specified"),1)]),e.createElementVNode("div",_e,[be,e.createElementVNode("p",ve,e.toDisplayString(s.value.delivery.type?s.value.delivery.type:"Not specified"),1)])]),d.state.current.status_history?(e.openBlock(),e.createBlock(F.default,{key:1,statuses:o,statusHistory:d.state.current.status_history,statusCurrent:d.state.current.status,edit:e.unref(h).name==="Order Edit"},null,8,["statusHistory","statusCurrent","edit"])):e.createCommentVNode("",!0),t.payment&&t.payment.Status==="CONFIRMED"?(e.openBlock(),e.createElementBlock("span",ge,"Paid")):e.createCommentVNode("",!0)]),e.createElementVNode("div",fe,[Ne,e.createElementVNode("ul",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createBlock(B.default,{key:i._id,editable:!1,product:i},null,8,["product"]))),128))]),e.createElementVNode("div",Ee,[e.createElementVNode("div",ke,[ye,e.createElementVNode("p",null,e.toDisplayString(e.unref(y))+" "+e.toDisplayString(t.returnCurrency()),1)]),e.createElementVNode("div",we,[Se,e.createElementVNode("p",null,e.toDisplayString(t.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((u=n.value[0])==null?void 0:u.distance)-7,5*(((m=n.value[0])==null?void 0:m.distance)/10))),1)]),e.createElementVNode("div",xe,[Ce,e.createElementVNode("p",Be,e.toDisplayString(t.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((p=n.value[0])==null?void 0:p.distance)-7,5*(((S=n.value[0])==null?void 0:S.distance)/10))+e.unref(y)),1)])]),De,e.createVNode(M.default,{username:e.unref(h).name==="Order Status"?((x=s.value.user)==null?void 0:x.name)||"User":"Weeder Support",chatID:e.unref(h).params.order,class:"radius-semi bg-white o-hidden"},null,8,["username","chatID"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Oe=A.default(qe,[["__scopeId","data-v-ad498447"]]);exports.default=Oe;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router"),O=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */;/* empty css */const P=require("../../../../components/Popup/Popup.vue.cjs"),I=require("../../../icons/entities/IconTime.vue.cjs"),B=require("../blocks/CardOrderItem.vue.cjs"),z=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),M=require("../../../chats/components/pages/ChatPage.vue.cjs"),F=require("../blocks/StatusHistory.vue.cjs"),L=require("../../../globals/views/store/globals.cjs"),d=require("../../store/orders.cjs"),R=require("../../../products/store/products.cjs"),T=require("../../../organizations/store/organizations.cjs");;/* empty css */const A=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=b=>(e.pushScopeId("data-v-ad498447"),b=b(),e.popScopeId(),b),H={key:0,class:"pd-thin"},U={key:0,class:"mn-b-thin pos-relative w-100 bg-main radius-big pd-medium"},W={class:"mn-b-small flex-nowrap flex"},j={class:"t-medium p-medium"},G={class:"p-small t-transp"},J={class:"flex-nowrap flex gap-thin pos-relative"},K={class:"bg-light mn-b-thin pd-thin radius-extra flex-nowrap flex"},Q={class:"w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20"},X={class:"t-medium mn-r-auto"},Y=l(()=>e.createElementVNode("span",{class:"p-small t-transp"},"Estimated Arrival",-1)),Z=l(()=>e.createElementVNode("br",null,null,-1)),$=l(()=>e.createElementVNode("p",{class:"t-medium p-medium mn-b-thin"}," Positions ",-1)),ee={class:"bg-light pd-small radius-small flex gap-thin flex-column mn-b-semi"},te={key:1,class:"gap-thin cols-2"},se={class:"w-100"},ae={class:"mn-b-thin bg-light w-100 o-hidden radius-medium"},le={class:"pd-small flex-nowrap flex"},re={class:"mn-r-auto"},ne=l(()=>e.createElementVNode("span",{class:"d-block t-medium p-medium"},"Order is",-1)),oe=l(()=>e.createElementVNode("span",{class:"t-lh-075 h2 d-block mn-b-small"},"created",-1)),ie={class:"pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max"},ce={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},de=l(()=>e.createElementVNode("p",{class:"w-100 t-medium p-medium"}," Phone ",-1)),ue={class:"w-100 t-right"},me={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},pe=l(()=>e.createElementVNode("p",{class:"t-medium p-medium"}," Address ",-1)),he={class:"w-100 t-right"},_e={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},be=l(()=>e.createElementVNode("p",{class:"mn-b-small t-medium p-medium"}," Delivery ",-1)),ve={class:"w-100 t-right mn-b-small"},ge={key:2,class:"t-transp"},fe={class:"bg-light radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100"},Ne=l(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Order Summary",-1)),Ve={class:"flex gap-thin flex-column mn-b-semi"},Ee={class:"mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100"},ke={class:"pd-small br-solid br-b br-black-transp-10 flex"},ye=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total",-1)),we={class:"pd-small br-solid br-b br-black-transp-10 flex"},Se=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"Delivery",-1)),xe={class:"pd-small flex-bottom flex"},Ce=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total to pay",-1)),Be={class:"p-big t-semi"},De=l(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Chat With Us",-1)),qe={__name:"OrderBackoffice",setup(b){C.useRouter();const h=C.useRoute(),s=e.ref(null),v=e.ref(null),n=e.ref(null),o=["created","confirmed","packing","in delivery","delivered"],V=["Created","Confirmed","Packing","In Delivery","Delivered"],g=t=>o.slice(t).includes(s.value.status),f=e.ref(!1),E=e.ref(null),N=e.ref([]);function D(t){f.value=!0,typeof t=="number"&&(E.value=t)}function k(){f.value=!1,E.value=null}e.onMounted(async()=>{var a,r;s.value=await d.actions.read({_id:h.params.order}),s.value=s.value[0],v.value=await R.actions.read({organization:s.value.owner.target._id,limit:1e3}),console.log(v.value);const t=v.value.reduce((u,m)=>(u[m._id]=m,u),{});console.log(t),N.value=s.value.positions.map(({_id:u,quantity:m})=>{const p=t[u];return{name:p.name,images:p.images,price:p.price,_id:p._id,quantity:m}}),n.value=await T.actions.read({_id:(a=s.value)==null?void 0:a.owner.target._id,location:(r=L.state.position)==null?void 0:r.location})});let y=e.computed(()=>{var t;return Number((t=s.value)==null?void 0:t.positions.reduce((a,r)=>a+r.price*r.quantity,0))});e.computed(()=>{var t;return Number((t=s.value)==null?void 0:t.positions.reduce((a,r)=>a+r.quantity,0))});function _(t){const a=o.indexOf(t);return a!==-1&&a+1<o.length?o[a+1]:null}function w(t){const a=o.indexOf(t);return t?V[a]:""}async function q(){const t=_(d.state.current.status);t?(d.state.current.status=t,await d.actions.update(d.state.current)):console.error("Next status is void. Must handle somehow."),k()}return(t,a)=>{var r,u,m,p,S,x;return s.value&&n.value?(e.openBlock(),e.createElementBlock("div",H,[s.value?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",W,[e.createElementVNode("p",j,[e.createTextVNode(" Order No: "),e.createElementVNode("span",G,"#"+e.toDisplayString(s.value._id),1)])]),e.createElementVNode("div",J,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(i,c)=>e.createElementVNode("div",{key:c,class:"w-20"},[e.createElementVNode("div",{class:e.normalizeClass(["bg-light br-anim br-glow radius-extra h-1r w-100",{"br-glow-anim":g(c)},{"t-transp":!g(c)},{blink:s.value.status===o[c]&&_(s.value.status)}])},null,2),e.createElementVNode("div",{class:e.normalizeClass([{"t-transp":!g(c)},"mn-t-thin p-small t-medium uppercase"])},e.toDisplayString(V[c]),3)])),64))])])):e.createCommentVNode("",!0),e.createElementVNode("div",K,[e.createElementVNode("div",Q,[e.createVNode(I.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),e.createElementVNode("p",X,[Y,Z,e.createTextVNode(e.toDisplayString(t.formatDate(s.value.deadline)),1)])]),_(s.value.status)&&e.unref(h).name==="Order Edit"?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:D,class:"mn-l-auto bg-black t-white button"}," Mark as "+e.toDisplayString(w(_(s.value.status))),1)):e.createCommentVNode("",!0)]),e.createVNode(P.default,{title:"Change status",onClosePopup:k,isPopupOpen:f.value,class:"bg-white w-min-30r w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(e.unref(O.default),{modelValue:s.value.deadline,"onUpdate:modelValue":a[0]||(a[0]=i=>s.value.deadline=i),"hide-navigation":["calendar"],flow:["time"],class:"z-index-3 bg-light radius-small pd-small mn-b-thin mn-b-semi"},null,8,["modelValue"]),$,e.createElementVNode("ul",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createBlock(B.default,{key:i._id,editable:!1,product:i},null,8,["product"]))),128))]),e.createElementVNode("button",{onClick:q,class:"w-100 bg-black-small t-white button"},e.toDisplayString("Confirm Changing to "+w(_(s.value.status))),1)]),_:1},8,["isPopupOpen"]),s.value?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",se,[n.value[0]?(e.openBlock(),e.createBlock(z.default,{key:0,organization:n.value[0],showRating:!0,showFollowers:!1,showProducts:!1,class:"bg-light mn-b-thin w-100 o-hidden radius-big pd-small"},null,8,["organization"])):e.createCommentVNode("",!0),e.createElementVNode("div",ae,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[ne,oe,e.createElementVNode("p",ie,e.toDisplayString(t.formatDate(s.value.createdAt)),1)])]),e.createElementVNode("div",ce,[de,e.createElementVNode("p",ue,e.toDisplayString(((r=s.value.customer.target)==null?void 0:r.number)||"Not specified"),1)]),e.createElementVNode("div",me,[pe,e.createElementVNode("p",he,e.toDisplayString(s.value.delivery.address?s.value.delivery.address.slice(0,64):"Not specified"),1)]),e.createElementVNode("div",_e,[be,e.createElementVNode("p",ve,e.toDisplayString(s.value.delivery.type?s.value.delivery.type:"Not specified"),1)])]),d.state.current.status_history?(e.openBlock(),e.createBlock(F.default,{key:1,statuses:o,statusHistory:d.state.current.status_history,statusCurrent:d.state.current.status,edit:e.unref(h).name==="Order Edit"},null,8,["statusHistory","statusCurrent","edit"])):e.createCommentVNode("",!0),t.payment&&t.payment.Status==="CONFIRMED"?(e.openBlock(),e.createElementBlock("span",ge,"Paid")):e.createCommentVNode("",!0)]),e.createElementVNode("div",fe,[Ne,e.createElementVNode("ul",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createBlock(B.default,{key:i._id,editable:!1,product:i},null,8,["product"]))),128))]),e.createElementVNode("div",Ee,[e.createElementVNode("div",ke,[ye,e.createElementVNode("p",null,e.toDisplayString(e.unref(y))+" "+e.toDisplayString(t.returnCurrency()),1)]),e.createElementVNode("div",we,[Se,e.createElementVNode("p",null,e.toDisplayString(t.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((u=n.value[0])==null?void 0:u.distance)-7,5*(((m=n.value[0])==null?void 0:m.distance)/10))),1)]),e.createElementVNode("div",xe,[Ce,e.createElementVNode("p",Be,e.toDisplayString(t.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((p=n.value[0])==null?void 0:p.distance)-7,5*(((S=n.value[0])==null?void 0:S.distance)/10))+e.unref(y)),1)])]),De,e.createVNode(M.default,{username:e.unref(h).name==="Order Status"?((x=s.value.user)==null?void 0:x.name)||"User":"Weeder Support",chatID:e.unref(h).params.order,class:"radius-semi bg-white o-hidden"},null,8,["username","chatID"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Oe=A.default(qe,[["__scopeId","data-v-ad498447"]]);exports.default=Oe;
@@ -1,16 +1,16 @@
1
- import { ref as f, onMounted as W, computed as R, openBlock as n, createElementBlock as m, createElementVNode as t, createTextVNode as F, toDisplayString as l, Fragment as I, renderList as D, normalizeClass as H, createCommentVNode as b, createVNode as x, unref as v, withCtx as j, createBlock as C, pushScopeId as G, popScopeId as J } from "vue";
1
+ import { ref as f, onMounted as W, computed as R, openBlock as n, createElementBlock as m, createElementVNode as t, createTextVNode as F, toDisplayString as l, Fragment as I, renderList as D, normalizeClass as L, createCommentVNode as b, createVNode as x, unref as v, withCtx as j, createBlock as C, pushScopeId as G, popScopeId as J } from "vue";
2
2
  import { useRouter as K, useRoute as Q } from "vue-router";
3
3
  import X from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- import Y from "../../../../components/Popup/Popup.vue2.js";
6
+ import Y from "../../../../components/Popup/Popup.vue.js";
7
7
  import Z from "../../../icons/entities/IconTime.vue.js";
8
- import L from "../blocks/CardOrderItem.vue.js";
8
+ import T from "../blocks/CardOrderItem.vue.js";
9
9
  import tt from "../../../organizations/components/blocks/CardOrganization.vue.js";
10
10
  import st from "../../../chats/components/pages/ChatPage.vue.js";
11
11
  import et from "../blocks/StatusHistory.vue.js";
12
12
  import { state as at } from "../../../globals/views/store/globals.js";
13
- import { actions as T, state as g } from "../../store/orders.js";
13
+ import { actions as U, state as g } from "../../store/orders.js";
14
14
  import { actions as lt } from "../../../products/store/products.js";
15
15
  import { actions as it } from "../../../organizations/store/organizations.js";
16
16
  /* empty css */
@@ -24,23 +24,23 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
24
24
  }, dt = { class: "mn-b-small flex-nowrap flex" }, ut = { class: "t-medium p-medium" }, ct = { class: "p-small t-transp" }, mt = { class: "flex-nowrap flex gap-thin pos-relative" }, pt = { class: "bg-light mn-b-thin pd-thin radius-extra flex-nowrap flex" }, _t = { class: "w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20" }, ht = { class: "t-medium mn-r-auto" }, bt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("span", { class: "p-small t-transp" }, "Estimated Arrival", -1)), vt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("br", null, null, -1)), ft = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "t-medium p-medium mn-b-thin" }, " Positions ", -1)), gt = { class: "bg-light pd-small radius-small flex gap-thin flex-column mn-b-semi" }, wt = {
25
25
  key: 1,
26
26
  class: "gap-thin cols-2"
27
- }, yt = { class: "w-100" }, kt = { class: "mn-b-thin bg-light w-100 o-hidden radius-medium" }, xt = { class: "pd-small flex-nowrap flex" }, Ct = { class: "mn-r-auto" }, Ot = /* @__PURE__ */ i(() => /* @__PURE__ */ t("span", { class: "d-block t-medium p-medium" }, "Order is", -1)), St = /* @__PURE__ */ i(() => /* @__PURE__ */ t("span", { class: "t-lh-075 h2 d-block mn-b-small" }, "created", -1)), Nt = { class: "pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max" }, Pt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, It = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "w-100 t-medium p-medium" }, " Phone ", -1)), Dt = { class: "w-100 t-right" }, Mt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, $t = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "t-medium p-medium" }, " Address ", -1)), zt = { class: "w-100 t-right" }, Vt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Et = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-b-small t-medium p-medium" }, " Delivery ", -1)), Bt = { class: "w-100 t-right mn-b-small" }, At = {
27
+ }, yt = { class: "w-100" }, kt = { class: "mn-b-thin bg-light w-100 o-hidden radius-medium" }, xt = { class: "pd-small flex-nowrap flex" }, Ct = { class: "mn-r-auto" }, Ot = /* @__PURE__ */ i(() => /* @__PURE__ */ t("span", { class: "d-block t-medium p-medium" }, "Order is", -1)), St = /* @__PURE__ */ i(() => /* @__PURE__ */ t("span", { class: "t-lh-075 h2 d-block mn-b-small" }, "created", -1)), Nt = { class: "pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max" }, Pt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, It = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "w-100 t-medium p-medium" }, " Phone ", -1)), Dt = { class: "w-100 t-right" }, Mt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Vt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "t-medium p-medium" }, " Address ", -1)), $t = { class: "w-100 t-right" }, zt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Et = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-b-small t-medium p-medium" }, " Delivery ", -1)), Bt = { class: "w-100 t-right mn-b-small" }, At = {
28
28
  key: 2,
29
29
  class: "t-transp"
30
- }, Rt = { class: "bg-light radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100" }, Ft = /* @__PURE__ */ i(() => /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Order Summary", -1)), Ht = { class: "flex gap-thin flex-column mn-b-semi" }, Lt = { class: "mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100" }, Tt = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Ut = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "In total", -1)), qt = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Wt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "Delivery", -1)), jt = { class: "pd-small flex-bottom flex" }, Gt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "In total to pay", -1)), Jt = { class: "p-big t-semi" }, Kt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Chat With Us", -1)), Qt = {
30
+ }, Rt = { class: "bg-light radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100" }, Ft = /* @__PURE__ */ i(() => /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Order Summary", -1)), Lt = { class: "flex gap-thin flex-column mn-b-semi" }, Tt = { class: "mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100" }, Ut = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, qt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "In total", -1)), Ht = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Wt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "Delivery", -1)), jt = { class: "pd-small flex-bottom flex" }, Gt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "In total to pay", -1)), Jt = { class: "p-big t-semi" }, Kt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Chat With Us", -1)), Qt = {
31
31
  __name: "OrderBackoffice",
32
32
  setup(k) {
33
33
  K();
34
- const w = Q(), e = f(null), O = f(null), r = f(null), d = ["created", "confirmed", "packing", "in delivery", "delivered"], M = ["Created", "Confirmed", "Packing", "In Delivery", "Delivered"], S = (s) => d.slice(s).includes(e.value.status), N = f(!1), $ = f(null), P = f([]);
35
- function U(s) {
36
- N.value = !0, typeof s == "number" && ($.value = s);
34
+ const w = Q(), e = f(null), O = f(null), r = f(null), d = ["created", "confirmed", "packing", "in delivery", "delivered"], M = ["Created", "Confirmed", "Packing", "In Delivery", "Delivered"], S = (s) => d.slice(s).includes(e.value.status), N = f(!1), V = f(null), P = f([]);
35
+ function q(s) {
36
+ N.value = !0, typeof s == "number" && (V.value = s);
37
37
  }
38
- function z() {
39
- N.value = !1, $.value = null;
38
+ function $() {
39
+ N.value = !1, V.value = null;
40
40
  }
41
41
  W(async () => {
42
42
  var a, o;
43
- e.value = await T.read({ _id: w.params.order }), e.value = e.value[0], O.value = await lt.read({
43
+ e.value = await U.read({ _id: w.params.order }), e.value = e.value[0], O.value = await lt.read({
44
44
  organization: e.value.owner.target._id,
45
45
  limit: 1e3
46
46
  }), console.log(O.value);
@@ -59,7 +59,7 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
59
59
  location: (o = at.position) == null ? void 0 : o.location
60
60
  });
61
61
  });
62
- let V = R(() => {
62
+ let z = R(() => {
63
63
  var s;
64
64
  return Number((s = e.value) == null ? void 0 : s.positions.reduce((a, o) => a + o.price * o.quantity, 0));
65
65
  });
@@ -75,9 +75,9 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
75
75
  const a = d.indexOf(s);
76
76
  return s ? M[a] : "";
77
77
  }
78
- async function q() {
78
+ async function H() {
79
79
  const s = y(g.current.status);
80
- s ? (g.current.status = s, await T.update(g.current)) : console.error("Next status is void. Must handle somehow."), z();
80
+ s ? (g.current.status = s, await U.update(g.current)) : console.error("Next status is void. Must handle somehow."), $();
81
81
  }
82
82
  return (s, a) => {
83
83
  var o, p, _, h, B, A;
@@ -95,7 +95,7 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
95
95
  class: "w-20"
96
96
  }, [
97
97
  t("div", {
98
- class: H([
98
+ class: L([
99
99
  "bg-light br-anim br-glow radius-extra h-1r w-100",
100
100
  { "br-glow-anim": S(c) },
101
101
  { "t-transp": !S(c) },
@@ -103,7 +103,7 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
103
103
  ])
104
104
  }, null, 2),
105
105
  t("div", {
106
- class: H([{ "t-transp": !S(c) }, "mn-t-thin p-small t-medium uppercase"])
106
+ class: L([{ "t-transp": !S(c) }, "mn-t-thin p-small t-medium uppercase"])
107
107
  }, l(M[c]), 3)
108
108
  ])), 64))
109
109
  ])
@@ -122,13 +122,13 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
122
122
  ]),
123
123
  y(e.value.status) && v(w).name === "Order Edit" ? (n(), m("button", {
124
124
  key: 0,
125
- onClick: U,
125
+ onClick: q,
126
126
  class: "mn-l-auto bg-black t-white button"
127
127
  }, " Mark as " + l(E(y(e.value.status))), 1)) : b("", !0)
128
128
  ]),
129
129
  x(Y, {
130
130
  title: "Change status",
131
- onClosePopup: z,
131
+ onClosePopup: $,
132
132
  isPopupOpen: N.value,
133
133
  class: "bg-white w-min-30r w-max-30r radius-big pd-big"
134
134
  }, {
@@ -142,14 +142,14 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
142
142
  }, null, 8, ["modelValue"]),
143
143
  ft,
144
144
  t("ul", gt, [
145
- (n(!0), m(I, null, D(P.value, (u, c) => (n(), C(L, {
145
+ (n(!0), m(I, null, D(P.value, (u, c) => (n(), C(T, {
146
146
  key: u._id,
147
147
  editable: !1,
148
148
  product: u
149
149
  }, null, 8, ["product"]))), 128))
150
150
  ]),
151
151
  t("button", {
152
- onClick: q,
152
+ onClick: H,
153
153
  class: "w-100 bg-black-small t-white button"
154
154
  }, l("Confirm Changing to " + E(y(e.value.status))), 1)
155
155
  ]),
@@ -178,10 +178,10 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
178
178
  t("p", Dt, l(((o = e.value.customer.target) == null ? void 0 : o.number) || "Not specified"), 1)
179
179
  ]),
180
180
  t("div", Mt, [
181
- $t,
182
- t("p", zt, l(e.value.delivery.address ? e.value.delivery.address.slice(0, 64) : "Not specified"), 1)
181
+ Vt,
182
+ t("p", $t, l(e.value.delivery.address ? e.value.delivery.address.slice(0, 64) : "Not specified"), 1)
183
183
  ]),
184
- t("div", Vt, [
184
+ t("div", zt, [
185
185
  Et,
186
186
  t("p", Bt, l(e.value.delivery.type ? e.value.delivery.type : "Not specified"), 1)
187
187
  ])
@@ -197,25 +197,25 @@ const i = (k) => (G("data-v-ad498447"), k = k(), J(), k), ot = {
197
197
  ]),
198
198
  t("div", Rt, [
199
199
  Ft,
200
- t("ul", Ht, [
201
- (n(!0), m(I, null, D(P.value, (u, c) => (n(), C(L, {
200
+ t("ul", Lt, [
201
+ (n(!0), m(I, null, D(P.value, (u, c) => (n(), C(T, {
202
202
  key: u._id,
203
203
  editable: !1,
204
204
  product: u
205
205
  }, null, 8, ["product"]))), 128))
206
206
  ]),
207
- t("div", Lt, [
208
- t("div", Tt, [
209
- Ut,
210
- t("p", null, l(v(V)) + " " + l(s.returnCurrency()), 1)
207
+ t("div", Tt, [
208
+ t("div", Ut, [
209
+ qt,
210
+ t("p", null, l(v(z)) + " " + l(s.returnCurrency()), 1)
211
211
  ]),
212
- t("div", qt, [
212
+ t("div", Ht, [
213
213
  Wt,
214
214
  t("p", null, l(s.returnCurrency()) + " " + l(Math.trunc(100 + 20 * ((p = r.value[0]) == null ? void 0 : p.distance) - 7, 5 * (((_ = r.value[0]) == null ? void 0 : _.distance) / 10))), 1)
215
215
  ]),
216
216
  t("div", jt, [
217
217
  Gt,
218
- t("p", Jt, l(s.returnCurrency()) + " " + l(Math.trunc(100 + 20 * ((h = r.value[0]) == null ? void 0 : h.distance) - 7, 5 * (((B = r.value[0]) == null ? void 0 : B.distance) / 10)) + v(V)), 1)
218
+ t("p", Jt, l(s.returnCurrency()) + " " + l(Math.trunc(100 + 20 * ((h = r.value[0]) == null ? void 0 : h.distance) - 7, 5 * (((B = r.value[0]) == null ? void 0 : B.distance) / 10)) + v(z)), 1)
219
219
  ])
220
220
  ]),
221
221
  Kt,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router");;/* empty css */const P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");;/* empty css */;/* empty css */const C=require("../../../users/components/blocks/CardUser.vue.cjs"),V=require("../sections/FormAddCustomer.vue.cjs"),O=require("../sections/FormDelivery.vue.cjs"),E=require("../sections/FormPayment.vue.cjs"),l=require("../../../globals/views/store/globals.cjs"),F=require("../../../auth/views/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");;/* empty css */const R={class:"h-100 flex flex-column pd-thin"},T={class:"flex-v-center flex-nowrap flex"},A=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),I=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),z={class:"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=f.useRoute(),g=f.useRouter();t.mutations.resetOrder(t.state.current);let v=e.computed(()=>Number(t.state.current.positions.reduce((d,n)=>d+n.price*n.quantity,0)));const s=e.ref("positions"),c=e.ref(!1);function y(){c.value=!0}function m(){c.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"User",target:F.state.user._id},t.state.current.owner={type:"Organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function x(){g.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(()=>{}),(d,n)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(P.default,{submit:w,callback:x,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(q.default,{selected:s.value,"onUpdate:selected":n[0]||(n[0]=r=>s.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-light mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let h={...o};h.quantity=1,l.actions.add(t.state.current.positions,h),m()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),s.value==="positions"?(e.openBlock(),e.createBlock(u.default,{key:0,title:"Positions",actions:[{label:"+",function:()=>y()}],class:"mn-b-small"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",L," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{l.actions.increment(t.state.current.positions,r)},onDecrease:()=>{l.actions.decrement(t.state.current.positions,r)},onRemove:()=>{l.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:n[1]||(n[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name"])):(e.openBlock(),e.createBlock(b.default,{key:1,search:{placeholder:"Search customer...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>e.unref(D.default).read(r),state:null},options:{owner:e.unref(a).params._id},class:"bg-light h-max-20r o-scroll"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),s.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(v))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router");;/* empty css */const P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");;/* empty css */;/* empty css */const C=require("../../../users/components/blocks/CardUser.vue.cjs"),V=require("../sections/FormAddCustomer.vue.cjs"),O=require("../sections/FormDelivery.vue.cjs"),E=require("../sections/FormPayment.vue.cjs"),l=require("../../../globals/views/store/globals.cjs"),F=require("../../../auth/views/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");;/* empty css */const R={class:"h-100 flex flex-column pd-thin"},T={class:"flex-v-center flex-nowrap flex"},A=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),I=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),z={class:"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=f.useRoute(),g=f.useRouter();t.mutations.resetOrder(t.state.current);let v=e.computed(()=>Number(t.state.current.positions.reduce((d,n)=>d+n.price*n.quantity,0)));const s=e.ref("positions"),c=e.ref(!1);function y(){c.value=!0}function m(){c.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"User",target:F.state.user._id},t.state.current.owner={type:"Organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function x(){g.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(()=>{}),(d,n)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(P.default,{submit:w,callback:x,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(q.default,{selected:s.value,"onUpdate:selected":n[0]||(n[0]=r=>s.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-light mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let h={...o};h.quantity=1,l.actions.add(t.state.current.positions,h),m()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),s.value==="positions"?(e.openBlock(),e.createBlock(u.default,{key:0,title:"Positions",actions:[{label:"+",function:()=>y()}],class:"mn-b-small"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",L," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{l.actions.increment(t.state.current.positions,r)},onDecrease:()=>{l.actions.decrement(t.state.current.positions,r)},onRemove:()=>{l.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:n[1]||(n[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name"])):(e.openBlock(),e.createBlock(b.default,{key:1,search:{placeholder:"Search customer...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>e.unref(D.default).read(r),state:null},options:{owner:e.unref(a).params._id},class:"bg-light h-max-20r o-scroll"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),s.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(v))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;
@@ -3,11 +3,11 @@ import { useRoute as L, useRouter as M } from "vue-router";
3
3
  /* empty css */
4
4
  import j from "../../../../components/Button/Button.vue2.js";
5
5
  import G from "../../../../components/Tab/Tab.vue2.js";
6
- import O from "../../../../components/Popup/Popup.vue2.js";
6
+ import O from "../../../../components/Popup/Popup.vue.js";
7
7
  import h from "../../../../components/Block/Block.vue.js";
8
8
  import $ from "../../../../components/Feed/Feed.vue.js";
9
9
  import N from "../blocks/CardOrderItem.vue.js";
10
- /* empty css */
10
+ /* empty css */
11
11
  /* empty css */
12
12
  import B from "../../../users/components/blocks/CardUser.vue.js";
13
13
  import H from "../sections/FormAddCustomer.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const b=require("../../../../components/FieldPhone/click-outside.cjs");;/* empty css */const g=require("../../../../components/Feed/Feed.vue.cjs"),v=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../globals/views/components/blocks/BlockSearch.vue.cjs"),n=require("../../../users/components/blocks/CardUser.vue.cjs"),q=require("./FormCustomerDetails.vue.cjs"),_=require("../../../users/store/users.cjs"),w=require("../../../auth/views/store/auth.cjs"),B=require("../../../globals/views/store/globals.cjs"),y=require("../../store/customers.store.cjs"),x=require("../../store/models/customer.cjs"),E={key:2,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={__name:"FormAddCustomer",props:{order:Object},emits:["callbackCustomer"],setup(V,{emit:i}){let c=b.default;const d=i,m=h.useRoute();let r=e.ref(x.default),u=e.ref(null),l=e.ref(!1);async function f(){let a={identity:{type:r.value.user?"User":"Visitor",target:r.value.user?r.value.user._id:null},owner:{type:"Organization",target:m.params._id},creator:{type:"User",target:w.state.user._id},phone:r.value.phone,email:r.value.email,profile:r.value.profile,socials:r.value.socials};try{let o=await y.default.create(a);r.value=o}catch(o){console.log(o)}}function p(){d("callbackCustomer",r.value)}return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k.default,{class:"pos-relative mn-b-thin"},{default:e.withCtx(()=>[e.unref(r).user?(e.openBlock(),e.createBlock(n.default,{key:1,user:e.unref(r).user,photo:e.unref(r).user.profile.photo,name:e.unref(r).user.profile.name||e.unref(r).user.phone||e.unref(r).user.email,onClick:o[1]||(o[1]=()=>{e.unref(r).user=null}),class:"bg-white h-2r pd-thin radius-medium w-100"},null,8,["user","photo","name"])):e.withDirectives((e.openBlock(),e.createBlock(C.default,{key:0,onSearch:o[0]||(o[0]=s=>{e.isRef(u)?u.value=s:u=s,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-white"},null,512)),[[e.unref(c),()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(u)&&e.unref(l)&&!e.unref(r).user?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(g.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:s=>_.actions.read(s),state:null},options:{search:e.unref(u)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(t,F)=>(e.openBlock(),e.createBlock(n.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{e.unref(r).user=t,e.unref(r).profile=t.profile,e.unref(r).phone=t.phone,e.unref(r).email=t.email,e.unref(r).socials=t.socials},class:"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(q.default,{customer:e.unref(r),class:"mn-b-thin bg-light"},null,8,["customer"]),e.createVNode(v.default,{submit:f,callback:p,onError:e.unref(B.setError),class:"w-100 pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Customer ")]),_:1},8,["onError"])],64))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const b=require("../../../../components/FieldPhone/click-outside.cjs");;/* empty css */const g=require("../../../../components/Feed/Feed.vue.cjs"),v=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../globals/views/components/blocks/BlockSearch.vue.cjs"),n=require("../../../users/components/blocks/CardUser.vue.cjs"),q=require("./FormCustomerDetails.vue.cjs"),_=require("../../../users/store/users.cjs"),w=require("../../../auth/views/store/auth.cjs"),B=require("../../../globals/views/store/globals.cjs"),y=require("../../store/customers.store.cjs"),x=require("../../store/models/customer.cjs"),E={key:2,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={__name:"FormAddCustomer",props:{order:Object},emits:["callbackCustomer"],setup(V,{emit:i}){let c=b.default;const d=i,m=h.useRoute();let r=e.ref(x.default),u=e.ref(null),l=e.ref(!1);async function f(){let a={identity:{type:r.value.user?"User":"Visitor",target:r.value.user?r.value.user._id:null},owner:{type:"Organization",target:m.params._id},creator:{type:"User",target:w.state.user._id},phone:r.value.phone,email:r.value.email,profile:r.value.profile,socials:r.value.socials};try{let o=await y.default.create(a);r.value=o}catch(o){console.log(o)}}function p(){d("callbackCustomer",r.value)}return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k.default,{class:"pos-relative mn-b-thin"},{default:e.withCtx(()=>[e.unref(r).user?(e.openBlock(),e.createBlock(n.default,{key:1,user:e.unref(r).user,photo:e.unref(r).user.profile.photo,name:e.unref(r).user.profile.name||e.unref(r).user.phone||e.unref(r).user.email,onClick:o[1]||(o[1]=()=>{e.unref(r).user=null}),class:"bg-white h-2r pd-thin radius-medium w-100"},null,8,["user","photo","name"])):e.withDirectives((e.openBlock(),e.createBlock(C.default,{key:0,onSearch:o[0]||(o[0]=s=>{e.isRef(u)?u.value=s:u=s,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-white"},null,512)),[[e.unref(c),()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(u)&&e.unref(l)&&!e.unref(r).user?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(g.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:s=>_.actions.read(s),state:null},options:{search:e.unref(u)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(t,F)=>(e.openBlock(),e.createBlock(n.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{e.unref(r).user=t,e.unref(r).profile=t.profile,e.unref(r).phone=t.phone,e.unref(r).email=t.email,e.unref(r).socials=t.socials},class:"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(q.default,{customer:e.unref(r),class:"mn-b-thin bg-light"},null,8,["customer"]),e.createVNode(v.default,{submit:f,callback:p,onError:e.unref(B.setError),class:"w-100 pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Customer ")]),_:1},8,["onError"])],64))}};exports.default=N;
@@ -3,7 +3,7 @@ import { useRoute as U } from "vue-router";
3
3
  import N from "../../../../components/Block/Block.vue.js";
4
4
  /* empty css */
5
5
  import O from "../../../../components/FieldPhone/click-outside.js";
6
- /* empty css */
6
+ /* empty css */
7
7
  import V from "../../../../components/Feed/Feed.vue.js";
8
8
  import B from "../../../../components/Button/Button.vue2.js";
9
9
  import F from "../../../globals/views/components/blocks/BlockSearch.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Field/Field.vue2.cjs"),o=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),u=require("../../../../components/Select/Select.vue2.cjs"),i={class:"gap-thin flex-justify-between flex-nowrap flex"},d={__name:"FormCustomerDetails",props:{customer:Object,title:{type:String,default:"Personal Data"}},setup(a){let s=e.ref("instagram");return(m,l)=>(e.openBlock(),e.createBlock(r.default,{title:a.title,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createVNode(n.default,{field:a.customer.profile.name,"onUpdate:field":l[0]||(l[0]=t=>a.customer.profile.name=t),label:"Name",placeholder:"Enter name",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["field"]),e.createVNode(o.default,{modelValue:a.customer.phone,"onUpdate:modelValue":l[1]||(l[1]=t=>a.customer.phone=t),onCountry:l[2]||(l[2]=t=>{a.customer.number=t}),inputOptions:{placeholder:"Enter phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"w-100 bg-white pd-small mn-b-thin radius-small"},null,8,["modelValue"]),e.createElementVNode("div",i,[e.createVNode(u.default,{select:e.unref(s),options:[{name:"Instagram",value:"instagram"},{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"}],"onUpdate:select":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),placeholder:"Messenger",size:"small",class:"bg-white pd-small radius-small"},null,8,["select"]),e.createVNode(n.default,{field:a.customer.socials[e.unref(s)],"onUpdate:field":l[4]||(l[4]=t=>a.customer.socials[e.unref(s)]=t),label:"@",placeholder:"Enter username",class:"bg-white pd-small radius-small w-100"},null,8,["field"])])]),_:1},8,["title"]))}};exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Field/Field.vue2.cjs"),o=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),u=require("../../../../components/Select/Select.vue.cjs"),i={class:"gap-thin flex-justify-between flex-nowrap flex"},d={__name:"FormCustomerDetails",props:{customer:Object,title:{type:String,default:"Personal Data"}},setup(a){let s=e.ref("instagram");return(m,l)=>(e.openBlock(),e.createBlock(r.default,{title:a.title,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createVNode(n.default,{field:a.customer.profile.name,"onUpdate:field":l[0]||(l[0]=t=>a.customer.profile.name=t),label:"Name",placeholder:"Enter name",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["field"]),e.createVNode(o.default,{modelValue:a.customer.phone,"onUpdate:modelValue":l[1]||(l[1]=t=>a.customer.phone=t),onCountry:l[2]||(l[2]=t=>{a.customer.number=t}),inputOptions:{placeholder:"Enter phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"w-100 bg-white pd-small mn-b-thin radius-small"},null,8,["modelValue"]),e.createElementVNode("div",i,[e.createVNode(u.default,{select:e.unref(s),options:[{name:"Instagram",value:"instagram"},{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"}],"onUpdate:select":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),placeholder:"Messenger",size:"small",class:"bg-white pd-small radius-small"},null,8,["select"]),e.createVNode(n.default,{field:a.customer.socials[e.unref(s)],"onUpdate:field":l[4]||(l[4]=t=>a.customer.socials[e.unref(s)]=t),label:"@",placeholder:"Enter username",class:"bg-white pd-small radius-small w-100"},null,8,["field"])])]),_:1},8,["title"]))}};exports.default=d;
@@ -2,7 +2,7 @@ import { ref as o, openBlock as m, createBlock as i, withCtx as u, createVNode a
2
2
  import p from "../../../../components/Block/Block.vue.js";
3
3
  import r from "../../../../components/Field/Field.vue2.js";
4
4
  import c from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import g from "../../../../components/Select/Select.vue2.js";
5
+ import g from "../../../../components/Select/Select.vue.js";
6
6
  const h = { class: "gap-thin flex-justify-between flex-nowrap flex" }, V = {
7
7
  __name: "FormCustomerDetails",
8
8
  props: {