@ozdao/prometheus-framework 0.2.82 → 0.2.84

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,127 @@
1
+ import { computed as a, ref as z, onMounted as B, watch as I, openBlock as t, createElementBlock as h, createBlock as l, createCommentVNode as i, createElementVNode as n, createVNode as N, Fragment as S, renderList as D, toDisplayString as d } from "vue";
2
+ import F from "../blocks/CardOrderItem.vue.js";
3
+ import E from "../sections/AskToLogin.vue.js";
4
+ import G from "../sections/Succes.vue.js";
5
+ import Q from "../sections/EmptyState.vue.js";
6
+ import R from "../sections/FormCustomerDetails.vue.js";
7
+ import A from "../sections/FormDelivery.vue.js";
8
+ import L from "../sections/FormPayment.vue.js";
9
+ import { useRoute as Y, useRouter as j } from "vue-router";
10
+ import { state as q } from "../../../globals/store/globals.js";
11
+ import { state as g } from "../../../auth/store/auth.js";
12
+ import { getters as x, state as s, actions as v } from "../../store/shopcart.js";
13
+ import { actions as $ } from "../../../organizations/store/organizations.js";
14
+ import { state as e, actions as H } from "../../store/orders.js";
15
+ import { state as J } from "../../../users/store/users.js";
16
+ import "./OrderCreate.vue2.js";
17
+ const K = { class: "pd-thin" }, U = { class: "gap-small mn-b-thin cols-2" }, W = {
18
+ key: 2,
19
+ class: "order-form col"
20
+ }, X = { key: 3 }, Z = /* @__PURE__ */ n("p", { class: "p-big mn-b-small" }, "Your Order", -1), ee = { class: "mn-b-semi" }, re = {
21
+ style: { "border-bottom": "1px solid #f7f7f7", "border-top": "1px solid #f7f7f7" },
22
+ class: "pd-b-medium pd-t-medium mn-b-medium"
23
+ }, te = { class: "mn-b-thin" }, se = { class: "mn-b-thin" }, ne = { class: "h3" }, oe = /* @__PURE__ */ n("p", { class: "mn-b-thin" }, " By making this purchase you agree to the General Terms and Conditions. ", -1), ae = /* @__PURE__ */ n("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), ie = ["disabled"], Pe = {
24
+ __name: "OrderCreate",
25
+ setup(ue) {
26
+ Y();
27
+ const C = j(), b = a(() => e.current);
28
+ a(() => J.current);
29
+ const k = a(() => x.cartTotalPrice), u = z({});
30
+ B(async () => {
31
+ var r;
32
+ u.value = await $.read({
33
+ _id: s.organization,
34
+ location: (r = q.position) == null ? void 0 : r.location
35
+ });
36
+ }), I(() => e.current.delivery.address, async (r, o) => {
37
+ u.value = await $.read({
38
+ _id: s.organization,
39
+ location: e.current.delivery.location
40
+ });
41
+ }, { deep: !0 });
42
+ const w = a(() => {
43
+ var r;
44
+ return ((r = e.current.customer.name) == null ? void 0 : r.length) < 2;
45
+ }), P = a(() => {
46
+ var m, p, _, c;
47
+ const r = (m = e.current.customer.messenger) == null ? void 0 : m.type, o = ((_ = (p = e.current.customer.messenger) == null ? void 0 : p.value) == null ? void 0 : _.length) > 2;
48
+ return !(((c = e.current.customer.number) == null ? void 0 : c.length) > 0) && !(r && o);
49
+ }), M = a(() => e.current.delivery.type !== "Pickup" && e.current.delivery.address < 2), O = a(() => !e.current.delivery.type), T = a(() => !e.current.payment.type);
50
+ async function V() {
51
+ e.current.status = "created", e.current.owner = {
52
+ target: u.value[0]._id,
53
+ type: "organization"
54
+ }, g.user._id && (e.current.creator = {
55
+ target: g.user._id,
56
+ type: "user"
57
+ }), e.current.positions = s.positions;
58
+ const r = localStorage.getItem("referalCode");
59
+ r && (e.current.referralCode = r);
60
+ let o = await H.create(e.current);
61
+ o ? C.push({
62
+ name: "Order Status",
63
+ params: {
64
+ order: o._id
65
+ }
66
+ }) : alert("something wrong");
67
+ }
68
+ return (r, o) => {
69
+ var y, m, p, _;
70
+ return t(), h("section", K, [
71
+ g.access.status === !1 ? (t(), l(E, {
72
+ key: 0,
73
+ class: "mn-b-big"
74
+ })) : i("", !0),
75
+ n("div", U, [
76
+ s.positions < 1 ? (t(), l(Q, { key: 0 })) : i("", !0),
77
+ b.value.status === !0 && s.positions.length > 0 ? (t(), l(G, {
78
+ key: 1,
79
+ order: b.value
80
+ }, null, 8, ["order"])) : i("", !0),
81
+ e.current.status !== !0 && s.positions.length > 0 ? (t(), h("div", W, [
82
+ N(R, {
83
+ order: e.current
84
+ }, null, 8, ["order"]),
85
+ e.current.status !== !0 && s.positions.length > 0 ? (t(), l(A, {
86
+ key: 0,
87
+ order: e.current
88
+ }, null, 8, ["order"])) : i("", !0),
89
+ e.current.status !== !0 && s.positions.length > 0 ? (t(), l(L, {
90
+ key: 1,
91
+ order: e.current
92
+ }, null, 8, ["order"])) : i("", !0)
93
+ ])) : i("", !0),
94
+ s.positions.length > 0 ? (t(), h("div", X, [
95
+ Z,
96
+ n("ul", ee, [
97
+ (t(!0), h(S, null, D(s.positions, (c) => (t(), l(F, {
98
+ key: c._id,
99
+ editable: "true",
100
+ product: c,
101
+ increase: (f) => v.incrementItemQuantity(f._id),
102
+ decrease: (f) => v.decrementItemQuantity(f._id),
103
+ remove: (f) => v.removeProduct(f._id)
104
+ }, null, 8, ["product", "increase", "decrease", "remove"]))), 128))
105
+ ]),
106
+ n("div", re, [
107
+ n("p", te, " Subtotal: " + d(r.returnCurrency()) + " " + d(k.value), 1),
108
+ n("p", se, " Delivery: " + d(r.returnCurrency()) + " " + d(Math.trunc(100 + 20 * ((y = u.value[0]) == null ? void 0 : y.distance) - 7, 5 * (((m = u.value[0]) == null ? void 0 : m.distance) / 10))), 1),
109
+ n("p", ne, " Total: " + d(r.returnCurrency()) + " " + d(Math.trunc(100 + 20 * ((p = u.value[0]) == null ? void 0 : p.distance) - 7, 5 * (((_ = u.value[0]) == null ? void 0 : _.distance) / 10)) + k.value.value), 1)
110
+ ]),
111
+ oe,
112
+ ae,
113
+ e.current.status !== !0 && s.positions.length > 0 ? (t(), h("button", {
114
+ key: 0,
115
+ disabled: w.value || P.value || r.errorCity || M.value || O.value || T.value,
116
+ onClick: o[0] || (o[0] = (c) => V()),
117
+ class: "bg-main pd-small radius-big w-100 button"
118
+ }, " Place an Order ", 8, ie)) : i("", !0)
119
+ ])) : i("", !0)
120
+ ])
121
+ ]);
122
+ };
123
+ }
124
+ };
125
+ export {
126
+ Pe as default
127
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../store/orders.cjs"),p=require("../../../auth/store/auth.cjs");require("../blocks/CardOrder.vue.cjs");const g=require("../../../globals/components/blocks/CardHeader.vue.cjs"),_=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),h=require("../../../../components/Feed/Feed.vue.cjs"),y=require("../../../icons/entities/IconEvents.vue.cjs"),v={class:"pd-thin"},k={class:"mn-b-small pd-small bg-white radius-small flex-nowrap flex"},b={class:"w-100"},f={class:"mn-b-thin"},N={class:"t-truncate"},E={class:"w-100 t-right"},V={class:"mn-b-thin"},S={class:"cols-1 mn-b-small gap-thin pd-small bg-white radius-small"},w={class:"mn-r-auto"},x={class:"t-right"},B={class:"t-transp"},D={key:0},C={class:"mn-r-auto"},q={class:"t-right"},O={class:"t-transp"},T={class:"pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex"},F=e.createElementVNode("p",{class:"t-medium mn-r-auto"},"16:40, 21.04",-1),A={class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"},M=e.createElementVNode("span",{class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin t-white bg-red"}," Unpaid ",-1),P={key:0,class:"pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small"},L=e.createElementVNode("p",{class:"mn-b-thin t-transp uppercase p-small t-medium"},"Comment",-1),R={__name:"Orders",setup(z){const u=c.useRoute();c.useRouter();const n=e.ref(!1),l=e.ref("all");return e.onMounted(async()=>{}),(o,r)=>{const m=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",v,[e.createVNode(_.default,{title:"Orders","onUpdate:tabs_current":r[0]||(r[0]=a=>l.value=a),tabs_current:l.value,tabs:[{name:"All",value:"all"},{name:"Created",value:"stock-in"},{name:"Confirmed",value:"stock-out"},{name:"Preparing",value:"stock-out"},{name:"Prepared",value:"stock-out"},{name:"In delivery",value:"stock-out"},{name:"Delivered",value:"stock-out"},{name:"Closed",value:"stock-out"}],actions:[{to:{name:"AdminOrderAdd"},label:"Create Order"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current"]),e.createVNode(h.default,{search:!0,states:{empty:{title:"No Orders Found",description:"Currently, there are no orders."}},store:{read:a=>d.actions.read(a)},options:{limit:15,owner:e.unref(u).params._id,...l.value!=="all"&&{type:l.value}},class:"gap-thin cols-3"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,t=>(e.openBlock(),e.createBlock(m,{to:{name:"Order Edit",params:{order:t._id}},class:"bg-grey pos-relative pd-medium radius-big"},{default:e.withCtx(()=>[e.createVNode(g.default,{entity:t,entityType:"order",user:p.state.user,owner:t.creator,creator:t.creator,date:t.createdAt,class:"mn-b-small"},null,8,["entity","user","owner","creator","date"]),e.createElementVNode("div",k,[e.createElementVNode("div",b,[e.createElementVNode("h3",f,e.toDisplayString(t.customer.target.profile.name||t.customer.target.phone||t.customer.target.email||"No name"),1),e.createElementVNode("p",N,e.toDisplayString(t.delivery.address||"Not specified"),1)]),e.createElementVNode("div",E,[e.createElementVNode("h3",V,e.toDisplayString(o.returnCurrency())+e.toDisplayString(d.getters.getTotal(t.positions)),1),e.createElementVNode("p",null,"#"+e.toDisplayString(t._id.slice(0,4)+"..."+t._id.slice(-4)),1)])]),e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(0,2),(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"w-100 flex"},[e.createElementVNode("p",w,e.toDisplayString(s.name),1),e.createElementVNode("p",x,[e.createTextVNode(e.toDisplayString(s.quantity)+" "+e.toDisplayString(s.type)+" x "+e.toDisplayString(s.price)+" ",1),e.createElementVNode("span",B,e.toDisplayString(o.returnCurrency()),1)])]))),128)),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[n.value&&t.positions.length>2?(e.openBlock(),e.createElementBlock("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(2),(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i+2,class:"w-100 flex"},[e.createElementVNode("p",C,e.toDisplayString(s.name),1),e.createElementVNode("p",q,[e.createTextVNode(e.toDisplayString(s.quantity)+" "+e.toDisplayString(s.type)+" x "+e.toDisplayString(s.price)+" ",1),e.createElementVNode("span",O,e.toDisplayString(o.returnCurrency()),1)])]))),128))])):e.createCommentVNode("",!0)]),_:2},1024),t.positions.length>2?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:r[1]||(r[1]=e.withModifiers(s=>n.value=!n.value,["prevent"])),class:"radius-big bg-grey-transp-50 pd-nano w-100 flex-center flex"},e.toDisplayString(n.value?"Hide":`+${t.positions.length-2} more`),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",T,[e.createVNode(y.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),F,e.createElementVNode("span",A,e.toDisplayString(t.status),1),M]),t.comment?(e.openBlock(),e.createElementBlock("div",P,[L,e.createElementVNode("p",null,e.toDisplayString(t.comment),1)])):e.createCommentVNode("",!0)]),_:2},1032,["to"]))),256))]),_:1},8,["states","store","options"])])}}};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../store/orders.cjs"),p=require("../../../auth/store/auth.cjs");require("../blocks/CardOrder.vue2.cjs");const g=require("../../../globals/components/blocks/CardHeader.vue.cjs"),_=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),h=require("../../../../components/Feed/Feed.vue.cjs"),y=require("../../../icons/entities/IconEvents.vue.cjs"),v={class:"pd-thin"},k={class:"mn-b-small pd-small bg-white radius-small flex-nowrap flex"},b={class:"w-100"},f={class:"mn-b-thin"},N={class:"t-truncate"},E={class:"w-100 t-right"},V={class:"mn-b-thin"},S={class:"cols-1 mn-b-small gap-thin pd-small bg-white radius-small"},w={class:"mn-r-auto"},x={class:"t-right"},B={class:"t-transp"},D={key:0},C={class:"mn-r-auto"},q={class:"t-right"},O={class:"t-transp"},T={class:"pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex"},F=e.createElementVNode("p",{class:"t-medium mn-r-auto"},"16:40, 21.04",-1),A={class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"},M=e.createElementVNode("span",{class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin t-white bg-red"}," Unpaid ",-1),P={key:0,class:"pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small"},L=e.createElementVNode("p",{class:"mn-b-thin t-transp uppercase p-small t-medium"},"Comment",-1),R={__name:"Orders",setup(z){const u=c.useRoute();c.useRouter();const n=e.ref(!1),l=e.ref("all");return e.onMounted(async()=>{}),(o,r)=>{const m=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",v,[e.createVNode(_.default,{title:"Orders","onUpdate:tabs_current":r[0]||(r[0]=a=>l.value=a),tabs_current:l.value,tabs:[{name:"All",value:"all"},{name:"Created",value:"stock-in"},{name:"Confirmed",value:"stock-out"},{name:"Preparing",value:"stock-out"},{name:"Prepared",value:"stock-out"},{name:"In delivery",value:"stock-out"},{name:"Delivered",value:"stock-out"},{name:"Closed",value:"stock-out"}],actions:[{to:{name:"AdminOrderAdd"},label:"Create Order"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current"]),e.createVNode(h.default,{search:!0,states:{empty:{title:"No Orders Found",description:"Currently, there are no orders."}},store:{read:a=>d.actions.read(a)},options:{limit:15,owner:e.unref(u).params._id,...l.value!=="all"&&{type:l.value}},class:"gap-thin cols-3"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,t=>(e.openBlock(),e.createBlock(m,{to:{name:"Order Edit",params:{order:t._id}},class:"bg-grey pos-relative pd-medium radius-big"},{default:e.withCtx(()=>[e.createVNode(g.default,{entity:t,entityType:"order",user:p.state.user,owner:t.creator,creator:t.creator,date:t.createdAt,class:"mn-b-small"},null,8,["entity","user","owner","creator","date"]),e.createElementVNode("div",k,[e.createElementVNode("div",b,[e.createElementVNode("h3",f,e.toDisplayString(t.customer.target.profile.name||t.customer.target.phone||t.customer.target.email||"No name"),1),e.createElementVNode("p",N,e.toDisplayString(t.delivery.address||"Not specified"),1)]),e.createElementVNode("div",E,[e.createElementVNode("h3",V,e.toDisplayString(o.returnCurrency())+e.toDisplayString(d.getters.getTotal(t.positions)),1),e.createElementVNode("p",null,"#"+e.toDisplayString(t._id.slice(0,4)+"..."+t._id.slice(-4)),1)])]),e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(0,2),(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"w-100 flex"},[e.createElementVNode("p",w,e.toDisplayString(s.name),1),e.createElementVNode("p",x,[e.createTextVNode(e.toDisplayString(s.quantity)+" "+e.toDisplayString(s.type)+" x "+e.toDisplayString(s.price)+" ",1),e.createElementVNode("span",B,e.toDisplayString(o.returnCurrency()),1)])]))),128)),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[n.value&&t.positions.length>2?(e.openBlock(),e.createElementBlock("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(2),(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i+2,class:"w-100 flex"},[e.createElementVNode("p",C,e.toDisplayString(s.name),1),e.createElementVNode("p",q,[e.createTextVNode(e.toDisplayString(s.quantity)+" "+e.toDisplayString(s.type)+" x "+e.toDisplayString(s.price)+" ",1),e.createElementVNode("span",O,e.toDisplayString(o.returnCurrency()),1)])]))),128))])):e.createCommentVNode("",!0)]),_:2},1024),t.positions.length>2?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:r[1]||(r[1]=e.withModifiers(s=>n.value=!n.value,["prevent"])),class:"radius-big bg-grey-transp-50 pd-nano w-100 flex-center flex"},e.toDisplayString(n.value?"Hide":`+${t.positions.length-2} more`),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",T,[e.createVNode(y.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),F,e.createElementVNode("span",A,e.toDisplayString(t.status),1),M]),t.comment?(e.openBlock(),e.createElementBlock("div",P,[L,e.createElementVNode("p",null,e.toDisplayString(t.comment),1)])):e.createCommentVNode("",!0)]),_:2},1032,["to"]))),256))]),_:1},8,["states","store","options"])])}}};exports.default=R;
@@ -5,7 +5,7 @@ import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
5
5
  import "../../../../components/Tab/Tab.vue.js";
6
6
  import { actions as T, getters as V } from "../../store/orders.js";
7
7
  import { state as B } from "../../../auth/store/auth.js";
8
- import "../blocks/CardOrder.vue.js";
8
+ import "../blocks/CardOrder.vue2.js";
9
9
  import E from "../../../globals/components/blocks/CardHeader.vue.js";
10
10
  import q from "../../../globals/components/sections/SectionPageTitle.vue.js";
11
11
  import z from "../../../../components/Feed/Feed.vue.js";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("vue-router"),p=require("vue-i18n"),g=require("../blocks/CardOrderItem.vue.cjs"),h=require("../../../icons/navigation/IconCross.vue.cjs"),t=require("../../store/shopcart.cjs");require("./ShopCart.vue2.cjs");const b={class:"flex-nowrap flex"},_={class:"mn-b-small w-100"},y={class:"mn-b-thin p-big"},k={class:"t-transp p-small"},f={class:"mn-b-big shopcart-content"},v={key:0,class:"mn-t-medium"},S={class:"shopcart-footer pd-b-medium pd-t-medium pd-big transition-cubic bg-black t-white"},E={key:0,class:"mn-b-small total-price"},C={class:"t-transp t-white mn-b-micro"},N={class:"t-demi t-white p-big"},V={__name:"ShopCart",setup(B){i.useRoute();const a=i.useRouter(),c=t.getters.cartTotalPrice,l=t.getters.cartTotalAmount,u={messages:{en:{title:"Your order",subtitle:"You have",positions:"no products in shop cart | 1 product in shop cart | {count} products in shop card",emptystate:"You don't have any positions in your shop cart yet. Maybe something needs to be added?",intotal:"In total",fastorder:"Checkout"},ru:{title:"Ваш заказ",subtitle:"У вас",positions:"нет товаров в корзине | 1 товар в корзине | {count} товаров в корзине",emptystate:"У вас еще нет товаров в корзине. Может стоит что-нибудь добавить?",intotal:"Итого",fastorder:"Подтвердить заказ"}}},{t:o}=p.useI18n(u);function d(){a.push({name:"Form Order"}),t.actions.toggleShopcart()}return(m,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("section",{class:e.normalizeClass(["z-index-4 transition-cubic pd-big bg-white shop-cart",{"shop-cart-active":t.state.currentState===!0}])},[e.createElementVNode("div",b,[e.createElementVNode("div",_,[e.createElementVNode("h4",y,e.toDisplayString(e.unref(o)("title")),1),e.createElementVNode("p",k,e.toDisplayString(e.unref(o)("subtitle"))+" "+e.toDisplayString(e.unref(o)("positions",{count:e.unref(l)})),1)]),e.createVNode(h.default,{onClick:t.actions.toggleShopcart,class:"button-icon"},null,8,["onClick"])]),e.createElementVNode("div",f,[t.state.positions.length>0?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",v,[e.createElementVNode("i",null,e.toDisplayString(e.unref(o)("emptystate")),1)])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.positions,n=>(e.openBlock(),e.createBlock(g.default,{key:n._id,editable:"true",product:n,increase:r=>t.actions.incrementItemQuantity(r._id),decrease:r=>t.actions.decrementItemQuantity(r._id),remove:r=>t.actions.removeProduct(r._id)},null,8,["product","increase","decrease","remove"]))),128))]),e.createElementVNode("div",S,[t.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(o)("intotal")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(c))+" "+e.toDisplayString(m.returnCurrency()),1)])):e.createCommentVNode("",!0),t.state.positions.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:s[0]||(s[0]=n=>d()),class:"bg-main t-black w-100 button"},e.toDisplayString(e.unref(o)("fastorder")),1)):e.createCommentVNode("",!0)])],2),e.createElementVNode("div",{onClick:s[1]||(s[1]=(...n)=>t.actions.toggleShopcart&&t.actions.toggleShopcart(...n)),class:e.normalizeClass([{active:t.state.currentState===!0},"color-overlay z-index-3"])},null,2)],64))}};exports.default=V;
@@ -0,0 +1,89 @@
1
+ import { openBlock as r, createElementBlock as l, Fragment as d, createElementVNode as t, normalizeClass as m, toDisplayString as e, unref as o, createVNode as k, createCommentVNode as p, renderList as C, createBlock as S } from "vue";
2
+ import { useRoute as w, useRouter as x } from "vue-router";
3
+ import { useI18n as I } from "vue-i18n";
4
+ import z from "../blocks/CardOrderItem.vue.js";
5
+ import B from "../../../icons/navigation/IconCross.vue.js";
6
+ import { getters as h, state as i, actions as s } from "../../store/shopcart.js";
7
+ import "./ShopCart.vue2.js";
8
+ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T = { class: "mn-b-thin p-big" }, V = { class: "t-transp p-small" }, Y = { class: "mn-b-big shopcart-content" }, A = {
9
+ key: 0,
10
+ class: "mn-t-medium"
11
+ }, E = { class: "shopcart-footer pd-b-medium pd-t-medium pd-big transition-cubic bg-black t-white" }, F = {
12
+ key: 0,
13
+ class: "mn-b-small total-price"
14
+ }, O = { class: "t-transp t-white mn-b-micro" }, Q = { class: "t-demi t-white p-big" }, H = {
15
+ __name: "ShopCart",
16
+ setup(R) {
17
+ w();
18
+ const _ = x(), b = h.cartTotalPrice, g = h.cartTotalAmount, f = {
19
+ messages: {
20
+ en: {
21
+ title: "Your order",
22
+ subtitle: "You have",
23
+ positions: "no products in shop cart | 1 product in shop cart | {count} products in shop card",
24
+ emptystate: "You don't have any positions in your shop cart yet. Maybe something needs to be added?",
25
+ intotal: "In total",
26
+ fastorder: "Checkout"
27
+ },
28
+ ru: {
29
+ title: "Ваш заказ",
30
+ subtitle: "У вас",
31
+ positions: "нет товаров в корзине | 1 товар в корзине | {count} товаров в корзине",
32
+ emptystate: "У вас еще нет товаров в корзине. Может стоит что-нибудь добавить?",
33
+ intotal: "Итого",
34
+ fastorder: "Подтвердить заказ"
35
+ }
36
+ }
37
+ }, { t: n } = I(f);
38
+ function y() {
39
+ _.push({ name: "Form Order" }), s.toggleShopcart();
40
+ }
41
+ return (v, u) => (r(), l(d, null, [
42
+ t("section", {
43
+ class: m(["z-index-4 transition-cubic pd-big bg-white shop-cart", { "shop-cart-active": i.currentState === !0 }])
44
+ }, [
45
+ t("div", N, [
46
+ t("div", P, [
47
+ t("h4", T, e(o(n)("title")), 1),
48
+ t("p", V, e(o(n)("subtitle")) + " " + e(o(n)("positions", { count: o(g) })), 1)
49
+ ]),
50
+ k(B, {
51
+ onClick: s.toggleShopcart,
52
+ class: "button-icon"
53
+ }, null, 8, ["onClick"])
54
+ ]),
55
+ t("div", Y, [
56
+ i.positions.length > 0 ? p("", !0) : (r(), l("p", A, [
57
+ t("i", null, e(o(n)("emptystate")), 1)
58
+ ])),
59
+ (r(!0), l(d, null, C(i.positions, (c) => (r(), S(z, {
60
+ key: c._id,
61
+ editable: "true",
62
+ product: c,
63
+ increase: (a) => s.incrementItemQuantity(a._id),
64
+ decrease: (a) => s.decrementItemQuantity(a._id),
65
+ remove: (a) => s.removeProduct(a._id)
66
+ }, null, 8, ["product", "increase", "decrease", "remove"]))), 128))
67
+ ]),
68
+ t("div", E, [
69
+ i.positions.length > 0 ? (r(), l("div", F, [
70
+ t("p", O, e(o(n)("intotal")), 1),
71
+ t("p", Q, e(o(b)) + " " + e(v.returnCurrency()), 1)
72
+ ])) : p("", !0),
73
+ i.positions.length > 0 ? (r(), l("button", {
74
+ key: 1,
75
+ onClick: u[0] || (u[0] = (c) => y()),
76
+ class: "bg-main t-black w-100 button"
77
+ }, e(o(n)("fastorder")), 1)) : p("", !0)
78
+ ])
79
+ ], 2),
80
+ t("div", {
81
+ onClick: u[1] || (u[1] = (...c) => s.toggleShopcart && s.toggleShopcart(...c)),
82
+ class: m([{ active: i.currentState === !0 }, "color-overlay z-index-3"])
83
+ }, null, 2)
84
+ ], 64));
85
+ }
86
+ };
87
+ export {
88
+ H as default
89
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r={key:0,class:"bg-black t-white pd-big radius-medium flex-nowrap flex"},s=e.createElementVNode("p",{class:"mn-r-auto"},[e.createElementVNode("span",{class:"t-semi"},"Already registered?"),e.createElementVNode("br"),e.createElementVNode("span",null,"Log in to your account to checkout faster.")],-1),l={__name:"AskToLogin",setup(u){let o=e.ref(!0);return(n,t)=>e.unref(o)===!0?(e.openBlock(),e.createElementBlock("div",r,[s,e.createElementVNode("button",{onClick:t[0]||(t[0]=a=>n.toggleSignInPopup()),class:"button"}," Log In ")])):e.createCommentVNode("",!0)}};exports.default=l;
@@ -0,0 +1,24 @@
1
+ import { ref as r, unref as s, openBlock as a, createElementBlock as l, createElementVNode as e, createCommentVNode as u } from "vue";
2
+ const c = {
3
+ key: 0,
4
+ class: "bg-black t-white pd-big radius-medium flex-nowrap flex"
5
+ }, i = /* @__PURE__ */ e("p", { class: "mn-r-auto" }, [
6
+ /* @__PURE__ */ e("span", { class: "t-semi" }, "Already registered?"),
7
+ /* @__PURE__ */ e("br"),
8
+ /* @__PURE__ */ e("span", null, "Log in to your account to checkout faster.")
9
+ ], -1), g = {
10
+ __name: "AskToLogin",
11
+ setup(p) {
12
+ let o = r(!0);
13
+ return (n, t) => s(o) === !0 ? (a(), l("div", c, [
14
+ i,
15
+ e("button", {
16
+ onClick: t[0] || (t[0] = (m) => n.toggleSignInPopup()),
17
+ class: "button"
18
+ }, " Log In ")
19
+ ])) : u("", !0);
20
+ }
21
+ };
22
+ export {
23
+ g as default
24
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t={class:""},o={__name:"EmptyState",props:{order:Object},setup(r){return(s,n)=>(e.openBlock(),e.createElementBlock("div",t," You dont have any positions in order. "))}};exports.default=o;
@@ -0,0 +1,13 @@
1
+ import { openBlock as e, createElementBlock as t } from "vue";
2
+ const o = { class: "" }, a = {
3
+ __name: "EmptyState",
4
+ props: {
5
+ order: Object
6
+ },
7
+ setup(r) {
8
+ return (n, s) => (e(), t("div", o, " You dont have any positions in order. "));
9
+ }
10
+ };
11
+ export {
12
+ a as default
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s={class:"t-center order-finished"},l=e.createStaticVNode('<p class="mn-b-medium p-big">Order completed!</p><div class="mn-b-big pd-big order-number"><p class="mn-b-small t-semi small">#485792</p><p class="t-lh-2">Our manager will contact you within 1 hour. If you have any questions - send us an email or call <br><span class="t-semi">+995 585 888 660</span></p></div>',2),a={class:"order-data pd-big"},r={class:"mn-b-small t-left flex-nowrap flex"},o=e.createElementVNode("p",{class:"mn-r-small w-33 t-semi"},"Receiver",-1),n={class:"mn-r-small w-100"},i={class:"t-left flex-nowrap flex"},c=e.createElementVNode("p",{class:"mn-r-small w-33 t-semi"},"Address",-1),d={class:"mn-r-small w-100"},m={__name:"Succes",props:{order:Object},setup(t){return(u,p)=>(e.openBlock(),e.createElementBlock("div",s,[l,e.createElementVNode("div",a,[e.createElementVNode("div",r,[o,e.createElementVNode("p",n,e.toDisplayString(t.order.name)+" "+e.toDisplayString(t.order.surname)+", "+e.toDisplayString(t.order.phone)+", "+e.toDisplayString(t.order.email),1)]),e.createElementVNode("div",i,[c,e.createElementVNode("p",d,e.toDisplayString(t.order.city)+", "+e.toDisplayString(t.order.adress),1)])])]))}};exports.default=m;
@@ -0,0 +1,25 @@
1
+ import { openBlock as a, createElementBlock as l, createElementVNode as e, toDisplayString as t, createStaticVNode as r } from "vue";
2
+ const o = { class: "t-center order-finished" }, c = /* @__PURE__ */ r('<p class="mn-b-medium p-big">Order completed!</p><div class="mn-b-big pd-big order-number"><p class="mn-b-small t-semi small">#485792</p><p class="t-lh-2">Our manager will contact you within 1 hour. If you have any questions - send us an email or call <br><span class="t-semi">+995 585 888 660</span></p></div>', 2), n = { class: "order-data pd-big" }, d = { class: "mn-b-small t-left flex-nowrap flex" }, i = /* @__PURE__ */ e("p", { class: "mn-r-small w-33 t-semi" }, "Receiver", -1), m = { class: "mn-r-small w-100" }, h = { class: "t-left flex-nowrap flex" }, p = /* @__PURE__ */ e("p", { class: "mn-r-small w-33 t-semi" }, "Address", -1), u = { class: "mn-r-small w-100" }, v = {
3
+ __name: "Succes",
4
+ props: {
5
+ order: Object
6
+ },
7
+ setup(s) {
8
+ return (_, b) => (a(), l("div", o, [
9
+ c,
10
+ e("div", n, [
11
+ e("div", d, [
12
+ i,
13
+ e("p", m, t(s.order.name) + " " + t(s.order.surname) + ", " + t(s.order.phone) + ", " + t(s.order.email), 1)
14
+ ]),
15
+ e("div", h, [
16
+ p,
17
+ e("p", u, t(s.order.city) + ", " + t(s.order.adress), 1)
18
+ ])
19
+ ])
20
+ ]));
21
+ }
22
+ };
23
+ export {
24
+ v as default
25
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./store/orders.cjs"),t=require("./store/shopcart.cjs"),o=require("./router/orders.router.cjs"),d=require("./components/pages/Orders.vue.cjs"),a=require("./components/pages/Order.vue.cjs"),s=require("./components/pages/OrderCreate.vue.cjs"),i=require("./components/pages/OrderCreateBackoffice.vue.cjs"),c=require("./components/blocks/CardOrderItem.vue.cjs"),n=require("./components/blocks/CardOrder.vue.cjs"),l=require("./components/blocks/StatusHistory.vue.cjs"),f=require("./components/sections/FormCustomerDetails.vue.cjs"),m=require("./components/sections/FormPayment.vue.cjs"),q=require("./components/sections/FormDelivery.vue.cjs"),O=require("./components/sections/EmptyState.vue.cjs"),S=require("./components/sections/AskToLogin.vue.cjs"),C=require("./components/sections/Succes.vue.cjs"),p=require("./components/partials/ShopCart.vue.cjs");function y(h,e,u){u.addRoute("Home",o.default),e.addStore("orders",r),e.addStore("shopcart",t)}const F={initialize:y,views:{store:{storeOrders:r,storeShopcart:t},router:{routerOrders:o.default},components:{Orders:d.default,Order:a.default,OrderCreate:s.default,OrderCreateBackoffice:i.default,CardOrderItem:c.default,CardOrder:n.default,StatusHistory:l.default,FormCustomerDetails:f.default,AskToLogin:S.default,FormDelivery:q.default,EmptyState:O.default,Succes:C.default,FormPayment:m.default,ShopCart:p.default}}};exports.default=F;
@@ -0,0 +1,56 @@
1
+ import * as o from "./store/orders.js";
2
+ import * as m from "./store/shopcart.js";
3
+ import t from "./router/orders.router.js";
4
+ import e from "./components/pages/Orders.vue.js";
5
+ import a from "./components/pages/Order.vue.js";
6
+ import s from "./components/pages/OrderCreate.vue.js";
7
+ import f from "./components/pages/OrderCreateBackoffice.vue.js";
8
+ import p from "./components/blocks/CardOrderItem.vue.js";
9
+ import _ from "./components/blocks/CardOrder.vue.js";
10
+ import d from "./components/blocks/StatusHistory.vue.js";
11
+ import c from "./components/sections/FormCustomerDetails.vue.js";
12
+ import n from "./components/sections/FormPayment.vue.js";
13
+ import $ from "./components/sections/FormDelivery.vue.js";
14
+ import O from "./components/sections/EmptyState.vue.js";
15
+ import u from "./components/sections/AskToLogin.vue.js";
16
+ import S from "./components/sections/Succes.vue.js";
17
+ import l from "./components/partials/ShopCart.vue.js";
18
+ function C(h, r, i) {
19
+ i.addRoute("Home", t), r.addStore("orders", o), r.addStore("shopcart", m);
20
+ }
21
+ const L = {
22
+ initialize: C,
23
+ views: {
24
+ store: {
25
+ storeOrders: o,
26
+ storeShopcart: m
27
+ },
28
+ router: {
29
+ routerOrders: t
30
+ },
31
+ components: {
32
+ // Pages
33
+ Orders: e,
34
+ Order: a,
35
+ OrderCreate: s,
36
+ OrderCreateBackoffice: f,
37
+ // Favorites,
38
+ // Blocks
39
+ CardOrderItem: p,
40
+ CardOrder: _,
41
+ StatusHistory: d,
42
+ // Sections
43
+ FormCustomerDetails: c,
44
+ AskToLogin: u,
45
+ FormDelivery: $,
46
+ EmptyState: O,
47
+ Succes: S,
48
+ FormPayment: n,
49
+ // Partials
50
+ ShopCart: l
51
+ }
52
+ }
53
+ };
54
+ export {
55
+ L as default
56
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r={path:"orders",component:e.default,meta:{title:{en:"Marketplace",ru:"Маркетплейс"}},children:[{path:"form",name:"Form Order",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreate.vue.cjs"))},{path:":order",name:"Order Status",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Order.vue.cjs"))},{path:":order/edit",name:"Order Edit",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Order.vue.cjs"))}]};exports.default=r;
@@ -0,0 +1,58 @@
1
+ import e from "../../globals/components/layouts/Empty.vue.js";
2
+ const t = {
3
+ path: "orders",
4
+ component: e,
5
+ meta: {
6
+ title: {
7
+ en: "Marketplace",
8
+ ru: "Маркетплейс"
9
+ }
10
+ },
11
+ children: [
12
+ {
13
+ path: "form",
14
+ name: "Form Order",
15
+ meta: {
16
+ title: {
17
+ en: "Order",
18
+ ru: "Заказ"
19
+ }
20
+ },
21
+ component: () => import(
22
+ /* webpackChunkName: 'Order' */
23
+ "../components/pages/OrderCreate.vue.js"
24
+ )
25
+ },
26
+ {
27
+ path: ":order",
28
+ name: "Order Status",
29
+ meta: {
30
+ title: {
31
+ en: "Order",
32
+ ru: "Заказ"
33
+ }
34
+ },
35
+ component: () => import(
36
+ /* webpackChunkName: 'Order' */
37
+ "../components/pages/Order.vue.js"
38
+ )
39
+ },
40
+ {
41
+ path: ":order/edit",
42
+ name: "Order Edit",
43
+ meta: {
44
+ title: {
45
+ en: "Order",
46
+ ru: "Заказ"
47
+ }
48
+ },
49
+ component: () => import(
50
+ /* webpackChunkName: 'Order' */
51
+ "../components/pages/Order.vue.js"
52
+ )
53
+ }
54
+ ]
55
+ };
56
+ export {
57
+ t as default
58
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../globals/store/globals.cjs");const t=r.reactive({organization:null,positions:[],currentState:!1}),s={toggleShopcart(){t.currentState=!t.currentState},setShopcart(){try{const o=localStorage.getItem("shopcart");if(o){const i=JSON.parse(o);t.positions=i.positions,t.organization=i.organization}}catch(o){throw console.error(o),o}},addProductToCart(o,i){const e=t.positions.find(n=>n._id===o._id);e?e.quantity++:t.positions.push({_id:o._id,images:o.images,name:o.name,price:o.price,quantity:1,org_id:i}),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:i}))},removeProduct(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},decrementItemQuantity(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(i.quantity--,i.quantity<1&&t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},incrementItemQuantity(o){const i=t.positions.find(e=>e._id===o);i&&(i.quantity++,localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},resetShopcart({state:o}){o.positions=[],localStorage.removeItem("shopcart")}};r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.price*i.quantity,0))),r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.quantity,0))),r.computed(()=>Number(t.currentState));r.watch(t,(o,i)=>{});exports.actions=s;exports.state=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../globals/store/globals.cjs");const t=r.reactive({organization:null,positions:[],currentState:!1}),s={toggleShopcart(){t.currentState=!t.currentState},setShopcart(){try{const o=localStorage.getItem("shopcart");if(o){const i=JSON.parse(o);t.positions=i.positions,t.organization=i.organization}}catch(o){throw console.error(o),o}},addProductToCart(o,i){const e=t.positions.find(n=>n._id===o._id);e?e.quantity++:t.positions.push({_id:o._id,images:o.images,name:o.name,price:o.price,quantity:1,org_id:i}),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:i}))},removeProduct(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},decrementItemQuantity(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(i.quantity--,i.quantity<1&&t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},incrementItemQuantity(o){const i=t.positions.find(e=>e._id===o);i&&(i.quantity++,localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},resetShopcart({state:o}){o.positions=[],localStorage.removeItem("shopcart")}},a={cartTotalPrice:r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.price*i.quantity,0))),cartTotalAmount:r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.quantity,0))),getStoreCartState:r.computed(()=>Number(t.currentState))};r.watch(t,(o,i)=>{});exports.actions=s;exports.getters=a;exports.state=t;
@@ -68,11 +68,15 @@ const o = s({
68
68
  resetShopcart({ state: t }) {
69
69
  t.positions = [], localStorage.removeItem("shopcart");
70
70
  }
71
+ }, u = {
72
+ cartTotalPrice: r(() => Number(o.positions.reduce((t, i) => t + i.price * i.quantity, 0))),
73
+ cartTotalAmount: r(() => Number(o.positions.reduce((t, i) => t + i.quantity, 0))),
74
+ getStoreCartState: r(() => Number(o.currentState))
71
75
  };
72
- r(() => Number(o.positions.reduce((t, i) => t + i.price * i.quantity, 0))), r(() => Number(o.positions.reduce((t, i) => t + i.quantity, 0))), r(() => Number(o.currentState));
73
76
  a(o, (t, i) => {
74
77
  });
75
78
  export {
76
79
  g as actions,
80
+ u as getters,
77
81
  o as state
78
82
  };