@ozdao/prometheus-framework 0.2.190 → 0.2.191

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. package/dist/builder.js +1 -1
  2. package/dist/builder.mjs +1 -1
  3. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  5. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  7. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  9. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  11. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  17. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/globals/globals.client.js +1 -1
  19. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +80 -49
  23. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +94 -125
  25. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +1 -0
  26. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +96 -0
  27. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
  35. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  41. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  45. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  49. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  67. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  73. package/dist/style.css +1 -1
  74. package/package.json +1 -1
  75. package/src/builder/webpack/webpack.config.base.js +1 -1
  76. package/src/components/index.js +0 -1
  77. package/src/main.js +0 -3
  78. package/src/modules/globals/globals.client.js +3 -3
  79. package/src/modules/globals/views/components/layouts/App.vue +44 -6
  80. package/src/modules/globals/views/components/layouts/Client.vue +2 -47
  81. package/src/modules/globals/views/components/sections/Walkthrough.vue +5 -5
  82. /package/src/{components/LocationSelection → modules/globals/views/components/partials}/LocationSelection.vue +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("vue-router"),o=require("../../store/globals.cjs"),w=require("../../../../../components/Loader/Loader.vue2.cjs"),b=require("../../../../../components/Status/Status.vue.cjs"),O=require("../../../../../components/Sidebar/Sidebar.vue.cjs"),y=require("../../../../../components/Popup/Popup.vue.cjs");require("vue-i18n");;/* empty css */const P=require("../../../../../components/LocationSelection/LocationSelection.vue.cjs"),N=require("../partials/Navigation.vue.cjs");require("../../../../products/store/categories.cjs");const q=require("../partials/BottomNavigation.vue.cjs"),V=require("../../../../orders/components/partials/ShopCart.vue.cjs"),L=require("../../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");;/* empty css */const x={id:"app-wrapper",class:"pos-relative"},T={key:0,class:"w-100"},E={__name:"Client",setup($){let i;__MOBILE_APP__?i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../sections/Walkthrough.vue.cjs")).then(t=>t.default)):i=null;const s=e.ref(!1);async function g(){const t=await L.Preferences.get({key:"first-use"});s.value=t.value?JSON.parse(t.value):!0}const k=t=>{s.value=t},c=v.useRoute();v.useRouter();let p=e.ref(!1);const u=e.ref(null),B=e.ref(null),f=e.ref(c.query.referalCode);function C(){o.state.isOpenLocationPopup=!1}function _(){document.getElementById("app").scrollIntoView()}const n=e.ref(0);let l=!1;const a=e.ref(null);e.computed(()=>n.value>50?"light":c.meta.header_theme||"light");const h=()=>{if(n.value=event.target.scrollTop,n.value>50&&!l){l=!0,a.value.$el.classList.add("scrolled");const r=-a.value.$el.getBoundingClientRect().top;a.value.$el.style.transform=`translateY(${r}px)`,setTimeout(()=>{a.value.$el.style.transform="translateY(0)"},0)}else if(n.value<=75&&l){l=!1,a.value.$el.classList.remove("scrolled");const r=a.value.$el.getBoundingClientRect().top;a.value.$el.style.transform=`translateY(${r}px)`,setTimeout(()=>{a.value.$el.style.transform="translateY(0)"},0)}};return e.onMounted(async()=>{await g(),"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/service-worker.js").then(r=>{console.log("SW registered: ",r)}).catch(r=>{console.log("SW registration failed: ",r)})}),u&&(p.value=!0);const t=localStorage.getItem("position");t?o.state.position=JSON.parse(t):o.state.isOpenLocationPopup=!0,f.value&&localStorage.setItem("referalCode",f.value)}),(t,r)=>{const S=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",x,[e.createVNode(e.Transition,{name:"moveFromTop",appear:""},{default:e.withCtx(()=>[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.default,{key:0,class:"pos-fixed"}))]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition",mode:"out-in"},{default:e.withCtx(()=>[t.MOBILE_APP&&s.value?(e.openBlock(),e.createElementBlock("section",T,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i)),{onUpdateFirstUse:k,slides:[1,2,3],class:"tab"},null,32))])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"moveFromTop",mode:"out-in",appear:""},{default:e.withCtx(()=>[e.unref(p)&&o.state.isOpenSidebar?(e.openBlock(),e.createBlock(O.default,{key:0,stateSidebar:o.state.isOpenSidebar,onCloseSidebar:r[0]||(r[0]=()=>{o.state.isOpenSidebar=!o.state.isOpenSidebar}),class:e.normalizeClass(["transition-ease-in-out pos-absolute w-70 z-index-0 bg-light",{"pos-l-70-negative":!o.state.isOpenSidebar,"pos-l-0":o.state.isOpenSidebar}])},{default:e.withCtx(()=>[e.createVNode(N.default,{class:"h3 pd-big cols-1"})]),_:1},8,["stateSidebar","class"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(y.default,{onClosePopup:C,isPopupOpen:o.state.isOpenLocationPopup,class:"bg-white pd-semi w-m-33r radius-big"},{default:e.withCtx(()=>[e.createVNode(P.default)]),_:1},8,["isPopupOpen"]),!s.value&&t.MOBILE_APP||!t.MOBILE_APP?(e.openBlock(),e.createElementBlock("section",{key:0,id:"screen",ref_key:"screen",ref:B,onScroll:h,onClick:r[1]||(r[1]=m=>o.state.isOpenSidebar?d=>o.state.isOpenSidebar=!1:d=>{console.log("not succes")}),class:e.normalizeClass(["transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll",{"pos-l-70":o.state.isOpenSidebar,"pos-l-0":!o.state.isOpenSidebar}])},[e.createVNode(V.default),o.state.error.show?(e.openBlock(),e.createBlock(b.default,{key:0,data:o.state.error,class:"z-index-7"},null,8,["data"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(({Component:m,route:d})=>[e.createVNode(e.Transition,{onBeforeEnter:_,name:"scaleIn",mode:"out-in",appear:""},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m),{ref_key:"page",ref:u,key:d.path}))]),_:2},1024)]),_:1})]),_:1}))],34)):e.createCommentVNode("",!0),t.MOBILE_APP&&e.unref(c).meta.title_hide?(e.openBlock(),e.createBlock(q.default,{key:1,class:"pd-small z-index-2"})):e.createCommentVNode("",!0)])}}};exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),t=require("../../store/globals.cjs"),C=require("../../../../../components/Loader/Loader.vue2.cjs"),b=require("../../../../../components/Status/Status.vue.cjs"),h=require("../../../../../components/Sidebar/Sidebar.vue.cjs"),_=require("../../../../../components/Popup/Popup.vue.cjs");require("vue-i18n");;/* empty css */const w=require("../partials/LocationSelection.vue.cjs"),B=require("../partials/Navigation.vue.cjs");require("../../../../products/store/categories.cjs");const O=require("../partials/BottomNavigation.vue.cjs"),q=require("../../../../orders/components/partials/ShopCart.vue.cjs");;/* empty css */const y={id:"app-wrapper",class:"pos-relative"},N={__name:"Client",setup(V){const n=f.useRoute();f.useRouter();let u=e.ref(!1);const i=e.ref(null),m=e.ref(null),d=e.ref(n.query.referalCode);function v(){t.state.isOpenLocationPopup=!1}function g(){document.getElementById("app").scrollIntoView()}const s=e.ref(0);let l=!1;const r=e.ref(null);e.computed(()=>s.value>50?"light":n.meta.header_theme||"light");const S=()=>{if(s.value=event.target.scrollTop,s.value>50&&!l){l=!0,r.value.$el.classList.add("scrolled");const o=-r.value.$el.getBoundingClientRect().top;r.value.$el.style.transform=`translateY(${o}px)`,setTimeout(()=>{r.value.$el.style.transform="translateY(0)"},0)}else if(s.value<=75&&l){l=!1,r.value.$el.classList.remove("scrolled");const o=r.value.$el.getBoundingClientRect().top;r.value.$el.style.transform=`translateY(${o}px)`,setTimeout(()=>{r.value.$el.style.transform="translateY(0)"},0)}};return 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)})}),i&&(u.value=!0);const a=localStorage.getItem("position");a?t.state.position=JSON.parse(a):t.state.isOpenLocationPopup=!0,d.value&&localStorage.setItem("referalCode",d.value)}),(a,o)=>{const k=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",y,[e.createVNode(e.Transition,{name:"moveFromTop",appear:""},{default:e.withCtx(()=>[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:0,class:"pos-fixed"}))]),_:1}),e.createVNode(e.Transition,{name:"moveFromTop",mode:"out-in",appear:""},{default:e.withCtx(()=>[e.unref(u)&&t.state.isOpenSidebar?(e.openBlock(),e.createBlock(h.default,{key:0,stateSidebar:t.state.isOpenSidebar,onCloseSidebar:o[0]||(o[0]=()=>{t.state.isOpenSidebar=!t.state.isOpenSidebar}),class:e.normalizeClass(["transition-ease-in-out pos-absolute w-70 z-index-0 bg-light",{"pos-l-70-negative":!t.state.isOpenSidebar,"pos-l-0":t.state.isOpenSidebar}])},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"h3 pd-big cols-1"})]),_:1},8,["stateSidebar","class"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(_.default,{onClosePopup:v,isPopupOpen:t.state.isOpenLocationPopup,class:"bg-white pd-semi w-m-33r radius-big"},{default:e.withCtx(()=>[e.createVNode(w.default)]),_:1},8,["isPopupOpen"]),e.createElementVNode("section",{id:"screen",ref_key:"screen",ref:m,onScroll:S,onClick:o[1]||(o[1]=p=>t.state.isOpenSidebar?c=>t.state.isOpenSidebar=!1:c=>{console.log("not succes")}),class:e.normalizeClass(["transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll",{"pos-l-70":t.state.isOpenSidebar,"pos-l-0":!t.state.isOpenSidebar}])},[e.createVNode(q.default),t.state.error.show?(e.openBlock(),e.createBlock(b.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.createVNode(k,null,{default:e.withCtx(({Component:p,route:c})=>[e.createVNode(e.Transition,{onBeforeEnter:g,name:"scaleIn",mode:"out-in",appear:""},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p),{ref_key:"page",ref:i,key:c.path}))]),_:2},1024)]),_:1})]),_:1}))],34),a.MOBILE_APP&&e.unref(n).meta.title_hide?(e.openBlock(),e.createBlock(O.default,{key:0,class:"pd-small z-index-2"})):e.createCommentVNode("",!0)])}}};exports.default=N;
