@ozdao/prometheus-framework 0.2.82 → 0.2.83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/dist/credentials.schema-B-KD_ozQ.js +9 -0
  2. package/dist/credentials.schema-C9dmNy7o.mjs +10 -0
  3. package/dist/orders.server.js +592 -0
  4. package/dist/orders.server.mjs +593 -0
  5. package/dist/organizations.server.js +4 -3
  6. package/dist/organizations.server.mjs +2 -1
  7. package/dist/profile.schema-24ZpZQJe.mjs +25 -0
  8. package/dist/profile.schema-CkOhhf37.js +24 -0
  9. package/dist/prometheus-framework/src/modules/chats/components/blocks/ChatMessage.vue.cjs +1 -0
  10. package/dist/prometheus-framework/src/modules/chats/components/blocks/ChatMessage.vue.js +28 -0
  11. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue.cjs +1 -0
  12. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue.js +26 -0
  13. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue2.cjs +1 -0
  14. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue2.js +1 -0
  15. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue.cjs +1 -0
  16. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue.js +77 -0
  17. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue2.cjs +1 -0
  18. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue2.js +1 -0
  19. package/dist/prometheus-framework/src/modules/chats/store/chat.store.cjs +1 -0
  20. package/dist/prometheus-framework/src/modules/chats/store/chat.store.js +40 -0
  21. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  24. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  25. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  27. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/icons/navigation/IconCheckmark.vue.cjs +1 -0
  32. package/dist/prometheus-framework/src/modules/icons/navigation/IconCheckmark.vue.js +29 -0
  33. package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderChat.vue.cjs +1 -0
  34. package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderChat.vue.js +30 -0
  35. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.js +121 -1
  37. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue2.cjs +1 -0
  38. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue2.js +1 -0
  39. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +3 -0
  40. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +92 -0
  41. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -0
  42. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +202 -0
  43. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue2.cjs +1 -0
  44. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue2.js +1 -0
  45. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -0
  46. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +127 -0
  47. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue2.cjs +1 -0
  48. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue2.js +1 -0
  49. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs +1 -0
  52. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +89 -0
  53. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue2.cjs +1 -0
  54. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue2.js +1 -0
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.cjs +1 -0
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.js +24 -0
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/EmptyState.vue.cjs +1 -0
  58. package/dist/prometheus-framework/src/modules/orders/components/sections/EmptyState.vue.js +13 -0
  59. package/dist/prometheus-framework/src/modules/orders/components/sections/Succes.vue.cjs +1 -0
  60. package/dist/prometheus-framework/src/modules/orders/components/sections/Succes.vue.js +25 -0
  61. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +1 -0
  62. package/dist/prometheus-framework/src/modules/orders/orders.client.js +56 -0
  63. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -0
  64. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +58 -0
  65. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +5 -1
  67. package/dist/style.css +1 -1
  68. package/dist/users.server.js +7 -27
  69. package/dist/users.server.mjs +5 -25
  70. package/package.json +1 -1
  71. package/src/modules/chats/components/blocks/ChatMessage.vue +1 -1
  72. package/src/modules/orders/models/application.model.js +25 -25
  73. package/src/modules/orders/models/testimonial.model.js +22 -23
  74. package/src/modules/orders/orders.server.js +4 -0