@@ -1,178 +1,147 @@
1
- import { defineAsyncComponent as R, ref as i, computed as T, onMounted as A, resolveComponent as F, openBlock as s, createElementBlock as O, createVNode as r, Transition as d, withCtx as n, createBlock as l, createCommentVNode as p, resolveDynamicComponent as P, unref as S, normalizeClass as k, Suspense as M } from "vue";
2
- import { useRoute as N, useRouter as x } from "vue-router";
3
- import { state as t } from "../../store/globals.js";
4
- import U from "../../../../../components/Loader/Loader.vue2.js";
5
- import W from "../../../../../components/Status/Status.vue.js";
6
- import z from "../../../../../components/Sidebar/Sidebar.vue.js";
7
- import Y from "../../../../../components/Popup/Popup.vue.js";
1
+ import { ref as l, computed as C, onMounted as P, resolveComponent as B, openBlock as s, createElementBlock as L, createVNode as r, Transition as v, withCtx as a, createBlock as n, createCommentVNode as u, unref as b, normalizeClass as O, createElementVNode as x, Suspense as R, resolveDynamicComponent as T } from "vue";
2
+ import { useRoute as E, useRouter as I } from "vue-router";
3
+ import { state as e } from "../../store/globals.js";
4
+ import N from "../../../../../components/Loader/Loader.vue2.js";
5
+ import z from "../../../../../components/Status/Status.vue.js";
6
+ import V from "../../../../../components/Sidebar/Sidebar.vue.js";
7
+ import W from "../../../../../components/Popup/Popup.vue.js";
8
8
  import "vue-i18n";