@@ -0,0 +1,30 @@
1
+ import { openBlock as e, createElementBlock as t, createElementVNode as C } from "vue";
2
+ import o from "../../../../../_virtual/_plugin-vue_export-helper.js";
3
+ const r = {}, c = {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: "112",
6
+ height: "112",
7
+ viewBox: "0 0 112 112",
8
+ fill: "none"
9
+ }, l = /* @__PURE__ */ C("rect", {
10
+ width: "112",
11
+ height: "112",
12
+ fill: "rgb(var(--main))"
13
+ }, null, -1), n = /* @__PURE__ */ C("g", { opacity: "0.1" }, [
14
+ /* @__PURE__ */ C("path", {
15
+ fill: "rgb(var(--black))",
16
+ "fill-rule": "evenodd",
17
+ "clip-rule": "evenodd",
18
+ d: "M80.8929 71.3997V61.2081C80.8929 61.0087 80.9326 60.8113 81.0097 60.6271C81.0869 60.443 81.2 60.2758 81.3425 60.1352C81.4849 59.9946 81.654 59.8833 81.84 59.8077C82.026 59.7322 82.2252 59.6938 82.4262 59.6949H88.2874C88.7764 59.6927 89.2449 59.499 89.5907 59.1559C89.9365 58.8127 90.1318 58.348 90.1339 57.8627V24.8341C90.1296 24.3502 89.9334 23.8875 89.5878 23.5461C89.2422 23.2048 88.775 23.0122 88.2874 23.01H37.1771C36.6895 23.0122 36.2223 23.2048 35.8767 23.5461C35.5311 23.8875 35.3349 24.3502 35.3305 24.8341V57.8627C35.3327 58.348 35.528 58.8127 35.8738 59.1559C36.2196 59.499 36.688 59.6927 37.1771 59.6949H64.8756C65.2081 59.6949 65.5318 59.801 65.7989 59.9975L80.8929 71.3997ZM65.667 63.7028V77.9842C65.6541 79.0519 65.2209 80.0722 64.46 80.8272C63.6991 81.5823 62.6707 82.0121 61.5946 82.0248H41.2577L28.5626 91.5948C28.3449 91.7957 28.0727 91.9291 27.7796 91.9786C27.4865 92.028 27.1852 91.9914 26.9128 91.8732C26.6404 91.755 26.4088 91.5604 26.2464 91.3133C26.084 91.0662 25.9979 90.7774 25.9988 90.4824V82.0248H23.0723C21.9963 82.0121 20.9679 81.5823 20.207 80.8272C19.446 80.0722 19.0128 79.0519 19 77.9842V53.0859C19.0128 52.0182 19.446 50.9978 20.207 50.2428C20.9679 49.4878 21.9963 49.058 23.0723 49.0452H32.2969V24.8341C32.3162 23.5537 32.8391 22.3316 33.7539 21.4284C34.6688 20.5253 35.9031 20.0127 37.1936 20H88.3038C89.6071 19.9999 90.8578 20.5103 91.7839 21.42C92.7101 22.3298 93.237 23.5655 93.25 24.8586V57.8627C93.25 59.1643 92.7289 60.4126 91.8013 61.3329C90.8737 62.2533 89.6156 62.7704 88.3038 62.7704H83.9512V74.4425C83.9521 74.7375 83.866 75.0263 83.7037 75.2734C83.5413 75.5205 83.3096 75.7151 83.0372 75.8333C82.7648 75.9515 82.4635 75.9881 82.1704 75.9387C81.8773 75.8892 81.6052 75.7558 81.3875 75.5549L65.667 63.7028ZM32.2969 52.0798V57.8627C32.2968 59.1558 32.8112 60.3967 33.7281 61.3157C34.645 62.2347 35.8904 62.7574 37.1936 62.7704H62.6086V77.9842C62.6064 78.2503 62.4989 78.505 62.3092 78.6932C62.1195 78.8814 61.8629 78.9881 61.5946 78.9902H40.7219C40.3902 78.9883 40.0677 79.0978 39.8068 79.3011L29.0242 87.4396V80.528C29.0242 80.1245 28.8627 79.7375 28.5751 79.4522C28.2876 79.1669 27.8976 79.0066 27.4909 79.0066H23.0723C22.8041 79.0045 22.5474 78.8978 22.3577 78.7096C22.168 78.5213 22.0605 78.2667 22.0584 78.0005V53.0859C22.0605 52.8197 22.168 52.5651 22.3577 52.3769C22.5474 52.1886 22.8041 52.082 23.0723 52.0798H32.2969ZM47.9103 40.0233C48.1321 40.2417 48.2961 40.5112 48.3877 40.8077C48.4792 41.1043 48.4954 41.4186 48.4349 41.7229C48.3744 42.0272 48.2391 42.3119 48.0409 42.5517C47.8427 42.7915 47.5878 42.9789 47.2989 43.0974C47.0101 43.2158 46.6962 43.2616 46.3852 43.2306C46.0742 43.1996 45.7758 43.0927 45.5164 42.9196C45.2571 42.7465 45.0449 42.5125 44.8988 42.2384C44.7526 41.9642 44.6771 41.6585 44.6788 41.3484C44.6769 40.9761 44.7869 40.6116 44.9947 40.3016C45.2025 39.9916 45.4987 39.75 45.8455 39.6078C46.1923 39.4656 46.574 39.4292 46.9417 39.5032C47.3095 39.5772 47.6467 39.7583 47.9103 40.0233ZM46.5748 36.4407C47.5531 36.4407 48.5093 36.7285 49.3227 37.2678C50.1361 37.8071 50.7701 38.5735 51.1445 39.4703C51.5188 40.3671 51.6168 41.3538 51.4259 42.3058C51.2351 43.2578 50.764 44.1323 50.0723 44.8186C49.3805 45.505 48.4992 45.9724 47.5397 46.1618C46.5803 46.3511 45.5858 46.2539 44.682 45.8825C43.7782 45.511 43.0057 44.882 42.4622 44.0749C41.9187 43.2679 41.6287 42.319 41.6287 41.3484C41.6287 40.0468 42.1498 38.7985 43.0773 37.8781C44.0049 36.9578 45.263 36.4407 46.5748 36.4407ZM64.0842 40.0233C64.306 40.2417 64.47 40.5112 64.5616 40.8077C64.6531 41.1043 64.6694 41.4186 64.6089 41.7229C64.5483 42.0272 64.413 42.3119 64.2148 42.5517C64.0166 42.7915 63.7617 42.9789 63.4729 43.0974C63.184 43.2158 62.8701 43.2616 62.5591 43.2306C62.2481 43.1996 61.9497 43.0927 61.6904 42.9196C61.431 42.7465 61.2188 42.5125 61.0727 42.2384C60.9266 41.9642 60.851 41.6585 60.8527 41.3484C60.8585 40.9795 60.9731 40.6204 61.1822 40.3154C61.3913 40.0103 61.6858 39.7727 62.0294 39.6318C62.373 39.4909 62.7507 39.4529 63.1159 39.5225C63.481 39.592 63.8176 39.7661 64.0842 40.0233ZM62.7405 36.4407C63.7187 36.4407 64.675 36.7285 65.4884 37.2678C66.3018 37.8071 66.9358 38.5735 67.3101 39.4703C67.6845 40.3671 67.7824 41.3538 67.5916 42.3058C67.4007 43.2578 66.9297 44.1323 66.2379 44.8186C65.5462 45.505 64.6649 45.9724 63.7054 46.1618C62.746 46.3511 61.7515 46.2539 60.8477 45.8825C59.9439 45.511 59.1714 44.882 58.6279 44.0749C58.0844 43.2679 57.7943 42.319 57.7943 41.3484C57.7943 40.0468 58.3154 38.7985 59.243 37.8781C60.1706 36.9578 61.4287 36.4407 62.7405 36.4407ZM80.2499 40.0233C80.4717 40.2417 80.6357 40.5112 80.7273 40.8077C80.8188 41.1043 80.835 41.4186 80.7745 41.7229C80.714 42.0272 80.5786 42.3119 80.3804 42.5517C80.1823 42.7915 79.9274 42.9789 79.6385 43.0974C79.3497 43.2158 79.0358 43.2616 78.7248 43.2306C78.4138 43.1996 78.1154 43.0927 77.856 42.9196C77.5967 42.7465 77.3845 42.5125 77.2384 42.2384C77.0922 41.9642 77.0167 41.6585 77.0184 41.3484C77.0165 40.9761 77.1265 40.6116 77.3343 40.3016C77.5421 39.9916 77.8383 39.75 78.1851 39.6078C78.5319 39.4656 78.9136 39.4292 79.2813 39.5032C79.6491 39.5772 79.9863 39.7583 80.2499 40.0233ZM78.9144 36.4407C79.8927 36.4407 80.8489 36.7285 81.6623 37.2678C82.4757 37.8071 83.1097 38.5735 83.484 39.4703C83.8584 40.3671 83.9564 41.3538 83.7655 42.3058C83.5747 43.2578 83.1036 44.1323 82.4119 44.8186C81.7201 45.505 80.8388 45.9724 79.8793 46.1618C78.9199 46.3511 77.9254 46.2539 77.0216 45.8825C76.1178 45.511 75.3453 44.882 74.8018 44.0749C74.2583 43.2679 73.9682 42.319 73.9682 41.3484C73.9682 40.0468 74.4894 38.7985 75.4169 37.8781C76.3445 36.9578 77.6026 36.4407 78.9144 36.4407Z"
19
+ })
20
+ ], -1), i = [
21
+ l,
22
+ n
23
+ ];
24
+ function s(d, _) {
25
+ return e(), t("svg", c, i);
26
+ }
27
+ const V = /* @__PURE__ */ o(r, [["render", s]]);
28
+ export {
29
+ V as default
30
+ };
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router");require("./CardOrder.vue2.cjs");const i=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),o=t=>(e.pushScopeId("data-v-43fdd511"),t=t(),e.popScopeId(),t),m={class:"pd-big mn-regular order-customer-card col"},u={class:"mn-regular flex-center flex-nowrap flex w-100"},p={class:"w-100 t-medium p-big"},y={class:"flex-nowrap flex"},h={class:"mn-r-bold pd-r-big br-right-dark w-66"},k=o(()=>e.createElementVNode("ul",{class:"mn-semi"},null,-1)),v=o(()=>e.createElementVNode("p",{class:"mn-small t-medium p-big"}," Adress and delivery ",-1)),E={class:"mn-small"},N={key:0,class:"w-"},V={key:1,class:"w-"},g={key:2,class:"w-"},_={class:"w-40"},B={class:"mn-small w-100 t-medium p-big"},C=o(()=>e.createElementVNode("span",{class:"t-transp"},"Order:",-1)),S={key:0,class:"mn-medium w-100"},D=o(()=>e.createElementVNode("span",{class:"t-transp"},"Estimated shipping date:",-1)),f=o(()=>e.createElementVNode("br",null,null,-1)),b={key:1,class:"mn-medium w-100"},w=o(()=>e.createElementVNode("span",{class:"t-transp"},"Shipping date:",-1)),P=o(()=>e.createElementVNode("br",null,null,-1)),T={key:2,class:"mn-medium w-100"},x=o(()=>e.createElementVNode("span",{class:"t-transp"},"Type of delivery:",-1)),I=o(()=>e.createElementVNode("br",null,null,-1)),$=o(()=>e.createElementVNode("hr",{class:"mn-medium"},null,-1)),M=o(()=>e.createElementVNode("p",{class:"t-transp"},"In total",-1)),O={key:3,class:"mn-semi flex"},A=o(()=>e.createElementVNode("p",{class:"t-transp"},"Delivery",-1)),q={key:0},F={key:1},R={key:2},Y={class:"mn-semi intotal flex-bottom flex"},j=o(()=>e.createElementVNode("p",{class:"t-transp"},"In total to pay",-1)),z={key:0,class:"p-big t-semi"},H={key:1,class:"p-big t-semi"},K={key:2,class:"p-big t-semi"},G={key:3,class:"p-big t-semi"},J={key:4,class:"mn-semi"},L={key:5,class:"t-transp"},Q={__name:"CardOrder",props:{order:Object},setup(t){d.useRouter();function l(r){var s=new Date(r),c=(s.getMonth()+1).toString(),n=(s.getDate()+6).toString();return(n[1]?n:"0"+n[0])+"/"+(c[1]?c:"0"+c[0])}function a(r){var s=new Date(r),c=(s.getMonth()+1).toString(),n=(s.getDate()+1).toString();return(n[1]?n:"0"+n[0])+"/"+(c[1]?c:"0"+c[0])}return(r,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("p",u,[e.createElementVNode("span",p,e.toDisplayString(t.order.status),1)]),e.createElementVNode("div",y,[e.createElementVNode("div",h,[k,v,e.createElementVNode("p",E,e.toDisplayString(t.order.delivery.adress),1),t.order.delivery.type==="Post"?(e.openBlock(),e.createElementBlock("p",N," You have chosen delivery using the courier service CDEK. Estimated delivery date "+e.toDisplayString(l(t.order.createdAt))+". ",1)):e.createCommentVNode("",!0),t.order.delivery.type==="Courier"?(e.openBlock(),e.createElementBlock("p",V," You have chosen delivery by courier. Estimated delivery date "+e.toDisplayString(a(t.order.createdAt))+". ",1)):e.createCommentVNode("",!0),t.order.delivery.type==="Pickup"?(e.openBlock(),e.createElementBlock("p",g," You have chosen to receive the order in the Moscow store. ")):e.createCommentVNode("",!0)]),e.createElementVNode("div",_,[e.createElementVNode("p",B,[C,e.createTextVNode(" №"+e.toDisplayString(t.order._id.slice(0,8)),1)]),t.order.delivery.type==="Post"?(e.openBlock(),e.createElementBlock("p",S,[D,f,e.createTextVNode(e.toDisplayString(l(t.order.createdAt)),1)])):e.createCommentVNode("",!0),t.order.delivery.type==="Courier"?(e.openBlock(),e.createElementBlock("p",b,[w,P,e.createTextVNode(e.toDisplayString(a(t.order.createdAt)),1)])):e.createCommentVNode("",!0),t.order.delivery.type==="Pickup"?(e.openBlock(),e.createElementBlock("p",T,[x,I,e.createTextVNode("Pickup ")])):e.createCommentVNode("",!0),$,e.createElementVNode("div",{class:e.normalizeClass([{"mn-semi":t.order.delivery.type==""},"flex"])},[M,e.createElementVNode("p",null,"$ "+e.toDisplayString(r.cartTotalPrice),1)],2),t.order.delivery.type!==""?(e.openBlock(),e.createElementBlock("div",O,[A,t.order.delivery.type==="Pickup"?(e.openBlock(),e.createElementBlock("p",q,"Free")):e.createCommentVNode("",!0),t.order.delivery.type==="Post"?(e.openBlock(),e.createElementBlock("p",F,"$ 10")):e.createCommentVNode("",!0),t.order.delivery.type==="Courier"?(e.openBlock(),e.createElementBlock("p",R,"$ 20")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[j,t.order.delivery.type===""?(e.openBlock(),e.createElementBlock("p",z,"$ "+e.toDisplayString(r.cartTotalPrice),1)):e.createCommentVNode("",!0),t.order.delivery.type==="Pickup"?(e.openBlock(),e.createElementBlock("p",H,"$ "+e.toDisplayString(r.cartTotalPrice)+" ₽",1)):e.createCommentVNode("",!0),t.order.delivery.type==="Courier"?(e.openBlock(),e.createElementBlock("p",K,"$ "+e.toDisplayString(r.cartTotalPrice+20),1)):e.createCommentVNode("",!0),t.order.delivery.type==="Post"?(e.openBlock(),e.createElementBlock("p",G,"$ "+e.toDisplayString(r.cartTotalPrice+10),1)):e.createCommentVNode("",!0)]),t.order.status==="Confirmed"?(e.openBlock(),e.createElementBlock("hr",J)):e.createCommentVNode("",!0),r.payment&&r.payment.Status==="CONFIRMED"?(e.openBlock(),e.createElementBlock("span",L,"Paid")):e.createCommentVNode("",!0)])])]))}},U=i.default(Q,[["__scopeId","data-v-43fdd511"]]);exports.default=U;
@@ -1 +1,121 @@
1
-
1
+ import { openBlock as s, createElementBlock as r, createElementVNode as t, toDisplayString as i, createCommentVNode as o, createTextVNode as m, normalizeClass as h, pushScopeId as p, popScopeId as v } from "vue";
2
+ import { useRouter as _ } from "vue-router";
3
+ import "./CardOrder.vue2.js";
4
+ import g from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const d = (e) => (p("data-v-43fdd511"), e = e(), v(), e), k = { class: "pd-big mn-regular order-customer-card col" }, f = { class: "mn-regular flex-center flex-nowrap flex w-100" }, b = { class: "w-100 t-medium p-big" }, w = { class: "flex-nowrap flex" }, P = { class: "mn-r-bold pd-r-big br-right-dark w-66" }, D = /* @__PURE__ */ d(() => /* @__PURE__ */ t("ul", { class: "mn-semi" }, null, -1)), S = /* @__PURE__ */ d(() => /* @__PURE__ */ t("p", { class: "mn-small t-medium p-big" }, " Adress and delivery ", -1)), C = { class: "mn-small" }, T = {
6
+ key: 0,
7
+ class: "w-"
8
+ }, x = {
9
+ key: 1,
10
+ class: "w-"
11
+ }, E = {
12
+ key: 2,
13
+ class: "w-"
14
+ }, I = { class: "w-40" }, $ = { class: "mn-small w-100 t-medium p-big" }, A = /* @__PURE__ */ d(() => /* @__PURE__ */ t("span", { class: "t-transp" }, "Order:", -1)), O = {
15
+ key: 0,
16
+ class: "mn-medium w-100"
17
+ }, F = /* @__PURE__ */ d(() => /* @__PURE__ */ t("span", { class: "t-transp" }, "Estimated shipping date:", -1)), M = /* @__PURE__ */ d(() => /* @__PURE__ */ t("br", null, null, -1)), N = {
18
+ key: 1,
19
+ class: "mn-medium w-100"
20
+ }, V = /* @__PURE__ */ d(() => /* @__PURE__ */ t("span", { class: "t-transp" }, "Shipping date:", -1)), Y = /* @__PURE__ */ d(() => /* @__PURE__ */ t("br", null, null, -1)), B = {
21
+ key: 2,
22
+ class: "mn-medium w-100"
23
+ }, R = /* @__PURE__ */ d(() => /* @__PURE__ */ t("span", { class: "t-transp" }, "Type of delivery:", -1)), j = /* @__PURE__ */ d(() => /* @__PURE__ */ t("br", null, null, -1)), z = /* @__PURE__ */ d(() => /* @__PURE__ */ t("hr", { class: "mn-medium" }, null, -1)), K = /* @__PURE__ */ d(() => /* @__PURE__ */ t("p", { class: "t-transp" }, "In total", -1)), q = {
24
+ key: 3,
25
+ class: "mn-semi flex"
26
+ }, G = /* @__PURE__ */ d(() => /* @__PURE__ */ t("p", { class: "t-transp" }, "Delivery", -1)), H = { key: 0 }, J = { key: 1 }, L = { key: 2 }, Q = { class: "mn-semi intotal flex-bottom flex" }, U = /* @__PURE__ */ d(() => /* @__PURE__ */ t("p", { class: "t-transp" }, "In total to pay", -1)), W = {
27
+ key: 0,
28
+ class: "p-big t-semi"
29
+ }, X = {
30
+ key: 1,
31
+ class: "p-big t-semi"
32
+ }, Z = {
33
+ key: 2,
34
+ class: "p-big t-semi"
35
+ }, ee = {
36
+ key: 3,
37
+ class: "p-big t-semi"
38
+ }, te = {
39
+ key: 4,
40
+ class: "mn-semi"
41
+ }, se = {
42
+ key: 5,
43
+ class: "t-transp"
44
+ }, re = {
45
+ __name: "CardOrder",
46
+ props: {
47
+ order: Object
48
+ },
49
+ setup(e) {
50
+ _();
51
+ function u(a) {
52
+ var l = new Date(a), n = (l.getMonth() + 1).toString(), c = (l.getDate() + 6).toString();
53
+ return (c[1] ? c : "0" + c[0]) + "/" + (n[1] ? n : "0" + n[0]);
54
+ }
55
+ function y(a) {
56
+ var l = new Date(a), n = (l.getMonth() + 1).toString(), c = (l.getDate() + 1).toString();
57
+ return (c[1] ? c : "0" + c[0]) + "/" + (n[1] ? n : "0" + n[0]);
58
+ }
59
+ return (a, l) => (s(), r("div", k, [
60
+ t("p", f, [
61
+ t("span", b, i(e.order.status), 1)
62
+ ]),
63
+ t("div", w, [
64
+ t("div", P, [
65
+ D,
66
+ S,
67
+ t("p", C, i(e.order.delivery.adress), 1),
68
+ e.order.delivery.type === "Post" ? (s(), r("p", T, " You have chosen delivery using the courier service CDEK. Estimated delivery date " + i(u(e.order.createdAt)) + ". ", 1)) : o("", !0),
69
+ e.order.delivery.type === "Courier" ? (s(), r("p", x, " You have chosen delivery by courier. Estimated delivery date " + i(y(e.order.createdAt)) + ". ", 1)) : o("", !0),
70
+ e.order.delivery.type === "Pickup" ? (s(), r("p", E, " You have chosen to receive the order in the Moscow store. ")) : o("", !0)
71
+ ]),
72
+ t("div", I, [
73
+ t("p", $, [
74
+ A,
75
+ m(" №" + i(e.order._id.slice(0, 8)), 1)
76
+ ]),
77
+ e.order.delivery.type === "Post" ? (s(), r("p", O, [
78
+ F,
79
+ M,
80
+ m(i(u(e.order.createdAt)), 1)
81
+ ])) : o("", !0),
82
+ e.order.delivery.type === "Courier" ? (s(), r("p", N, [
83
+ V,
84
+ Y,
85
+ m(i(y(e.order.createdAt)), 1)
86
+ ])) : o("", !0),
87
+ e.order.delivery.type === "Pickup" ? (s(), r("p", B, [
88
+ R,
89
+ j,
90
+ m("Pickup ")
91
+ ])) : o("", !0),
92
+ z,
93
+ t("div", {
94
+ class: h([{ "mn-semi": e.order.delivery.type == "" }, "flex"])
95
+ }, [
96
+ K,
97
+ t("p", null, "$ " + i(a.cartTotalPrice), 1)
98
+ ], 2),
99
+ e.order.delivery.type !== "" ? (s(), r("div", q, [
100
+ G,
101
+ e.order.delivery.type === "Pickup" ? (s(), r("p", H, "Free")) : o("", !0),
102
+ e.order.delivery.type === "Post" ? (s(), r("p", J, "$ 10")) : o("", !0),
103
+ e.order.delivery.type === "Courier" ? (s(), r("p", L, "$ 20")) : o("", !0)
104
+ ])) : o("", !0),
105
+ t("div", Q, [
106
+ U,
107
+ e.order.delivery.type === "" ? (s(), r("p", W, "$ " + i(a.cartTotalPrice), 1)) : o("", !0),
108
+ e.order.delivery.type === "Pickup" ? (s(), r("p", X, "$ " + i(a.cartTotalPrice) + " ₽", 1)) : o("", !0),
109
+ e.order.delivery.type === "Courier" ? (s(), r("p", Z, "$ " + i(a.cartTotalPrice + 20), 1)) : o("", !0),
110
+ e.order.delivery.type === "Post" ? (s(), r("p", ee, "$ " + i(a.cartTotalPrice + 10), 1)) : o("", !0)
111
+ ]),
112
+ e.order.status === "Confirmed" ? (s(), r("hr", te)) : o("", !0),
113
+ a.payment && a.payment.Status === "CONFIRMED" ? (s(), r("span", se, "Paid")) : o("", !0)
114
+ ])
115
+ ])
116
+ ]));
117
+ }
118
+ }, ne = /* @__PURE__ */ g(re, [["__scopeId", "data-v-43fdd511"]]);
119
+ export {
120
+ ne as default
121
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../../../icons/navigation/IconCheckmark.vue.cjs"),v={class:"bg-grey radius-medium w-100"},f=e.createElementVNode("h3",{class:"pd-medium"},"Tracking History",-1),g={class:"flex-center flex i-big radius-extra br-solid br-2px br-black-transp-10 mn-r-small"},y={class:"h4 w-8r"},k=["disabled","onClick"],h={__name:"StatusHistory",props:{statusHistory:{type:Array},statusCurrent:{type:String},edit:{type:Boolean}},setup(i){const a=i,n=e.ref([{value:"created",name:"Received",nextstatus:"Confirming order...",description:"Your order has been successfully created. Our manager will contact you within five minutes to confirm your order."},{value:"confirming",name:"Confirming",nextstatus:"Confirming order...",description:"Your order has been confirmed. We are now processing your items and preparing them for shipment."},{value:"confirmed",name:"Confirmed",nextstatus:"Order is confirmed. Packing order...",description:"Your order has been confirmed. We are now processing your items and preparing them for shipment."},{value:"packing",name:"Packing",nextstatus:"Packing order...",description:"Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information."},{value:"packed",name:"Packed",nextstatus:"Delivering order...",description:"Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information."},{value:"in delivery",name:"Delivering",description:"Your order is currently in transit. Our delivery team is working hard to get your items to you as soon as possible."},{value:"delivered",name:"Delivered",description:"Congratulations! Your order has been successfully delivered. If you have any concerns or feedback, feel free to contact us."}]),s=e.ref(a.statusCurrent),u=e.ref(a.statusHistory),l=r=>u.value.some(o=>o.status===r),d=r=>{const o=n.value.findIndex(c=>c.value===s.value);console.log(status.status===s.value),console.log(s.value),console.log(status);const t=o+1;return n.value[t]&&n.value[t].value===r},m=async r=>{};return e.ref("192.168.1.197"),e.ref(9100),e.ref(`This is some text to print
2
+
3
+ `),(r,o)=>(e.openBlock(),e.createElementBlock("div",v,[f,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,t=>(e.openBlock(),e.createElementBlock("div",{key:t.value,class:"w-100 br-t br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("div",g,[l(t.value)?(e.openBlock(),e.createBlock(p.default,{key:0,class:"i-medium"})):e.createCommentVNode("",!0)]),e.createElementVNode("p",y,e.toDisplayString(t.name),1),i.edit?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!d(t.value),onClick:c=>m(),class:"mn-l-auto bg-main button radius-big"},"Set status",8,k)):e.createCommentVNode("",!0)]))),128))]))}};exports.default=h;
@@ -0,0 +1,92 @@
1
+ import { ref as t, openBlock as n, createElementBlock as o, Fragment as y, renderList as h, createElementVNode as c, createBlock as b, createCommentVNode as m, toDisplayString as k } from "vue";
2
+ import x from "../../../icons/navigation/IconCheckmark.vue.js";
3
+ const w = { class: "bg-grey radius-medium w-100" }, _ = /* @__PURE__ */ c("h3", { class: "pd-medium" }, "Tracking History", -1), C = { class: "flex-center flex i-big radius-extra br-solid br-2px br-black-transp-10 mn-r-small" }, S = { class: "h4 w-8r" }, Y = ["disabled", "onClick"], O = {
4
+ __name: "StatusHistory",
5
+ props: {
6
+ statusHistory: {
7
+ type: Array
8
+ },
9
+ statusCurrent: {
10
+ type: String
11
+ },
12
+ edit: {
13
+ type: Boolean
14
+ }
15
+ },
16
+ setup(u) {
17
+ const l = u, s = t([
18
+ {
19
+ value: "created",
20
+ name: "Received",
21
+ nextstatus: "Confirming order...",
22
+ description: "Your order has been successfully created. Our manager will contact you within five minutes to confirm your order."
23
+ },
24
+ {
25
+ value: "confirming",
26
+ name: "Confirming",
27
+ nextstatus: "Confirming order...",
28
+ description: "Your order has been confirmed. We are now processing your items and preparing them for shipment."
29
+ },
30
+ {
31
+ value: "confirmed",
32
+ name: "Confirmed",
33
+ nextstatus: "Order is confirmed. Packing order...",
34
+ description: "Your order has been confirmed. We are now processing your items and preparing them for shipment."
35
+ },
36
+ {
37
+ value: "packing",
38
+ name: "Packing",
39
+ nextstatus: "Packing order...",
40
+ description: "Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information."
41
+ },
42
+ {
43
+ value: "packed",
44
+ name: "Packed",
45
+ nextstatus: "Delivering order...",
46
+ description: "Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information."
47
+ },
48
+ {
49
+ value: "in delivery",
50
+ name: "Delivering",
51
+ description: "Your order is currently in transit. Our delivery team is working hard to get your items to you as soon as possible."
52
+ },
53
+ {
54
+ value: "delivered",
55
+ name: "Delivered",
56
+ description: "Congratulations! Your order has been successfully delivered. If you have any concerns or feedback, feel free to contact us."
57
+ }
58
+ ]), a = t(l.statusCurrent), p = t(l.statusHistory), v = (r) => p.value.some((i) => i.status === r), f = (r) => {
59
+ const i = s.value.findIndex((d) => d.value === a.value);
60
+ console.log(status.status === a.value), console.log(a.value), console.log(status);
61
+ const e = i + 1;
62
+ return s.value[e] && s.value[e].value === r;
63
+ }, g = async (r) => {
64
+ };
65
+ return t("192.168.1.197"), t(9100), t(`This is some text to print
66
+
67
+ `), (r, i) => (n(), o("div", w, [
68
+ _,
69
+ (n(!0), o(y, null, h(s.value, (e) => (n(), o("div", {
70
+ key: e.value,
71
+ class: "w-100 br-t br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex"
72
+ }, [
73
+ c("div", C, [
74
+ v(e.value) ? (n(), b(x, {
75
+ key: 0,
76
+ class: "i-medium"
77
+ })) : m("", !0)
78
+ ]),
79
+ c("p", S, k(e.name), 1),
80
+ u.edit ? (n(), o("button", {
81
+ key: 0,
82
+ disabled: !f(e.value),
83
+ onClick: (d) => g(),
84
+ class: "mn-l-auto bg-main button radius-big"
85
+ }, "Set status", 8, Y)) : m("", !0)
86
+ ]))), 128))
87
+ ]));
88
+ }
89
+ };
90
+ export {
91
+ O as default
92
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),D=require("vue-router"),C=require("../blocks/CardOrderItem.vue.cjs"),B=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),q=require("../../../chats/components/pages/ChatPage.vue.cjs"),z=require("../blocks/StatusHistory.vue.cjs"),I=require("../../../globals/store/globals.cjs"),m=require("../../store/orders.cjs"),M=require("../../../products/store/products.cjs"),T=require("../../../organizations/store/organizations.cjs");require("./Order.vue2.cjs");const P=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),n=c=>(e.pushScopeId("data-v-622bfaf9"),c=c(),e.popScopeId(),c),R={key:0,class:"pd-thin"},F={key:0,class:"mn-b-thin pos-relative w-100 bg-main radius-big pd-big"},H={class:"mn-b-small"},A=n(()=>e.createElementVNode("p",{class:"mn-b-medium w-m-40r p-medium"},"Your order has been successfully created. Our manager will contact you within five minutes to confirm your order.",-1)),U={class:"radius-extra mn-b-medium flex-nowrap flex h-1r pos-relativew-40r"},W={class:"pos-absolute pos-t-medium pos-r-medium t-medium p-medium"},Y={class:"p-small t-transp"},j={key:1,class:"gap-thin cols-2"},L={class:"w-100"},G={class:"mn-b-thin bg-grey w-100 o-hidden radius-medium"},J={class:"pd-small flex-nowrap flex"},K={class:"mn-r-auto"},Q=n(()=>e.createElementVNode("span",{class:"d-block t-medium p-medium"},"Your order is",-1)),X={class:"t-lh-075 h2 d-block mn-b-small"},Z=n(()=>e.createElementVNode("p",{class:"pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max"},"as on 29 aug 2021, Friday",-1)),$={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},ee=n(()=>e.createElementVNode("p",{class:"w-100 t-medium p-medium"}," Phone ",-1)),te={class:"w-100 t-right"},ae={key:0,class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},re={class:"w-100 t-medium p-medium"},se={class:"w-100 t-right"},le={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},ne=n(()=>e.createElementVNode("p",{class:"t-medium p-medium"}," Address ",-1)),oe={class:"w-100 t-right"},ie={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},de=n(()=>e.createElementVNode("p",{class:"mn-b-small t-medium p-medium"}," Delivery ",-1)),ce={class:"w-100 t-right mn-b-small"},ue={key:2,class:"t-transp"},me={class:"bg-grey radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100"},pe=n(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Order Summary",-1)),ve={class:"flex gap-thin flex-column mn-b-semi"},be={class:"mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100"},_e={class:"pd-small br-solid br-b br-black-transp-10 flex"},ge=n(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total",-1)),he={class:"pd-small br-solid br-b br-black-transp-10 flex"},ye=n(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"Delivery",-1)),Ne={class:"pd-small flex-bottom flex"},fe=n(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total to pay",-1)),Ve={class:"p-big t-semi"},Ee=n(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Chat With Us",-1)),we={__name:"Order",setup(c){D.useRouter();const u=D.useRoute(),t=e.ref(null),p=e.ref(null),s=e.ref(null);e.onMounted(async()=>{var a,l,r;t.value=await m.actions.read({_id:u.params.order}),t.value=t.value[0],p.value=await M.actions.read({organization:(a=t.value)==null?void 0:a.owner.target._id}),s.value=await T.actions.read({_id:(l=t.value)==null?void 0:l.owner.target._id,location:(r=I.state.position)==null?void 0:r.location})});let v=e.computed(()=>{var a;return Number((a=t.value)==null?void 0:a.positions.reduce((l,r)=>l+r.price*r.quantity,0))});e.computed(()=>{var a;return Number((a=t.value)==null?void 0:a.positions.reduce((l,r)=>l+r.quantity,0))});let S=e.computed(()=>{var a;return(a=t.value)==null?void 0:a.positions.map(({_id:l,quantity:r})=>{const o=p.value.find(i=>i._id===l);return console.log(o),console.log(p),{name:o.name,images:o.images,price:o.price,_id:o._id,quantity:r}})});function O(a,l){if(!a)return null;const r=10*60*1e3,o=Math.ceil((20+3*a)/5)*5*60*1e3,i=new Date(l).getTime(),d=new Date(i+r+o);return console.log(l),console.log(d),d}return(a,l)=>{var r,o,i,d,b,_,g,h,y,N,f,V,E,w,k;return t.value&&s.value?(e.openBlock(),e.createElementBlock("div",R,[t.value?(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("h2",H,"Order is "+e.toDisplayString(t.value.status),1),A,e.createElementVNode("div",U,[e.createElementVNode("div",{class:e.normalizeClass(["bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",{"br-anim br-glow br-glow-anim":["created","confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===0}])},null,2),e.createElementVNode("div",{class:e.normalizeClass(["bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",{"br-anim br-glow br-glow-anim":["created","confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===0},{"t-transp":["created","confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===-1},{blink:t.value.status==="created"}])},null,2),e.createElementVNode("div",{class:e.normalizeClass([{"br-anim br-glow br-glow-anim":["confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===0},{"t-transp":["confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===-1},{blink:t.value.status==="confirmed"},"bg-grey radius-extra mn-r-thin h-100 w-40"])},null,2),e.createElementVNode("div",{class:e.normalizeClass(["bg-grey radius-extra mn-r-thin h-100 w-40",{"br-anim br-glow br-glow-anim":["packing","in delivery","delivered"].indexOf(t.value.status)===0},{"t-transp":["packing","in delivery","delivered"].indexOf(t.value.status)===-1},{blink:t.value.status==="packing"}])},null,2),e.createElementVNode("div",{class:e.normalizeClass(["bg-grey radius-extra h-100 w-20",{"br-anim br-glow br-glow-anim":["in delivery","delivered"].indexOf(t.value.status)===0},{"t-transp":["in delivery","delivered"].indexOf(t.value.status)===-1},{blink:t.value.status==="in delivery"}])},null,2)]),e.createElementVNode("p",null,"Estimated Arrival "+e.toDisplayString(a.formatDate(O((r=s.value[0])==null?void 0:r.distance,t.value.createdAt))),1),e.createElementVNode("h3",null,e.toDisplayString((o=s.value[0])!=null&&o.distance?Math.ceil((10+3*((i=s.value[0])==null?void 0:i.distance))/5)*5+"-"+Math.ceil((20+3*((d=s.value[0])==null?void 0:d.distance))/5)*5+" MIN":"Unavailable"),1),e.createElementVNode("p",W,[e.createTextVNode(" Order No: "),e.createElementVNode("span",Y,"#"+e.toDisplayString(t.value._id),1)])])):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",L,[s.value[0]?(e.openBlock(),e.createBlock(B.default,{key:0,organization:s.value[0],showRating:!0,showFollowers:!1,showProducts:!1,class:"bg-grey mn-b-thin w-100 o-hidden radius-big pd-small"},null,8,["organization"])):e.createCommentVNode("",!0),e.createElementVNode("div",G,[e.createElementVNode("div",J,[e.createElementVNode("div",K,[Q,e.createElementVNode("span",X,e.toDisplayString(t.value.status),1),Z])]),e.createElementVNode("div",$,[ee,e.createElementVNode("p",te,e.toDisplayString((b=t.value.user)==null?void 0:b.number),1)]),(_=t.value.user)!=null&&_.messenger.type?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("p",re,e.toDisplayString((g=t.value.user)==null?void 0:g.messenger.type),1),e.createElementVNode("p",se,e.toDisplayString((h=t.value.user)==null?void 0:h.messenger.value),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",le,[ne,e.createElementVNode("p",oe,e.toDisplayString((y=t.value.delivery)==null?void 0:y.address.slice(0,64)),1)]),e.createElementVNode("div",ie,[de,e.createElementVNode("p",ce,e.toDisplayString((N=t.value.delivery)==null?void 0:N.type),1)])]),m.state.current.status_history?(e.openBlock(),e.createBlock(z.default,{key:1,statusHistory:m.state.current.status_history,statusCurrent:m.state.current.status,edit:e.unref(u).name==="Order Edit"},null,8,["statusHistory","statusCurrent","edit"])):e.createCommentVNode("",!0),a.payment&&a.payment.Status==="CONFIRMED"?(e.openBlock(),e.createElementBlock("span",ue,"Paid")):e.createCommentVNode("",!0)]),e.createElementVNode("div",me,[pe,e.createElementVNode("ul",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(S),(x,xe)=>(e.openBlock(),e.createBlock(C.default,{key:x._id,editable:!1,product:x},null,8,["product"]))),128))]),e.createElementVNode("div",be,[e.createElementVNode("div",_e,[ge,e.createElementVNode("p",null,e.toDisplayString(e.unref(v))+" "+e.toDisplayString(a.returnCurrency()),1)]),e.createElementVNode("div",he,[ye,e.createElementVNode("p",null,e.toDisplayString(a.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((f=s.value[0])==null?void 0:f.distance)-7,5*(((V=s.value[0])==null?void 0:V.distance)/10))),1)]),e.createElementVNode("div",Ne,[fe,e.createElementVNode("p",Ve,e.toDisplayString(a.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((E=s.value[0])==null?void 0:E.distance)-7,5*(((w=s.value[0])==null?void 0:w.distance)/10))+e.unref(v)),1)])]),Ee,e.createVNode(q.default,{username:e.unref(u).name==="Order Status"?((k=t.value.user)==null?void 0:k.name)||"User":"Weeder Support",chatID:e.unref(u).params.order,class:"radius-semi bg-white o-hidden"},null,8,["username","chatID"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},ke=P.default(we,[["__scopeId","data-v-622bfaf9"]]);exports.default=ke;
@@ -0,0 +1,202 @@
1
+ import { ref as f, onMounted as V, computed as y, openBlock as d, createElementBlock as m, createElementVNode as e, toDisplayString as a, normalizeClass as v, createTextVNode as A, createCommentVNode as u, createBlock as w, unref as p, Fragment as B, renderList as U, createVNode as q, pushScopeId as H, popScopeId as W } from "vue";
2
+ import { useRouter as Y, useRoute as L } from "vue-router";
3
+ import j from "../blocks/CardOrderItem.vue.js";
4
+ import G from "../../../organizations/components/blocks/CardOrganization.vue.js";
5
+ import J from "../../../chats/components/pages/ChatPage.vue.js";
6
+ import K from "../blocks/StatusHistory.vue.js";
7
+ import { state as Q } from "../../../globals/store/globals.js";
8
+ import { actions as X, state as k } from "../../store/orders.js";
9
+ import { actions as Z } from "../../../products/store/products.js";
10
+ import { actions as ee } from "../../../organizations/store/organizations.js";
11
+ import "./Order.vue2.js";
12
+ import se from "../../../../../../_virtual/_plugin-vue_export-helper.js";
13
+ const n = (b) => (H("data-v-622bfaf9"), b = b(), W(), b), te = {
14
+ key: 0,
15
+ class: "pd-thin"
16
+ }, ae = {
17
+ key: 0,
18
+ class: "mn-b-thin pos-relative w-100 bg-main radius-big pd-big"
19
+ }, re = { class: "mn-b-small" }, ie = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-b-medium w-m-40r p-medium" }, "Your order has been successfully created. Our manager will contact you within five minutes to confirm your order.", -1)), le = { class: "radius-extra mn-b-medium flex-nowrap flex h-1r pos-relativew-40r" }, ne = { class: "pos-absolute pos-t-medium pos-r-medium t-medium p-medium" }, oe = { class: "p-small t-transp" }, de = {
20
+ key: 1,
21
+ class: "gap-thin cols-2"
22
+ }, ue = { class: "w-100" }, ce = { class: "mn-b-thin bg-grey w-100 o-hidden radius-medium" }, me = { class: "pd-small flex-nowrap flex" }, pe = { class: "mn-r-auto" }, _e = /* @__PURE__ */ n(() => /* @__PURE__ */ e("span", { class: "d-block t-medium p-medium" }, "Your order is", -1)), ve = { class: "t-lh-075 h2 d-block mn-b-small" }, be = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max" }, "as on 29 aug 2021, Friday", -1)), he = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, ge = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "w-100 t-medium p-medium" }, " Phone ", -1)), fe = { class: "w-100 t-right" }, ye = {
23
+ key: 0,
24
+ class: "pd-small cols-2 br-t br-black-transp-10 br-solid"
25
+ }, we = { class: "w-100 t-medium p-medium" }, ke = { class: "w-100 t-right" }, xe = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Oe = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "t-medium p-medium" }, " Address ", -1)), De = { class: "w-100 t-right" }, Ie = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Ce = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-b-small t-medium p-medium" }, " Delivery ", -1)), Ne = { class: "w-100 t-right mn-b-small" }, Me = {
26
+ key: 2,
27
+ class: "t-transp"
28
+ }, Se = { class: "bg-grey radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100" }, Te = /* @__PURE__ */ n(() => /* @__PURE__ */ e("h3", { class: "mn-b-small" }, "Order Summary", -1)), $e = { class: "flex gap-thin flex-column mn-b-semi" }, ze = { class: "mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100" }, Pe = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Ee = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-r-auto t-transp" }, "In total", -1)), Fe = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Re = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-r-auto t-transp" }, "Delivery", -1)), Ve = { class: "pd-small flex-bottom flex" }, Ae = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-r-auto t-transp" }, "In total to pay", -1)), Be = { class: "p-big t-semi" }, Ue = /* @__PURE__ */ n(() => /* @__PURE__ */ e("h3", { class: "mn-b-small" }, "Chat With Us", -1)), qe = {
29
+ __name: "Order",
30
+ setup(b) {
31
+ Y();
32
+ const h = L(), s = f(null), g = f(null), i = f(null);
33
+ V(async () => {
34
+ var t, l, r;
35
+ s.value = await X.read({ _id: h.params.order }), s.value = s.value[0], g.value = await Z.read({
36
+ organization: (t = s.value) == null ? void 0 : t.owner.target._id
37
+ }), i.value = await ee.read({
38
+ _id: (l = s.value) == null ? void 0 : l.owner.target._id,
39
+ location: (r = Q.position) == null ? void 0 : r.location
40
+ });
41
+ });
42
+ let x = y(() => {
43
+ var t;
44
+ return Number((t = s.value) == null ? void 0 : t.positions.reduce((l, r) => l + r.price * r.quantity, 0));
45
+ });
46
+ y(() => {
47
+ var t;
48
+ return Number((t = s.value) == null ? void 0 : t.positions.reduce((l, r) => l + r.quantity, 0));
49
+ });
50
+ let F = y(() => {
51
+ var t;
52
+ return (t = s.value) == null ? void 0 : t.positions.map(({ _id: l, quantity: r }) => {
53
+ const o = g.value.find((c) => c._id === l);
54
+ return console.log(o), console.log(g), {
55
+ name: o.name,
56
+ images: o.images,
57
+ price: o.price,
58
+ _id: o._id,
59
+ quantity: r
60
+ };
61
+ });
62
+ });
63
+ function R(t, l) {
64
+ if (!t)
65
+ return null;
66
+ const r = 10 * 60 * 1e3, o = Math.ceil((20 + 3 * t) / 5) * 5 * 60 * 1e3, c = new Date(l).getTime(), _ = new Date(c + r + o);
67
+ return console.log(l), console.log(_), _;
68
+ }
69
+ return (t, l) => {
70
+ var r, o, c, _, O, D, I, C, N, M, S, T, $, z, P;
71
+ return s.value && i.value ? (d(), m("div", te, [
72
+ s.value ? (d(), m("div", ae, [
73
+ e("h2", re, "Order is " + a(s.value.status), 1),
74
+ ie,
75
+ e("div", le, [
76
+ e("div", {
77
+ class: v([
78
+ "bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",
79
+ { "br-anim br-glow br-glow-anim": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 }
80
+ ])
81
+ }, null, 2),
82
+ e("div", {
83
+ class: v([
84
+ "bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",
85
+ { "br-anim br-glow br-glow-anim": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
86
+ { "t-transp": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
87
+ { blink: s.value.status === "created" }
88
+ ])
89
+ }, null, 2),
90
+ e("div", {
91
+ class: v([
92
+ { "br-anim br-glow br-glow-anim": ["confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
93
+ { "t-transp": ["confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
94
+ { blink: s.value.status === "confirmed" },
95
+ "bg-grey radius-extra mn-r-thin h-100 w-40"
96
+ ])
97
+ }, null, 2),
98
+ e("div", {
99
+ class: v([
100
+ "bg-grey radius-extra mn-r-thin h-100 w-40",
101
+ { "br-anim br-glow br-glow-anim": ["packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
102
+ { "t-transp": ["packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
103
+ { blink: s.value.status === "packing" }
104
+ ])
105
+ }, null, 2),
106
+ e("div", {
107
+ class: v([
108
+ "bg-grey radius-extra h-100 w-20",
109
+ { "br-anim br-glow br-glow-anim": ["in delivery", "delivered"].indexOf(s.value.status) === 0 },
110
+ { "t-transp": ["in delivery", "delivered"].indexOf(s.value.status) === -1 },
111
+ { blink: s.value.status === "in delivery" }
112
+ ])
113
+ }, null, 2)
114
+ ]),
115
+ e("p", null, "Estimated Arrival " + a(t.formatDate(R((r = i.value[0]) == null ? void 0 : r.distance, s.value.createdAt))), 1),
116
+ e("h3", null, a((o = i.value[0]) != null && o.distance ? Math.ceil((10 + 3 * ((c = i.value[0]) == null ? void 0 : c.distance)) / 5) * 5 + "-" + Math.ceil((20 + 3 * ((_ = i.value[0]) == null ? void 0 : _.distance)) / 5) * 5 + " MIN" : "Unavailable"), 1),
117
+ e("p", ne, [
118
+ A(" Order No: "),
119
+ e("span", oe, "#" + a(s.value._id), 1)
120
+ ])
121
+ ])) : u("", !0),
122
+ s.value ? (d(), m("div", de, [
123
+ e("div", ue, [
124
+ i.value[0] ? (d(), w(G, {
125
+ key: 0,
126
+ organization: i.value[0],
127
+ showRating: !0,
128
+ showFollowers: !1,
129
+ showProducts: !1,
130
+ class: "bg-grey mn-b-thin w-100 o-hidden radius-big pd-small"
131
+ }, null, 8, ["organization"])) : u("", !0),
132
+ e("div", ce, [
133
+ e("div", me, [
134
+ e("div", pe, [
135
+ _e,
136
+ e("span", ve, a(s.value.status), 1),
137
+ be
138
+ ])
139
+ ]),
140
+ e("div", he, [
141
+ ge,
142
+ e("p", fe, a((O = s.value.user) == null ? void 0 : O.number), 1)
143
+ ]),
144
+ (D = s.value.user) != null && D.messenger.type ? (d(), m("div", ye, [
145
+ e("p", we, a((I = s.value.user) == null ? void 0 : I.messenger.type), 1),
146
+ e("p", ke, a((C = s.value.user) == null ? void 0 : C.messenger.value), 1)
147
+ ])) : u("", !0),
148
+ e("div", xe, [
149
+ Oe,
150
+ e("p", De, a((N = s.value.delivery) == null ? void 0 : N.address.slice(0, 64)), 1)
151
+ ]),
152
+ e("div", Ie, [
153
+ Ce,
154
+ e("p", Ne, a((M = s.value.delivery) == null ? void 0 : M.type), 1)
155
+ ])
156
+ ]),
157
+ k.current.status_history ? (d(), w(K, {
158
+ key: 1,
159
+ statusHistory: k.current.status_history,
160
+ statusCurrent: k.current.status,
161
+ edit: p(h).name === "Order Edit"
162
+ }, null, 8, ["statusHistory", "statusCurrent", "edit"])) : u("", !0),
163
+ t.payment && t.payment.Status === "CONFIRMED" ? (d(), m("span", Me, "Paid")) : u("", !0)
164
+ ]),
165
+ e("div", Se, [
166
+ Te,
167
+ e("ul", $e, [
168
+ (d(!0), m(B, null, U(p(F), (E, He) => (d(), w(j, {
169
+ key: E._id,
170
+ editable: !1,
171
+ product: E
172
+ }, null, 8, ["product"]))), 128))
173
+ ]),
174
+ e("div", ze, [
175
+ e("div", Pe, [
176
+ Ee,
177
+ e("p", null, a(p(x)) + " " + a(t.returnCurrency()), 1)
178
+ ]),
179
+ e("div", Fe, [
180
+ Re,
181
+ e("p", null, a(t.returnCurrency()) + " " + a(Math.trunc(100 + 20 * ((S = i.value[0]) == null ? void 0 : S.distance) - 7, 5 * (((T = i.value[0]) == null ? void 0 : T.distance) / 10))), 1)
182
+ ]),
183
+ e("div", Ve, [
184
+ Ae,
185
+ e("p", Be, a(t.returnCurrency()) + " " + a(Math.trunc(100 + 20 * (($ = i.value[0]) == null ? void 0 : $.distance) - 7, 5 * (((z = i.value[0]) == null ? void 0 : z.distance) / 10)) + p(x)), 1)
186
+ ])
187
+ ]),
188
+ Ue,
189
+ q(J, {
190
+ username: p(h).name === "Order Status" ? ((P = s.value.user) == null ? void 0 : P.name) || "User" : "Weeder Support",
191
+ chatID: p(h).params.order,
192
+ class: "radius-semi bg-white o-hidden"
193
+ }, null, 8, ["username", "chatID"])
194
+ ])
195
+ ])) : u("", !0)
196
+ ])) : u("", !0);
197
+ };
198
+ }
199
+ }, ts = /* @__PURE__ */ se(qe, [["__scopeId", "data-v-622bfaf9"]]);
200
+ export {
201
+ ts as default
202
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),V=require("../blocks/CardOrderItem.vue.cjs"),N=require("../sections/AskToLogin.vue.cjs"),q=require("../sections/Succes.vue.cjs"),E=require("../sections/EmptyState.vue.cjs"),S=require("../sections/FormCustomerDetails.vue.cjs"),P=require("../sections/FormDelivery.vue.cjs"),D=require("../sections/FormPayment.vue.cjs"),y=require("vue-router"),w=require("../../../globals/store/globals.cjs"),m=require("../../../auth/store/auth.cjs"),o=require("../../store/shopcart.cjs"),g=require("../../../organizations/store/organizations.cjs"),t=require("../../store/orders.cjs"),M=require("../../../users/store/users.cjs");require("./OrderCreate.vue2.cjs");const O={class:"pd-thin"},T={class:"gap-small mn-b-thin cols-2"},F={key:2,class:"order-form col"},z={key:3},I=e.createElementVNode("p",{class:"p-big mn-b-small"},"Your Order",-1),R={class:"mn-b-semi"},A={style:{"border-bottom":"1px solid #f7f7f7","border-top":"1px solid #f7f7f7"},class:"pd-b-medium pd-t-medium mn-b-medium"},G={class:"mn-b-thin"},L={class:"mn-b-thin"},Q={class:"h3"},j=e.createElementVNode("p",{class:"mn-b-thin"}," By making this purchase you agree to the General Terms and Conditions. ",-1),Y=e.createElementVNode("p",{class:"mn-b-small"}," I agree that placing the order places me under an obligation to make a payment in accordance with the General Terms and Conditions. ",-1),$=["disabled"],H={__name:"OrderCreate",setup(J){y.useRoute();const _=y.useRouter(),p=e.computed(()=>t.state.current);e.computed(()=>M.state.current);const h=e.computed(()=>o.getters.cartTotalPrice),n=e.ref({});e.onMounted(async()=>{var r;n.value=await g.actions.read({_id:o.state.organization,location:(r=w.state.position)==null?void 0:r.location})}),e.watch(()=>t.state.current.delivery.address,async(r,s)=>{n.value=await g.actions.read({_id:o.state.organization,location:t.state.current.delivery.location})},{deep:!0});const v=e.computed(()=>{var r;return((r=t.state.current.customer.name)==null?void 0:r.length)<2}),k=e.computed(()=>{var c,u,l,a;const r=(c=t.state.current.customer.messenger)==null?void 0:c.type,s=((l=(u=t.state.current.customer.messenger)==null?void 0:u.value)==null?void 0:l.length)>2;return!(((a=t.state.current.customer.number)==null?void 0:a.length)>0)&&!(r&&s)}),f=e.computed(()=>t.state.current.delivery.type!=="Pickup"&&t.state.current.delivery.address<2),b=e.computed(()=>!t.state.current.delivery.type),B=e.computed(()=>!t.state.current.payment.type);async function C(){t.state.current.status="created",t.state.current.owner={target:n.value[0]._id,type:"organization"},m.state.user._id&&(t.state.current.creator={target:m.state.user._id,type:"user"}),t.state.current.positions=o.state.positions;const r=localStorage.getItem("referalCode");r&&(t.state.current.referralCode=r);let s=await t.actions.create(t.state.current);s?_.push({name:"Order Status",params:{order:s._id}}):alert("something wrong")}return(r,s)=>{var d,c,u,l;return e.openBlock(),e.createElementBlock("section",O,[m.state.access.status===!1?(e.openBlock(),e.createBlock(N.default,{key:0,class:"mn-b-big"})):e.createCommentVNode("",!0),e.createElementVNode("div",T,[o.state.positions<1?(e.openBlock(),e.createBlock(E.default,{key:0})):e.createCommentVNode("",!0),p.value.status===!0&&o.state.positions.length>0?(e.openBlock(),e.createBlock(q.default,{key:1,order:p.value},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0&&o.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(S.default,{order:t.state.current},null,8,["order"]),t.state.current.status!==!0&&o.state.positions.length>0?(e.openBlock(),e.createBlock(P.default,{key:0,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0&&o.state.positions.length>0?(e.openBlock(),e.createBlock(D.default,{key:1,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),o.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",z,[I,e.createElementVNode("ul",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.state.positions,a=>(e.openBlock(),e.createBlock(V.default,{key:a._id,editable:"true",product:a,increase:i=>o.actions.incrementItemQuantity(i._id),decrease:i=>o.actions.decrementItemQuantity(i._id),remove:i=>o.actions.removeProduct(i._id)},null,8,["product","increase","decrease","remove"]))),128))]),e.createElementVNode("div",A,[e.createElementVNode("p",G," Subtotal: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(h.value),1),e.createElementVNode("p",L," Delivery: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((d=n.value[0])==null?void 0:d.distance)-7,5*(((c=n.value[0])==null?void 0:c.distance)/10))),1),e.createElementVNode("p",Q," Total: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((u=n.value[0])==null?void 0:u.distance)-7,5*(((l=n.value[0])==null?void 0:l.distance)/10))+h.value.value),1)]),j,Y,t.state.current.status!==!0&&o.state.positions.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:v.value||k.value||r.errorCity||f.value||b.value||B.value,onClick:s[0]||(s[0]=a=>C()),class:"bg-main pd-small radius-big w-100 button"}," Place an Order ",8,$)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])}}};exports.default=H;