9
9
  /* empty css */
10
- import V from "../../../../../components/LocationSelection/LocationSelection.vue.js";
11
- import J from "../partials/Navigation.vue.js";
10
+ import Y from "../partials/LocationSelection.vue.js";
11
+ import F from "../partials/Navigation.vue.js";
12
12
  import "../../../../products/store/categories.js";
13
- import j from "../partials/BottomNavigation.vue.js";
14
- import q from "../../../../orders/components/partials/ShopCart.vue.js";
15
- import { Preferences as D } from "../../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
13
+ import M from "../partials/BottomNavigation.vue.js";
14
+ import j from "../../../../orders/components/partials/ShopCart.vue.js";
16
15
  /* empty css */
17
- const G = {
16
+ const q = {
18
17
  id: "app-wrapper",
19
18
  class: "pos-relative"
20
- }, H = {
21
- key: 0,
22
- class: "w-100"
23
- }, de = {
19
+ }, ie = {
24
20
  __name: "Client",
25
- setup(K) {
26
- let f;
27
- __MOBILE_APP__ ? f = R(
28
- () => import("../sections/Walkthrough.vue.js").then((e) => e.default)
29
- ) : f = null;
30
- const u = i(!1);
31
- async function w() {
32
- const e = await D.get({ key: "first-use" });
33
- u.value = e.value ? JSON.parse(e.value) : !0;
21
+ setup(A) {
22
+ const m = E();
23
+ I();
24
+ let g = l(!1);
25
+ const d = l(null), h = l(null), _ = l(m.query.referalCode);
26
+ function $() {
27
+ e.isOpenLocationPopup = !1;
34
28
  }
35
- const $ = (e) => {
36
- u.value = e;
37
- }, v = N();
38
- x();
39
- let b = i(!1);
40
- const _ = i(null), C = i(null), h = i(v.query.referalCode);
41
- function B() {
42
- t.isOpenLocationPopup = !1;
43
- }
44
- function L() {
29
+ function w() {
45
30
  document.getElementById("app").scrollIntoView();
46
31
  }
47
- const c = i(0);
48
- let m = !1;
49
- const a = i(null);
50
- T(() => c.value > 50 ? "light" : v.meta.header_theme || "light");
51
- const I = () => {
52
- if (c.value = event.target.scrollTop, c.value > 50 && !m) {
53
- m = !0, a.value.$el.classList.add("scrolled");
54
- const o = -a.value.$el.getBoundingClientRect().top;
55
- a.value.$el.style.transform = `translateY(${o}px)`, setTimeout(() => {
56
- a.value.$el.style.transform = "translateY(0)";
32
+ const p = l(0);
33
+ let c = !1;
34
+ const o = l(null);
35
+ C(() => p.value > 50 ? "light" : m.meta.header_theme || "light");
36
+ const y = () => {
37
+ if (p.value = event.target.scrollTop, p.value > 50 && !c) {
38
+ c = !0, o.value.$el.classList.add("scrolled");
39
+ const t = -o.value.$el.getBoundingClientRect().top;
40
+ o.value.$el.style.transform = `translateY(${t}px)`, setTimeout(() => {
41
+ o.value.$el.style.transform = "translateY(0)";
57
42
  }, 0);
58
- } else if (c.value <= 75 && m) {
59
- m = !1, a.value.$el.classList.remove("scrolled");
60
- const o = a.value.$el.getBoundingClientRect().top;
61
- a.value.$el.style.transform = `translateY(${o}px)`, setTimeout(() => {
62
- a.value.$el.style.transform = "translateY(0)";
43
+ } else if (p.value <= 75 && c) {
44
+ c = !1, o.value.$el.classList.remove("scrolled");
45
+ const t = o.value.$el.getBoundingClientRect().top;
46
+ o.value.$el.style.transform = `translateY(${t}px)`, setTimeout(() => {
47
+ o.value.$el.style.transform = "translateY(0)";
63
48
  }, 0);
64
49
  }
65
50
  };
66
- return A(async () => {
67
- await w(), "serviceWorker" in navigator && window.addEventListener("load", () => {
68
- navigator.serviceWorker.register("/service-worker.js").then((o) => {
69
- console.log("SW registered: ", o);
70
- }).catch((o) => {
71
- console.log("SW registration failed: ", o);
51
+ return P(async () => {
52
+ "serviceWorker" in navigator && window.addEventListener("load", () => {
53
+ navigator.serviceWorker.register("/service-worker.js").then((t) => {
54
+ console.log("SW registered: ", t);
55
+ }).catch((t) => {
56
+ console.log("SW registration failed: ", t);
72
57
  });
73
- }), _ && (b.value = !0);
74
- const e = localStorage.getItem("position");
75
- e ? t.position = JSON.parse(e) : t.isOpenLocationPopup = !0, h.value && localStorage.setItem("referalCode", h.value);
76
- }), (e, o) => {
77
- const E = F("router-view");
78
- return s(), O("div", G, [
79
- r(d, {
58
+ }), d && (g.value = !0);
59
+ const i = localStorage.getItem("position");
60
+ i ? e.position = JSON.parse(i) : e.isOpenLocationPopup = !0, _.value && localStorage.setItem("referalCode", _.value);
61
+ }), (i, t) => {
62
+ const k = B("router-view");
63
+ return s(), L("div", q, [
64
+ r(v, {
80
65
  name: "moveFromTop",
81
66
  appear: ""
82
67
  }, {
83
- default: n(() => [
84
- _.value ? p("", !0) : (s(), l(U, {
68
+ default: a(() => [
69
+ d.value ? u("", !0) : (s(), n(N, {
85
70
  key: 0,
86
71
  class: "pos-fixed"
87
72
  }))
88
73
  ]),
89
74
  _: 1
90
75
  }),
91
- r(d, {
92
- name: "scaleTransition",
93
- mode: "out-in"
94
- }, {
95
- default: n(() => [
96
- e.MOBILE_APP && u.value ? (s(), O("section", H, [
97
- (s(), l(P(S(f)), {
98
- onUpdateFirstUse: $,
99
- slides: [1, 2, 3],
100
- class: "tab"
101
- }, null, 32))
102
- ])) : p("", !0)
103
- ]),
104
- _: 1
105
- }),
106
- r(d, {
76
+ r(v, {
107
77
  name: "moveFromTop",
108
78
  mode: "out-in",
109
79
  appear: ""
110
80
  }, {
111
- default: n(() => [
112
- S(b) && t.isOpenSidebar ? (s(), l(z, {
81
+ default: a(() => [
82
+ b(g) && e.isOpenSidebar ? (s(), n(V, {
113
83
  key: 0,
114
- stateSidebar: t.isOpenSidebar,
115
- onCloseSidebar: o[0] || (o[0] = () => {
116
- t.isOpenSidebar = !t.isOpenSidebar;
84
+ stateSidebar: e.isOpenSidebar,
85
+ onCloseSidebar: t[0] || (t[0] = () => {
86
+ e.isOpenSidebar = !e.isOpenSidebar;
117
87
  }),
118
- class: k(["transition-ease-in-out pos-absolute w-70 z-index-0 bg-light", {
119
- "pos-l-70-negative": !t.isOpenSidebar,
120
- "pos-l-0": t.isOpenSidebar
88
+ class: O(["transition-ease-in-out pos-absolute w-70 z-index-0 bg-light", {
89
+ "pos-l-70-negative": !e.isOpenSidebar,
90
+ "pos-l-0": e.isOpenSidebar
121
91
  }])
122
92
  }, {
123
- default: n(() => [
124
- r(J, { class: "h3 pd-big cols-1" })
93
+ default: a(() => [
94
+ r(F, { class: "h3 pd-big cols-1" })
125
95
  ]),
126
96
  _: 1
127
- }, 8, ["stateSidebar", "class"])) : p("", !0)
97
+ }, 8, ["stateSidebar", "class"])) : u("", !0)
128
98
  ]),
129
99
  _: 1
130
100
  }),
131
- r(Y, {
132
- onClosePopup: B,
133
- isPopupOpen: t.isOpenLocationPopup,
101
+ r(W, {
102
+ onClosePopup: $,
103
+ isPopupOpen: e.isOpenLocationPopup,
134
104
  class: "bg-white pd-semi w-m-33r radius-big"
135
105
  }, {
136
- default: n(() => [
137
- r(V)
106
+ default: a(() => [
107
+ r(Y)
138
108
  ]),
139
109
  _: 1
140
110
  }, 8, ["isPopupOpen"]),
141
- !u.value && e.MOBILE_APP || !e.MOBILE_APP ? (s(), O("section", {
142
- key: 0,
111
+ x("section", {
143
112
  id: "screen",
144
113
  ref_key: "screen",
145
- ref: C,
146
- onScroll: I,
147
- onClick: o[1] || (o[1] = (y) => t.isOpenSidebar ? (g) => t.isOpenSidebar = !1 : (g) => {
114
+ ref: h,
115
+ onScroll: y,
116
+ onClick: t[1] || (t[1] = (S) => e.isOpenSidebar ? (f) => e.isOpenSidebar = !1 : (f) => {
148
117
  console.log("not succes");
149
118
  }),
150
- class: k(["transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll", {
151
- "pos-l-70": t.isOpenSidebar,
152
- "pos-l-0": !t.isOpenSidebar
119
+ class: O(["transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll", {
120
+ "pos-l-70": e.isOpenSidebar,
121
+ "pos-l-0": !e.isOpenSidebar
153
122
  }])
154
123
  }, [
155
- r(q),
156
- t.error.show ? (s(), l(W, {
124
+ r(j),
125
+ e.error.show ? (s(), n(z, {
157
126
  key: 0,
158
- data: t.error,
127
+ data: e.error,
159
128
  class: "z-index-7"
160
- }, null, 8, ["data"])) : p("", !0),
161
- (s(), l(M, null, {
162
- default: n(() => [
163
- r(E, null, {
164
- default: n(({ Component: y, route: g }) => [
165
- r(d, {
166
- onBeforeEnter: L,
129
+ }, null, 8, ["data"])) : u("", !0),
130
+ (s(), n(R, null, {
131
+ default: a(() => [
132
+ r(k, null, {
133
+ default: a(({ Component: S, route: f }) => [
134
+ r(v, {
135
+ onBeforeEnter: w,
167
136
  name: "scaleIn",
168
137
  mode: "out-in",
169
138
  appear: ""
170
139
  }, {
171
- default: n(() => [
172
- (s(), l(P(y), {
140
+ default: a(() => [
141
+ (s(), n(T(S), {
173
142
  ref_key: "page",
174
- ref: _,
175
- key: g.path
143
+ ref: d,
144
+ key: f.path
176
145
  }))
177
146
  ]),
178
147
  _: 2
@@ -183,15 +152,15 @@ const G = {
183
152
  ]),
184
153
  _: 1
185
154
  }))
186
- ], 34)) : p("", !0),
187
- e.MOBILE_APP && S(v).meta.title_hide ? (s(), l(j, {
188
- key: 1,
155
+ ], 34),
156
+ i.MOBILE_APP && b(m).meta.title_hide ? (s(), n(M, {
157
+ key: 0,
189
158
  class: "pd-small z-index-2"
190
- })) : p("", !0)
159
+ })) : u("", !0)
191
160
  ]);
192
161
  };
193
162
  }
194
163
  };
195
164
  export {
196
- de as default
165
+ ie as default
197
166
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),d=require("../../../../../components/Address/Address.vue2.cjs"),p=require("../../../../../components/LocationMarker/LocationMarker.vue2.cjs"),i=require("vue-router"),c=require("vue-i18n"),l=require("../../store/globals.cjs"),m={class:"t-center flex-center"},v=s.createElementVNode("p",{class:"h1 mn-b-medium"},"🌍",-1),y={class:"mn-b-semi"},b={class:"mn-b-small t-transp p-medium"},f={__name:"LocationSelection",setup(g){i.useRoute(),i.useRouter();const o=s.ref({country:null,state:null,city:null,address:null,location:null});function r(){l.state.position={...o.value},l.state.isOpenLocationPopup=!1,localStorage.setItem("position",JSON.stringify(l.state.position))}s.onMounted(()=>{o.value={...l.state.position}});const u={messages:{en:{title:"Choose Your Location",description:"Enter your address or select it on the map to see the nearest offers to you."},ru:{title:"Выбор Локации",description:"Пожалуйста, выберите вашу страну из списка ниже, чтобы увидеть варианты доставки и другую актуальную информацию:"}}},{t:a}=c.useI18n(u);return(n,e)=>(s.openBlock(),s.createElementBlock("div",m,[v,s.createElementVNode("h3",y,s.toDisplayString(s.unref(a)("title")),1),s.createElementVNode("p",b,s.toDisplayString(s.unref(a)("description")),1),(s.openBlock(),s.createBlock(d.default,{key:n.$i18n.locale,apiKey:n.GOOGLE_MAPS_API_KEY,locale:n.$i18n.locale,address:o.value.address,location:o.value.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey-transp-25 br-solid br-2px pd-medium","onUpdate:country":e[0]||(e[0]=t=>{o.value.country=t}),"onUpdate:state":e[1]||(e[1]=t=>{o.value.state=t}),"onUpdate:city":e[2]||(e[2]=t=>{o.value.city=t}),"onUpdate:location":e[3]||(e[3]=t=>{o.value.location=t}),"onUpdate:address":e[4]||(e[4]=t=>{o.value.address=t})},null,8,["apiKey","locale","address","location"])),(s.openBlock(),s.createBlock(p.default,{key:n.$i18n.locale,apiKey:n.GOOGLE_MAPS_API_KEY,locale:n.$i18n.locale,address:o.value.address,location:o.value.location,class:"bg-light radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:country":e[5]||(e[5]=t=>{o.value.country=t}),"onUpdate:state":e[6]||(e[6]=t=>{o.value.state=t}),"onUpdate:city":e[7]||(e[7]=t=>{o.value.city=t}),"onUpdate:location":e[8]||(e[8]=t=>{o.value.location=t}),"onUpdate:address":e[9]||(e[9]=t=>{o.value.address=t})},null,8,["apiKey","locale","address","location"])),s.createElementVNode("button",{onClick:e[10]||(e[10]=t=>r()),class:"w-100 mn-t-medium bg-main radius-extra button"},"Save Position")]))}};exports.default=f;
@@ -0,0 +1,96 @@
1
+ import { ref as y, onMounted as c, openBlock as l, createElementBlock as v, createElementVNode as i, toDisplayString as r, unref as d, createBlock as u } from "vue";
2
+ import f from "../../../../../components/Address/Address.vue2.js";
3
+ import b from "../../../../../components/LocationMarker/LocationMarker.vue2.js";
4
+ import { useRoute as U, useRouter as g } from "vue-router";
5
+ import { useI18n as E } from "vue-i18n";
6
+ import { state as n } from "../../store/globals.js";
7
+ const k = { class: "t-center flex-center" }, P = /* @__PURE__ */ i("p", { class: "h1 mn-b-medium" }, "🌍", -1), S = { class: "mn-b-semi" }, $ = { class: "mn-b-small t-transp p-medium" }, M = {
8
+ __name: "LocationSelection",
9
+ setup(K) {
10
+ U(), g();
11
+ const e = y({
12
+ country: null,
13
+ state: null,
14
+ city: null,
15
+ address: null,
16
+ location: null
17
+ });
18
+ function p() {
19
+ n.position = { ...e.value }, n.isOpenLocationPopup = !1, localStorage.setItem("position", JSON.stringify(n.position));
20
+ }
21
+ c(() => {
22
+ e.value = { ...n.position };
23
+ });
24
+ const m = {
25
+ messages: {
26
+ en: {
27
+ title: "Choose Your Location",
28
+ description: "Enter your address or select it on the map to see the nearest offers to you."
29
+ },
30
+ ru: {
31
+ title: "Выбор Локации",
32
+ description: "Пожалуйста, выберите вашу страну из списка ниже, чтобы увидеть варианты доставки и другую актуальную информацию:"
33
+ }
34
+ }
35
+ }, { t: a } = E(m);
36
+ return (s, o) => (l(), v("div", k, [
37
+ P,
38
+ i("h3", S, r(d(a)("title")), 1),
39
+ i("p", $, r(d(a)("description")), 1),
40
+ (l(), u(f, {
41
+ key: s.$i18n.locale,
42
+ apiKey: s.GOOGLE_MAPS_API_KEY,
43
+ locale: s.$i18n.locale,
44
+ address: e.value.address,
45
+ location: e.value.location,
46
+ placeholder: "Enter your address",
47
+ class: "bg-white radius-tl-medium radius-tr-medium t-black br-grey-transp-25 br-solid br-2px pd-medium",
48
+ "onUpdate:country": o[0] || (o[0] = (t) => {
49
+ e.value.country = t;
50
+ }),
51
+ "onUpdate:state": o[1] || (o[1] = (t) => {
52
+ e.value.state = t;
53
+ }),
54
+ "onUpdate:city": o[2] || (o[2] = (t) => {
55
+ e.value.city = t;
56
+ }),
57
+ "onUpdate:location": o[3] || (o[3] = (t) => {
58
+ e.value.location = t;
59
+ }),
60
+ "onUpdate:address": o[4] || (o[4] = (t) => {
61
+ e.value.address = t;
62
+ })
63
+ }, null, 8, ["apiKey", "locale", "address", "location"])),
64
+ (l(), u(b, {
65
+ key: s.$i18n.locale,
66
+ apiKey: s.GOOGLE_MAPS_API_KEY,
67
+ locale: s.$i18n.locale,
68
+ address: e.value.address,
69
+ location: e.value.location,
70
+ class: "bg-light radius-bl-medium radius-br-medium h-15r o-hidden",
71
+ "onUpdate:country": o[5] || (o[5] = (t) => {
72
+ e.value.country = t;
73
+ }),
74
+ "onUpdate:state": o[6] || (o[6] = (t) => {
75
+ e.value.state = t;
76
+ }),
77
+ "onUpdate:city": o[7] || (o[7] = (t) => {
78
+ e.value.city = t;
79
+ }),
80
+ "onUpdate:location": o[8] || (o[8] = (t) => {
81
+ e.value.location = t;
82
+ }),
83
+ "onUpdate:address": o[9] || (o[9] = (t) => {
84
+ e.value.address = t;
85
+ })
86
+ }, null, 8, ["apiKey", "locale", "address", "location"])),
87
+ i("button", {
88
+ onClick: o[10] || (o[10] = (t) => p()),
89
+ class: "w-100 mn-t-medium bg-main radius-extra button"
90
+ }, "Save Position")
91
+ ]));
92
+ }
93
+ };
94
+ export {
95
+ M as default
96
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router");;/* empty css */const P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");;/* empty css */;/* 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;
@@ -7,7 +7,7 @@ import O from "../../../../components/Popup/Popup.vue.js";
7
7
  import h from "../../../../components/Block/Block.vue.js";
8
8
  import $ from "../../../../components/Feed/Feed.vue.js";
9
9
  import N from "../blocks/CardOrderItem.vue.js";
10
- /* empty css */
10
+ /* empty css */
11
11
  /* empty css */
12
12
  import B from "../../../users/components/blocks/CardUser.vue.js";
13
13
  import H from "../sections/FormAddCustomer.vue.js";
@@ -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.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;
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;
@@ -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.vue.js";
5
+ import g from "../../../../components/Select/Select.vue2.js";
6
6
  const h = { class: "gap-thin flex-justify-between flex-nowrap flex" }, V = {
7
7
  __name: "FormCustomerDetails",
8
8
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("../../../globals/views/store/globals.cjs"),s=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Address/Address.vue.cjs"),u=require("../../../../components/LocationMarker/LocationMarker.vue.cjs"),i=require("../../../../components/Radio/Radio.vue.cjs"),m=require("../../../../components/Field/Field.vue2.cjs"),y=t.createElementVNode("h4",{class:"font-second mn-b-thin"},"Select deliverty type",-1),c={class:"mn-b-small flex-nowrap flex"},v=t.createElementVNode("h4",{class:"font-second mn-b-thin"},"Address",-1),b={__name:"FormDelivery",props:{order:Object},setup(e){const o=e;return t.onMounted(()=>{l.state.position&&(o.order.delivery.address=l.state.position.address),l.state.position&&(o.order.delivery.location=l.state.position.location)}),(a,d)=>(t.openBlock(),t.createBlock(s.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:t.withCtx(()=>[y,t.createElementVNode("div",c,[t.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[0]||(d[0]=r=>e.order.delivery.type=r),label:"Pickup",value:"pickup",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[1]||(d[1]=r=>e.order.delivery.type=r),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[2]||(d[2]=r=>e.order.delivery.type=r),label:"Post",value:"mail",class:"bg-white pd-medium radius-small w-100"},null,8,["radio"])]),v,t.createVNode(n.default,{label:"Location",apiKey:a.GOOGLE_MAPS_API_KEY,address:e.order.delivery.address,location:e.order.delivery.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black pd-medium","onUpdate:location":d[3]||(d[3]=r=>{e.order.delivery.location=r}),"onUpdate:address":d[4]||(d[4]=r=>{e.order.delivery.address=r})},null,8,["apiKey","address","location"]),t.createVNode(u.default,{apiKey:a.GOOGLE_MAPS_API_KEY,address:e.order.delivery.address,location:e.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":d[5]||(d[5]=r=>{e.order.delivery.location=r}),"onUpdate:address":d[6]||(d[6]=r=>{e.order.delivery.address=r})},null,8,["apiKey","address","location"]),t.createVNode(m.default,{field:e.order.comment,"onUpdate:field":d[7]||(d[7]=r=>e.order.comment=r),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1}))}};exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("../../../globals/views/store/globals.cjs"),s=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Address/Address.vue2.cjs"),u=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),i=require("../../../../components/Radio/Radio.vue.cjs"),m=require("../../../../components/Field/Field.vue2.cjs"),y=t.createElementVNode("h4",{class:"font-second mn-b-thin"},"Select deliverty type",-1),c={class:"mn-b-small flex-nowrap flex"},v=t.createElementVNode("h4",{class:"font-second mn-b-thin"},"Address",-1),b={__name:"FormDelivery",props:{order:Object},setup(e){const o=e;return t.onMounted(()=>{l.state.position&&(o.order.delivery.address=l.state.position.address),l.state.position&&(o.order.delivery.location=l.state.position.location)}),(a,d)=>(t.openBlock(),t.createBlock(s.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:t.withCtx(()=>[y,t.createElementVNode("div",c,[t.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[0]||(d[0]=r=>e.order.delivery.type=r),label:"Pickup",value:"pickup",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[1]||(d[1]=r=>e.order.delivery.type=r),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[2]||(d[2]=r=>e.order.delivery.type=r),label:"Post",value:"mail",class:"bg-white pd-medium radius-small w-100"},null,8,["radio"])]),v,t.createVNode(n.default,{label:"Location",apiKey:a.GOOGLE_MAPS_API_KEY,address:e.order.delivery.address,location:e.order.delivery.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black pd-medium","onUpdate:location":d[3]||(d[3]=r=>{e.order.delivery.location=r}),"onUpdate:address":d[4]||(d[4]=r=>{e.order.delivery.address=r})},null,8,["apiKey","address","location"]),t.createVNode(u.default,{apiKey:a.GOOGLE_MAPS_API_KEY,address:e.order.delivery.address,location:e.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":d[5]||(d[5]=r=>{e.order.delivery.location=r}),"onUpdate:address":d[6]||(d[6]=r=>{e.order.delivery.address=r})},null,8,["apiKey","address","location"]),t.createVNode(m.default,{field:e.order.comment,"onUpdate:field":d[7]||(d[7]=r=>e.order.comment=r),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1}))}};exports.default=b;
@@ -1,8 +1,8 @@
1
1
  import { onMounted as n, openBlock as m, createBlock as u, withCtx as y, createElementVNode as t, createVNode as i } from "vue";
2
2
  import { state as o } from "../../../globals/views/store/globals.js";
3
3
  import v from "../../../../components/Block/Block.vue.js";
4
- import f from "../../../../components/Address/Address.vue.js";
5
- import b from "../../../../components/LocationMarker/LocationMarker.vue.js";
4
+ import f from "../../../../components/Address/Address.vue2.js";
5
+ import b from "../../../../components/LocationMarker/LocationMarker.vue2.js";
6
6
  import l from "../../../../components/Radio/Radio.vue.js";
7
7
  import c from "../../../../components/Field/Field.vue2.js";
8
8
  const p = /* @__PURE__ */ t("h4", { class: "font-second mn-b-thin" }, "Select deliverty type", -1), w = { class: "mn-b-small flex-nowrap flex" }, g = /* @__PURE__ */ t("h4", { class: "font-second mn-b-thin" }, "Address", -1), O = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Select/Select.vue.cjs"),o={class:"mn-b-small flex-nowrap flex"},s={__name:"FormPayment",props:{order:Object},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(r.default,{title:"Payment"},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(n.default,{select:t.order.payment.type,"onUpdate:select":l[0]||(l[0]=a=>t.order.payment.type=a),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1}))}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Select/Select.vue2.cjs"),o={class:"mn-b-small flex-nowrap flex"},s={__name:"FormPayment",props:{order:Object},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(r.default,{title:"Payment"},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(n.default,{select:t.order.payment.type,"onUpdate:select":l[0]||(l[0]=a=>t.order.payment.type=a),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1}))}};exports.default=s;
@@ -1,6 +1,6 @@
1
1
  import { openBlock as r, createBlock as l, withCtx as o, createElementVNode as n, createVNode as m } from "vue";
2
2
  import s from "../../../../components/Block/Block.vue.js";
3
- import p from "../../../../components/Select/Select.vue.js";
3
+ import p from "../../../../components/Select/Select.vue2.js";
4
4
  const c = { class: "mn-b-small flex-nowrap flex" }, f = {
5
5
  __name: "FormPayment",
6
6
  props: {