@ozdao/prometheus-framework 0.2.36 → 0.2.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +42 -52
  4. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  6. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +39 -242
  8. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -0
  9. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +373 -0
  10. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -0
  11. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +4 -0
  12. package/dist/prometheus-framework/src/components/FieldPhone/click-outside.cjs +1 -2
  13. package/dist/prometheus-framework/src/components/FieldPhone/click-outside.js +13 -13
  14. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +111 -2
  16. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +49 -47
  18. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +43 -42
  20. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  21. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +61 -56
  22. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +1 -1
  24. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/events/store/events.js +59 -39
  26. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +31 -31
  28. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +85 -55
  30. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/orders/store/orders.js +30 -38
  32. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +31 -21
  34. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +95 -92
  36. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +54 -74
  38. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +58 -48
  40. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/products/store/products.js +26 -26
  42. package/dist/prometheus-framework.cjs.js +18 -18
  43. package/dist/prometheus-framework.es.js +507 -493
  44. package/dist/style.css +1 -1
  45. package/package.json +1 -1
  46. package/src/modules/globals/store/globals.js +0 -1
@@ -1,69 +1,69 @@
1
- import { ref as v, onMounted as D, openBlock as a, createElementBlock as c, createVNode as s, TransitionGroup as g, withCtx as p, Fragment as f, renderList as _, createCommentVNode as l, Transition as T, createBlock as o, normalizeStyle as w, createElementVNode as m, resolveDynamicComponent as $, mergeProps as B } from "vue";
1
+ import { ref as d, onMounted as b, openBlock as a, createElementBlock as c, createVNode as u, TransitionGroup as g, withCtx as p, Fragment as f, renderList as k, createCommentVNode as i, Transition as T, createBlock as s, normalizeStyle as w, createElementVNode as m, normalizeClass as $, resolveDynamicComponent as B, mergeProps as C } from "vue";
2
2
  import "../../../../components/Loader/Loader.vue.js";
3
- import C from "../../../../components/EmptyState/EmptyState.vue.js";
3
+ import L from "../../../../components/EmptyState/EmptyState.vue.js";
4
4
  import E from "../sections/HeroEvent.vue.js";
5
- import L from "../sections/SectionMainGuest.vue.js";
6
- import I from "../sections/SectionSpecialGuests.vue.js";
7
- import S from "../sections/SectionLineup.vue.js";
8
- import x from "../sections/SectionPreviousEvents.vue.js";
9
- import H from "../blocks/CardEvent.vue.js";
10
- import M from "../../../icons/skeletons/SkeletonEvent.vue.js";
11
- import U from "../elements/ButtonJoin.vue.js";
12
- import V from "../../../community/components/sections/Comments.vue.js";
13
- import N from "../../../constructor/components/elements/Image.vue.js";
14
- import { read as P } from "../../store/events.js";
5
+ import I from "../sections/SectionMainGuest.vue.js";
6
+ import S from "../sections/SectionSpecialGuests.vue.js";
7
+ import x from "../sections/SectionLineup.vue.js";
8
+ import H from "../sections/SectionPreviousEvents.vue.js";
9
+ import M from "../blocks/CardEvent.vue.js";
10
+ import U from "../../../icons/skeletons/SkeletonEvent.vue.js";
11
+ import V from "../elements/ButtonJoin.vue.js";
12
+ import N from "../../../community/components/sections/Comments.vue.js";
13
+ import P from "../../../constructor/components/elements/Image.vue.js";
14
+ import { read as z } from "../../store/events.js";
15
15
  import { mutations as F } from "../../store/tickets.js";
16
16
  import { state as r } from "../../../auth/store/auth.js";
17
- import { useRoute as z } from "vue-router";
18
- const G = { class: "pd-thin" }, j = /* @__PURE__ */ m("h2", { class: "mn-b-big w-100 t-center" }, "Event Details", -1), J = { class: "gap-big mn-b-thin cols-2" }, re = {
17
+ import { useRoute as G } from "vue-router";
18
+ const J = { class: "pd-thin" }, R = /* @__PURE__ */ m("h2", { class: "mn-b-big w-100 t-center" }, "Event Details", -1), re = {
19
19
  __name: "Event",
20
- setup(R) {
21
- const k = z(), y = ({ ticket: t, hasTicket: u, targetId: n }) => {
22
- F.handleTicketUpdate(e.value, t, u, n);
20
+ setup(j) {
21
+ const _ = G(), y = ({ ticket: t, hasTicket: o, targetId: n }) => {
22
+ F.handleTicketUpdate(e.value, t, o, n);
23
23
  }, h = {
24
24
  Textarea: "p",
25
25
  H2: "h2",
26
26
  Bullets: "p",
27
27
  Caption: "p",
28
- ImageUpload: N
28
+ ImageUpload: P
29
29
  };
30
- function b(t) {
30
+ function D(t) {
31
31
  return t.type === "Textarea" ? { innerHTML: t.content, class: "p-medium" } : t.type === "H2" ? { innerHTML: t.content, class: "h3" } : t.type === "Caption" ? { innerHTML: t.content } : t.type === "ImageUpload" ? { src: t.content } : {};
32
32
  }
33
- const e = v(null), i = v(!0);
34
- return D(async () => {
35
- i.value = !0;
36
- const t = await P({ user: r.user._id, url: k.params.url });
37
- e.value = t[0], i.value = !1;
38
- }), (t, u) => (a(), c("section", G, [
39
- s(g, {
33
+ const e = d(null), l = d(!0);
34
+ return b(async () => {
35
+ l.value = !0;
36
+ const t = await z({ user: r.user._id, url: _.params.url });
37
+ e.value = t[0], l.value = !1;
38
+ }), (t, o) => (a(), c("section", J, [
39
+ u(g, {
40
40
  tag: "ul",
41
41
  name: "fade",
42
42
  class: "o-hidden bg-grey radius-big"
43
43
  }, {
44
44
  default: p(() => [
45
- i.value ? (a(), c(f, { key: 0 }, _(3, (n) => s(M, { key: n })), 64)) : l("", !0)
45
+ l.value ? (a(), c(f, { key: 0 }, k(3, (n) => u(U, { key: n })), 64)) : i("", !0)
46
46
  ]),
47
47
  _: 1
48
48
  }),
49
- s(T, { name: "fade" }, {
49
+ u(T, { name: "fade" }, {
50
50
  default: p(() => [
51
- !i.value && !e.value ? (a(), o(C, {
51
+ !l.value && !e.value ? (a(), s(L, {
52
52
  key: 0,
53
53
  title: "No Event Found",
54
54
  description: "Currently, there are no events available. Please check back later.",
55
55
  class: "pd-medium mn-b-thin bg-grey radius-big"
56
- })) : l("", !0)
56
+ })) : i("", !0)
57
57
  ]),
58
58
  _: 1
59
59
  }),
60
- s(g, {
60
+ u(g, {
61
61
  tag: "ul",
62
62
  name: "fade",
63
63
  class: "container"
64
64
  }, {
65
65
  default: p(() => [
66
- !i.value && e.value && e.value.special ? (a(), o(E, {
66
+ !l.value && e.value && e.value.special ? (a(), s(E, {
67
67
  key: 0,
68
68
  content: {
69
69
  title: e.value.name,
@@ -80,8 +80,8 @@ const G = { class: "pd-thin" }, j = /* @__PURE__ */ m("h2", { class: "mn-b-big w
80
80
  price: e.value.specialData.ticketPrice
81
81
  },
82
82
  class: "mn-b-thin"
83
- }, null, 8, ["content", "options"])) : l("", !0),
84
- !i.value && e.value && e.value.special ? (a(), o(L, {
83
+ }, null, 8, ["content", "options"])) : i("", !0),
84
+ !l.value && e.value && e.value.special ? (a(), s(I, {
85
85
  key: 1,
86
86
  content: {
87
87
  title: e.value.specialData.guestTitle,
@@ -97,8 +97,8 @@ const G = { class: "pd-thin" }, j = /* @__PURE__ */ m("h2", { class: "mn-b-big w
97
97
  soundcloud: e.value.specialData.guestSoundcloud
98
98
  },
99
99
  class: "mn-b-thin"
100
- }, null, 8, ["content"])) : l("", !0),
101
- !i.value && e.value && e.value.special ? (a(), c("section", {
100
+ }, null, 8, ["content"])) : i("", !0),
101
+ !l.value && e.value && e.value.special ? (a(), c("section", {
102
102
  key: 2,
103
103
  style: w(`
104
104
  background-image: url(${e.value.specialData.lineupBackground});
@@ -106,23 +106,28 @@ const G = { class: "pd-thin" }, j = /* @__PURE__ */ m("h2", { class: "mn-b-big w
106
106
  `),
107
107
  class: "mn-b-thin t-white gap-big w-100 h-max o-hidden radius-big pd-big pos-relative bg-black"
108
108
  }, [
109
- j,
110
- m("div", J, [
111
- s(I, {
109
+ R,
110
+ m("div", {
111
+ class: $(["gap-big mn-b-thin", {
112
+ "cols-2": e.value.specialData.guests.lenght > 0,
113
+ "cols-1": e.value.specialData.guests.lenght > 1
114
+ }])
115
+ }, [
116
+ e.value.specialData.guests.lenght > 0 ? (a(), s(S, {
117
+ key: 0,
112
118
  content: {
113
119
  title: "Special Guests",
114
- description: "Enjoy a festive dining experience at The Commune, featuring a fine selection of dishes and drinks presented on your table throughout the evening.",
115
120
  guests: e.value.specialData.guests
116
121
  }
117
- }, null, 8, ["content"]),
118
- s(S, {
122
+ }, null, 8, ["content"])) : i("", !0),
123
+ u(x, {
119
124
  content: {
120
125
  title: "Lineup",
121
126
  lineup: e.value.specialData.lineup
122
127
  }
123
128
  }, null, 8, ["content"])
124
- ]),
125
- s(x, {
129
+ ], 2),
130
+ u(H, {
126
131
  content: {
127
132
  ticket: e.value.specialData.ticketImage
128
133
  },
@@ -131,10 +136,10 @@ const G = { class: "pd-thin" }, j = /* @__PURE__ */ m("h2", { class: "mn-b-big w
131
136
  video: e.value.specialData.previousVideo
132
137
  }
133
138
  }, null, 8, ["content", "options"])
134
- ], 4)) : l("", !0),
135
- !i.value && e.value && !e.value.special ? (a(), o(H, {
139
+ ], 4)) : i("", !0),
140
+ !l.value && e.value && !e.value.special ? (a(), s(M, {
136
141
  key: 3,
137
- onClick: u[0] || (u[0] = (n) => t.$router.push({ name: "Event", params: { url: e.value.url } })),
142
+ onClick: o[0] || (o[0] = (n) => t.$router.push({ name: "Event", params: { url: e.value.url } })),
138
143
  event: e.value,
139
144
  owner: e.value.owner,
140
145
  user: r.user._id,
@@ -142,7 +147,7 @@ const G = { class: "pd-thin" }, j = /* @__PURE__ */ m("h2", { class: "mn-b-big w
142
147
  class: "mn-b-medium bg-grey radius-big"
143
148
  }, {
144
149
  default: p(() => [
145
- r.user._id ? (a(), o(U, {
150
+ r.user._id ? (a(), s(V, {
146
151
  key: 0,
147
152
  type: "event",
148
153
  hasTicket: e.value.hasTicket,
@@ -150,26 +155,26 @@ const G = { class: "pd-thin" }, j = /* @__PURE__ */ m("h2", { class: "mn-b-big w
150
155
  userId: r.user._id,
151
156
  class: "mn-b-small w-100 pd-medium mn-auto",
152
157
  onUpdateTicket: y
153
- }, null, 8, ["hasTicket", "targetId", "userId"])) : l("", !0),
158
+ }, null, 8, ["hasTicket", "targetId", "userId"])) : i("", !0),
154
159
  m("section", null, [
155
- e.value && e.value.content ? (a(!0), c(f, { key: 0 }, _(e.value.content, (n, d) => (a(), o($(h[n.type]), B({
156
- key: d,
157
- index: d,
160
+ e.value && e.value.content ? (a(!0), c(f, { key: 0 }, k(e.value.content, (n, v) => (a(), s(B(h[n.type]), C({
161
+ key: v,
162
+ index: v,
158
163
  component: n,
159
164
  prop: n,
160
165
  class: n.class,
161
166
  content: "content"
162
- }, b(n), { class: "mn-b-regular" }), null, 16, ["index", "component", "prop", "class"]))), 128)) : l("", !0)
167
+ }, D(n), { class: "mn-b-regular" }), null, 16, ["index", "component", "prop", "class"]))), 128)) : i("", !0)
163
168
  ])
164
169
  ]),
165
170
  _: 1
166
- }, 8, ["event", "owner", "user"])) : l("", !0),
167
- !i.value && e.value && !e.value.special ? (a(), o(V, {
171
+ }, 8, ["event", "owner", "user"])) : i("", !0),
172
+ !l.value && e.value && !e.value.special ? (a(), s(N, {
168
173
  key: 4,
169
174
  type: "event",
170
175
  target: e.value._id,
171
176
  owner: r.user._id
172
- }, null, 8, ["target", "owner"])) : l("", !0)
177
+ }, null, 8, ["target", "owner"])) : i("", !0)
173
178
  ]),
174
179
  _: 1
175
180
  })
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("vue-i18n");require("vue-router");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/reports/store/reports.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/auth.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/reactions.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/events/store/events.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/blogposts.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/spots/store/spots.cjs");const w=require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/categories.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/products.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/departments.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/invites.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/axios.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/node_modules/js-cookie/src/js.cookie.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/node_modules/vue-select/dist/vue-select.es.cjs");require("../../../../../../node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs");require("./SectionMainGuest.vue2.cjs");const k={id:"mainguest",class:"o-hidden bg-black t-white pos-relative radius-big gap-zero pos-relative cols-2"},_={class:"pd-big pos-relative flex-column flex w-100 h-100 gap-zero"},E={class:"mn-b-big"},V=["innerHTML"],N=["src"],B=["src"],M={style:{"min-height":"20rem"},class:"o-hidden pos-relative"},S=["src"],j={__name:"SectionMainGuest",props:{content:{type:Object}},setup(t){const o=e.ref(null);let r=!1;function q(){o.value.onplaying=function(){r=!0},o.value.onpause=function(){r=!1}}async function v(){if(o.value.paused&&!r)return o.value.play()}return e.onMounted(()=>{q(),v()}),(b,z)=>{var i,n,l,s,a,c,u,d,m,f,h,p,g,y;return e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",_,[e.createVNode(e.unref(w.default),{telegram:(n=(i=t.content)==null?void 0:i.socials)==null?void 0:n.telegram,facebook:(s=(l=t.content)==null?void 0:l.socials)==null?void 0:s.facebook,instagram:(c=(a=t.content)==null?void 0:a.socials)==null?void 0:c.instagram,twitter:(d=(u=t.content)==null?void 0:u.socials)==null?void 0:d.twitter,class:"mn-b-semi"},null,8,["telegram","facebook","instagram","twitter"]),e.createElementVNode("h2",E,e.toDisplayString((m=t.content)==null?void 0:m.title),1),e.createElementVNode("p",{class:"p-medium",innerHTML:(f=t.content)==null?void 0:f.description},null,8,V),e.renderSlot(b.$slots,"default"),(h=t.content)!=null&&h.soundcloud?(e.openBlock(),e.createElementBlock("iframe",{key:0,class:"radius-big o-hidden mn-t-medium",width:"100%",height:"200",scrolling:"no",frameborder:"no",allow:"autoplay",src:`https://w.soundcloud.com/player/?url=https%3A//soundcloud.com/${t.content.soundcloud}
2
2
  &color=%23ff5500&auto_play=false&hide_related=false
3
- &show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`},null,8,N)):e.createCommentVNode("",!0),(p=t.content)!=null&&p.spotify?(e.openBlock(),e.createElementBlock("iframe",{key:1,src:`https://open.spotify.com/embed/track/${(g=t.content)==null?void 0:g.spotify}?utm_source=generator`,width:"100%",height:"152",frameBorder:"0",allowfullscreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",class:"mn-t-big"},null,8,B)):e.createCommentVNode("",!0)]),e.createElementVNode("div",M,[e.createElementVNode("video",{src:(y=t.content)==null?void 0:y.video,itemprop:"video",type:"video/mp4",ref_key:"videoElement",ref:o,class:"pos-absolute pos-t-0 pos-l-0 w-100 h-100 object-fit-cover",preload:"",autoplay:"",muted:"",loop:"",playsinlineclass:"",playsinline:""},null,8,S)])])}}};exports.default=j;
3
+ &show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`},null,8,N)):e.createCommentVNode("",!0),(p=t.content)!=null&&p.spotify?(e.openBlock(),e.createElementBlock("iframe",{key:1,src:`https://open.spotify.com/embed/track/${(g=t.content)==null?void 0:g.spotify}?utm_source=generator`,width:"100%",height:"152",frameBorder:"0",allowfullscreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",class:"mn-t-thin radius-big o-hidden"},null,8,B)):e.createCommentVNode("",!0)]),e.createElementVNode("div",M,[e.createElementVNode("video",{src:(y=t.content)==null?void 0:y.video,itemprop:"video",type:"video/mp4",ref_key:"videoElement",ref:o,class:"pos-absolute pos-t-0 pos-l-0 w-100 h-100 object-fit-cover",preload:"",autoplay:"",muted:"",loop:"",playsinlineclass:"",playsinline:""},null,8,S)])])}}};exports.default=j;
@@ -89,7 +89,7 @@ const $ = {
89
89
  allowfullscreen: "",
90
90
  allow: "autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",
91
91
  loading: "lazy",
92
- class: "mn-t-big"
92
+ class: "mn-t-thin radius-big o-hidden"
93
93
  }, null, 8, L)) : w("", !0)
94
94
  ]),
95
95
  o("div", P, [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../node_modules/axios/lib/axios.cjs"),u=require("vue"),l=require("../../globals/store/globals.cjs"),s=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=u.reactive({all:[],filter:{tags:[],period:"",date:null},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",special:!1,specialData:{subtitle:null},cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}});async function i(a={}){a.params=a.params||{},a.params.skip=a.skip||0,a.params.limit=a.limit||9,a.params.tags=a.tags||[],a.phase&&(a.params={phase:a.phase}),a.url&&(a.params={url:a.url}),a.period&&(a.params.period=a.period),a.category&&(a.params.category=a.category),a.organization&&(a.params.organization=a.organization),a.date&&(a.params.date=a.date),a.participant&&(a.params.participant=a.participant),a.owner&&(a.params.owner=a.owner),a.creator&&(a.params.creator=a.creator),a.user&&(a.params.user=a.user),a.sortOrder&&(a.params.sortOrder=a.sortOrder),a.sortParam&&(a.params.sortParam=a.sortParam),a.params.skip=a.skip||0,a.params.limit=a.limit||10;try{console.log("Request params:"+a.params);const e=await s.get("/api/events/read",{params:a.params});return console.log(a.params),a.url?t(e.data,"current"):t(e.data,"all"),Promise.resolve(e.data)}catch(e){return l.setError(e),Promise.reject(e)}}async function n(a){return s.post("/api/events/create",a).then(e=>(t(e.data,"current"),Promise.resolve(e.data)),e=>(l.setError(e),Promise.reject(e)))}async function f(a){return s.post("/api/events/update",a).then(e=>(t(e.data,"current"),Promise.resolve(e.data)),e=>(l.setError(e),Promise.reject(e)))}async function g(a){return await s.post("/api/events/delete",{_id:a}).then(e=>{const c=r.all.findIndex(m=>m._id===a);return c!==-1&&r.all.splice(c,1),Promise.resolve(e.data)},e=>(l.setError(e),Promise.reject(e)))}function t(a,e){r[e]=a}function v(){r.current={_id:"",cover:"",url:"",phase:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}}u.watch(r,(a,e)=>{});exports.clean=v;exports.create=n;exports.read=i;exports.remove=g;exports.set=t;exports.state=r;exports.update=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../../../../node_modules/axios/lib/axios.cjs"),l=require("vue"),s=require("../../globals/store/globals.cjs"),c=m.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=l.reactive({all:[],filter:{tags:[],period:"",date:null},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",special:!1,specialData:{},cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}});async function d(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.phase&&(e.params={phase:e.phase}),e.url&&(e.params={url:e.url}),e.period&&(e.params.period=e.period),e.category&&(e.params.category=e.category),e.organization&&(e.params.organization=e.organization),e.date&&(e.params.date=e.date),e.participant&&(e.params.participant=e.participant),e.owner&&(e.params.owner=e.owner),e.creator&&(e.params.creator=e.creator),e.user&&(e.params.user=e.user),e.sortOrder&&(e.params.sortOrder=e.sortOrder),e.sortParam&&(e.params.sortParam=e.sortParam),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{console.log("Request params:"+e.params);const a=await c.get("/api/events/read",{params:e.params});return console.log(e.params),e.url?t(a.data,"current"):t(a.data,"all"),Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}}async function n(e){return c.post("/api/events/create",e).then(a=>(t(a.data,"current"),Promise.resolve(a.data)),a=>(s.setError(a),Promise.reject(a)))}async function g(e){return c.post("/api/events/update",e).then(a=>(t(a.data,"current"),Promise.resolve(a.data)),a=>(s.setError(a),Promise.reject(a)))}async function f(e){return await c.post("/api/events/delete",{_id:e}).then(a=>{const u=r.all.findIndex(i=>i._id===e);return u!==-1&&r.all.splice(u,1),Promise.resolve(a.data)},a=>(s.setError(a),Promise.reject(a)))}function t(e,a){r[a]=e}function v(){r.current={_id:"",cover:"",url:"",phase:"",name:"",special:!1,specialData:{subtitle:"",logos:[],video:"",ticketImage:"",ticketLinkStripe:"",ticketPrice:"",guestTitle:"",guestDescription:"",guestFacebook:"",guestInstagram:"",guestTwitter:"",guestTelegram:"",guestSoundcloud:"",guestSpotify:"",guestVideo:"",guests:[],lineup:[],lineupBackground:"",previousVideo:""},tags:[],date:{start:null,false:null},views:0,content:[]}}l.watch(r,(e,a)=>{});exports.clean=v;exports.create=n;exports.read=d;exports.remove=f;exports.set=t;exports.state=r;exports.update=g;
@@ -1,7 +1,7 @@
1
- import u from "../../../../node_modules/axios/lib/axios.js";
2
- import { reactive as d, watch as i } from "vue";
3
- import { setError as l } from "../../globals/store/globals.js";
4
- const c = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = d({
1
+ import i from "../../../../node_modules/axios/lib/axios.js";
2
+ import { reactive as m, watch as d } from "vue";
3
+ import { setError as s } from "../../globals/store/globals.js";
4
+ const c = i.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m({
5
5
  all: [],
6
6
  filter: {
7
7
  // query
@@ -22,9 +22,7 @@ const c = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = d
22
22
  current: {
23
23
  _id: "",
24
24
  special: !1,
25
- specialData: {
26
- subtitle: null
27
- },
25
+ specialData: {},
28
26
  cover: "",
29
27
  url: "",
30
28
  status: "",
@@ -38,47 +36,69 @@ const c = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = d
38
36
  content: []
39
37
  }
40
38
  });
41
- async function v(a = {}) {
42
- a.params = a.params || {}, a.params.skip = a.skip || 0, a.params.limit = a.limit || 9, a.params.tags = a.tags || [], a.phase && (a.params = { phase: a.phase }), a.url && (a.params = { url: a.url }), a.period && (a.params.period = a.period), a.category && (a.params.category = a.category), a.organization && (a.params.organization = a.organization), a.date && (a.params.date = a.date), a.participant && (a.params.participant = a.participant), a.owner && (a.params.owner = a.owner), a.creator && (a.params.creator = a.creator), a.user && (a.params.user = a.user), a.sortOrder && (a.params.sortOrder = a.sortOrder), a.sortParam && (a.params.sortParam = a.sortParam), a.params.skip = a.skip || 0, a.params.limit = a.limit || 10;
39
+ async function p(e = {}) {
40
+ e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 9, e.params.tags = e.tags || [], e.phase && (e.params = { phase: e.phase }), e.url && (e.params = { url: e.url }), e.period && (e.params.period = e.period), e.category && (e.params.category = e.category), e.organization && (e.params.organization = e.organization), e.date && (e.params.date = e.date), e.participant && (e.params.participant = e.participant), e.owner && (e.params.owner = e.owner), e.creator && (e.params.creator = e.creator), e.user && (e.params.user = e.user), e.sortOrder && (e.params.sortOrder = e.sortOrder), e.sortParam && (e.params.sortParam = e.sortParam), e.params.skip = e.skip || 0, e.params.limit = e.limit || 10;
43
41
  try {
44
- console.log("Request params:" + a.params);
45
- const r = await c.get("/api/events/read", { params: a.params });
46
- return console.log(a.params), a.url ? t(r.data, "current") : t(r.data, "all"), Promise.resolve(r.data);
47
- } catch (r) {
48
- return l(r), Promise.reject(r);
42
+ console.log("Request params:" + e.params);
43
+ const a = await c.get("/api/events/read", { params: e.params });
44
+ return console.log(e.params), e.url ? t(a.data, "current") : t(a.data, "all"), Promise.resolve(a.data);
45
+ } catch (a) {
46
+ return s(a), Promise.reject(a);
49
47
  }
50
48
  }
51
- async function P(a) {
52
- return c.post("/api/events/create", a).then(
53
- (r) => (t(r.data, "current"), Promise.resolve(r.data)),
54
- (r) => (l(r), Promise.reject(r))
49
+ async function v(e) {
50
+ return c.post("/api/events/create", e).then(
51
+ (a) => (t(a.data, "current"), Promise.resolve(a.data)),
52
+ (a) => (s(a), Promise.reject(a))
55
53
  );
56
54
  }
57
- async function p(a) {
58
- return c.post("/api/events/update", a).then(
59
- (r) => (t(r.data, "current"), Promise.resolve(r.data)),
60
- (r) => (l(r), Promise.reject(r))
55
+ async function P(e) {
56
+ return c.post("/api/events/update", e).then(
57
+ (a) => (t(a.data, "current"), Promise.resolve(a.data)),
58
+ (a) => (s(a), Promise.reject(a))
61
59
  );
62
60
  }
63
- async function h(a) {
64
- return await c.post("/api/events/delete", { _id: a }).then(
65
- (r) => {
66
- const s = e.all.findIndex((m) => m._id === a);
67
- return s !== -1 && e.all.splice(s, 1), Promise.resolve(r.data);
61
+ async function w(e) {
62
+ return await c.post("/api/events/delete", { _id: e }).then(
63
+ (a) => {
64
+ const l = r.all.findIndex((u) => u._id === e);
65
+ return l !== -1 && r.all.splice(l, 1), Promise.resolve(a.data);
68
66
  },
69
- (r) => (l(r), Promise.reject(r))
67
+ (a) => (s(a), Promise.reject(a))
70
68
  );
71
69
  }
72
- function t(a, r) {
73
- e[r] = a;
70
+ function t(e, a) {
71
+ r[a] = e;
74
72
  }
75
- function w() {
76
- e.current = {
73
+ function h() {
74
+ r.current = {
77
75
  _id: "",
78
76
  cover: "",
79
77
  url: "",
80
78
  phase: "",
81
79
  name: "",
80
+ special: !1,
81
+ specialData: {
82
+ subtitle: "",
83
+ logos: [],
84
+ video: "",
85
+ ticketImage: "",
86
+ ticketLinkStripe: "",
87
+ ticketPrice: "",
88
+ guestTitle: "",
89
+ guestDescription: "",
90
+ guestFacebook: "",
91
+ guestInstagram: "",
92
+ guestTwitter: "",
93
+ guestTelegram: "",
94
+ guestSoundcloud: "",
95
+ guestSpotify: "",
96
+ guestVideo: "",
97
+ guests: [],
98
+ lineup: [],
99
+ lineupBackground: "",
100
+ previousVideo: ""
101
+ },
82
102
  tags: [],
83
103
  date: {
84
104
  start: null,
@@ -88,14 +108,14 @@ function w() {
88
108
  content: []
89
109
  };
90
110
  }
91
- i(e, (a, r) => {
111
+ d(r, (e, a) => {
92
112
  });
93
113
  export {
94
- w as clean,
95
- P as create,
96
- v as read,
97
- h as remove,
114
+ h as clean,
115
+ v as create,
116
+ p as read,
117
+ w as remove,
98
118
  t as set,
99
- e as state,
100
- p as update
119
+ r as state,
120
+ P as update
101
121
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("vue-router"),f=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue.cjs");const b=require("../../../products/components/blocks/CardPosition.vue.cjs");require("../../../products/store/leftovers.cjs");require("../../../products/components/blocks/ListPositions.vue.cjs");const v=require("../sections/FormOrderDetails.vue.cjs"),r=require("../../store/orders.cjs"),E=require("../../../products/store/products.cjs");require("./EditOrder.vue2.cjs");const B=e.createElementVNode("header",{class:"mn-b-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Edit Order")],-1),x={class:"gap-thin flex-nowrap flex mn-b-semi"},C={class:"w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium"},w={class:"mn-b-small p-big"},P=e.createElementVNode("br",null,null,-1),q=e.createElementVNode("button",{class:"button"},"Подтвердить заказ",-1),S={class:"w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium"},T={class:"mn-b-semi p-big"},D=e.createElementVNode("br",null,null,-1),O=e.createElementVNode("button",{class:"button"},"Изменить статус оплаты",-1),R={key:0,class:"w-100"},A={class:"mn-thinw-100 flex-v-center flex block"},F={class:"p-big"},M={key:0,class:"p-big t-semi"},z={key:1,class:"p-big t-semi"},U={key:2,class:"p-big t-semi"},j={key:3},I={key:4},L={key:5},G=e.createElementVNode("button",{class:"mn-l-auto button"},"Запросить онлайн",-1),H={__name:"EditOrder",props:["showProduct"],setup(h){const N=g.useRoute(),k=h;k.showProduct=[];function c(t){r.actions.addProduct(t)}function V(t){r.actions.deleteProduct(t)}let y=e.reactive([]);e.toRefs(y),e.ref(!1);const s=e.ref([]);let o=e.ref({});e.onMounted(async()=>{await r.actions.fetchOrder(N.params.order),o.value=r.state.current;try{const t=await E.actions.read({organization:r.state.current.organization});console.log(t),s.value=t}catch{console.error("error")}});const n=e.computed(()=>100);return e.computed(()=>[]),(t,J)=>{var a,l,d,i,u,m,p;return e.openBlock(),e.createElementBlock(e.Fragment,null,[B,e.createElementVNode("section",x,[e.createElementVNode("div",C,[e.createElementVNode("p",w,[e.createTextVNode(" Статус заказа:"),P,e.createTextVNode(e.toDisplayString(e.unref(o).status),1)]),q]),e.createElementVNode("div",S,[e.createElementVNode("p",T,[e.createTextVNode("Статус оплаты:"),D,e.createTextVNode(e.toDisplayString((a=e.unref(o).payment)==null?void 0:a.status),1)]),O])]),e.createVNode(f.default,{title:"Add Position",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(b.default,{onAdd:c,products:s.value},null,8,["products"])]),_:1}),e.createVNode(f.default,{title:"Invetory Sheet",class:"mn-b-semi"},{default:e.withCtx(()=>[r.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",R," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.state.current.positions,(_,K)=>(e.openBlock(),e.createBlock(b.default,{key:_._id,product:_,products:s.value,onAdd:c,onDelete:V,onUpdate:t.updateProduct},null,8,["product","products","onUpdate"]))),128))]),_:1}),e.createVNode(v.default,{order:r.state.current,onCreate:t.handleCreate,class:"bg-grey pd-medium radius-big mn-b-semi"},null,8,["order","onCreate"]),e.createElementVNode("div",A,[e.createElementVNode("p",F,[e.createTextVNode("Сумма к оплате: "),((l=e.unref(o).info)==null?void 0:l.delivery)==="Самовывоз"?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(n.value/100)+" ₽",1)):e.createCommentVNode("",!0),((d=e.unref(o).info)==null?void 0:d.delivery)==="Курьером"?(e.openBlock(),e.createElementBlock("span",z,e.toDisplayString(n.value/100+350)+" ₽",1)):e.createCommentVNode("",!0),((i=e.unref(o).info)==null?void 0:i.delivery)==="Почтой"?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(n.value/100+550)+" ₽",1)):e.createCommentVNode("",!0),e.createTextVNode(" (Заказ "+e.toDisplayString(n.value/100)+" ₽ + доставка ",1),((u=e.unref(o).info)==null?void 0:u.delivery)==="Самовывоз"?(e.openBlock(),e.createElementBlock("span",j,"0")):e.createCommentVNode("",!0),((m=e.unref(o).info)==null?void 0:m.delivery)==="Курьером"?(e.openBlock(),e.createElementBlock("span",I,"350")):e.createCommentVNode("",!0),((p=e.unref(o).info)==null?void 0:p.delivery)==="Почтой"?(e.openBlock(),e.createElementBlock("span",L,"550")):e.createCommentVNode("",!0),e.createTextVNode(" ₽) ")]),G])],64)}}};exports.default=H;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("vue-router"),f=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue.cjs");const b=require("../../../products/components/blocks/CardPosition.vue.cjs");require("../../../products/store/leftovers.cjs");require("../../../products/components/blocks/ListPositions.vue.cjs");const v=require("../sections/FormOrderDetails.vue.cjs"),r=require("../../store/orders.cjs"),E=require("../../../products/store/products.cjs");require("./EditOrder.vue2.cjs");const B=e.createElementVNode("header",{class:"mn-b-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Edit Order")],-1),x={class:"gap-thin flex-nowrap flex mn-b-semi"},C={class:"w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium"},w={class:"mn-b-small p-big"},P=e.createElementVNode("br",null,null,-1),q=e.createElementVNode("button",{class:"button"},"Подтвердить заказ",-1),S={class:"w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium"},T={class:"mn-b-semi p-big"},D=e.createElementVNode("br",null,null,-1),O=e.createElementVNode("button",{class:"button"},"Изменить статус оплаты",-1),R={key:0,class:"w-100"},A={class:"mn-thinw-100 flex-v-center flex block"},F={class:"p-big"},M={key:0,class:"p-big t-semi"},U={key:1,class:"p-big t-semi"},j={key:2,class:"p-big t-semi"},z={key:3},I={key:4},L={key:5},G=e.createElementVNode("button",{class:"mn-l-auto button"},"Запросить онлайн",-1),H={__name:"EditOrder",props:["showProduct"],setup(h){const N=g.useRoute(),k=h;k.showProduct=[];function c(t){r.actions.addProduct(t)}function V(t){r.actions.deleteProduct(t)}let y=e.reactive([]);e.toRefs(y),e.ref(!1);const s=e.ref([]);let o=e.ref({});e.onMounted(async()=>{try{const t=await E.actions.read({organization:"65141c476cf9860013b49f6d"});console.log(t),s.value=t}catch{console.error("error")}await r.actions.fetchOrder(N.params.id),o.value=r.state.current});const n=e.computed(()=>100);return e.computed(()=>[]),(t,J)=>{var a,l,d,i,u,m,p;return e.openBlock(),e.createElementBlock(e.Fragment,null,[B,e.createElementVNode("section",x,[e.createElementVNode("div",C,[e.createElementVNode("p",w,[e.createTextVNode(" Статус заказа:"),P,e.createTextVNode(e.toDisplayString(e.unref(o).status),1)]),q]),e.createElementVNode("div",S,[e.createElementVNode("p",T,[e.createTextVNode("Статус оплаты:"),D,e.createTextVNode(e.toDisplayString((a=e.unref(o).payment)==null?void 0:a.status),1)]),O])]),e.createVNode(f.default,{title:"Add Position",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(b.default,{onAdd:c,products:s.value},null,8,["products"])]),_:1}),e.createVNode(f.default,{title:"Invetory Sheet",class:"mn-b-semi"},{default:e.withCtx(()=>[r.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",R," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.state.current.positions,(_,K)=>(e.openBlock(),e.createBlock(b.default,{key:_._id,product:_,products:s.value,onAdd:c,onDelete:V,onUpdate:t.updateProduct},null,8,["product","products","onUpdate"]))),128))]),_:1}),e.createVNode(v.default,{order:r.state.current,onCreate:t.handleCreate,class:"bg-grey pd-medium radius-big mn-b-semi"},null,8,["order","onCreate"]),e.createElementVNode("div",A,[e.createElementVNode("p",F,[e.createTextVNode("Сумма к оплате: "),((l=e.unref(o).info)==null?void 0:l.delivery)==="Самовывоз"?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(n.value/100)+" ₽",1)):e.createCommentVNode("",!0),((d=e.unref(o).info)==null?void 0:d.delivery)==="Курьером"?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(n.value/100+350)+" ₽",1)):e.createCommentVNode("",!0),((i=e.unref(o).info)==null?void 0:i.delivery)==="Почтой"?(e.openBlock(),e.createElementBlock("span",j,e.toDisplayString(n.value/100+550)+" ₽",1)):e.createCommentVNode("",!0),e.createTextVNode(" (Заказ "+e.toDisplayString(n.value/100)+" ₽ + доставка ",1),((u=e.unref(o).info)==null?void 0:u.delivery)==="Самовывоз"?(e.openBlock(),e.createElementBlock("span",z,"0")):e.createCommentVNode("",!0),((m=e.unref(o).info)==null?void 0:m.delivery)==="Курьером"?(e.openBlock(),e.createElementBlock("span",I,"350")):e.createCommentVNode("",!0),((p=e.unref(o).info)==null?void 0:p.delivery)==="Почтой"?(e.openBlock(),e.createElementBlock("span",L,"550")):e.createCommentVNode("",!0),e.createTextVNode(" ₽) ")]),G])],64)}}};exports.default=H;
@@ -1,4 +1,4 @@
1
- import { reactive as z, toRefs as D, ref as m, onMounted as S, computed as P, openBlock as o, createElementBlock as r, Fragment as C, createElementVNode as e, createTextVNode as i, toDisplayString as d, unref as n, createVNode as u, withCtx as N, createCommentVNode as a, renderList as T, createBlock as U } from "vue";
1
+ import { reactive as D, toRefs as S, ref as m, onMounted as T, computed as P, openBlock as o, createElementBlock as r, Fragment as C, createElementVNode as e, createTextVNode as i, toDisplayString as a, unref as n, createVNode as l, withCtx as N, createCommentVNode as d, renderList as U, createBlock as z } from "vue";
2
2
  import { useRoute as F } from "vue-router";
3
3
  import E from "../../../../components/Block/Block.vue.js";
4
4
  import "../../../../components/Field/Field.vue.js";
@@ -6,7 +6,7 @@ import V from "../../../products/components/blocks/CardPosition.vue.js";
6
6
  import "../../../products/store/leftovers.js";
7
7
  import "../../../products/components/blocks/ListPositions.vue.js";
8
8
  import I from "../sections/FormOrderDetails.vue.js";
9
- import { actions as _, state as c } from "../../store/orders.js";
9
+ import { actions as _, state as u } from "../../store/orders.js";
10
10
  import { actions as L } from "../../../products/store/products.js";
11
11
  import "./EditOrder.vue2.js";
12
12
  const M = /* @__PURE__ */ e("header", { class: "mn-b-medium flex-v-center flex-nowrap flex" }, [
@@ -23,36 +23,36 @@ const M = /* @__PURE__ */ e("header", { class: "mn-b-medium flex-v-center flex-n
23
23
  }, se = {
24
24
  key: 2,
25
25
  class: "p-big t-semi"
26
- }, re = { key: 3 }, ne = { key: 4 }, ie = { key: 5 }, ae = /* @__PURE__ */ e("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ke = {
26
+ }, re = { key: 3 }, ne = { key: 4 }, ie = { key: 5 }, de = /* @__PURE__ */ e("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ke = {
27
27
  __name: "EditOrder",
28
28
  props: ["showProduct"],
29
29
  setup($) {
30
30
  const A = F(), B = $;
31
31
  B.showProduct = [];
32
- function b(t) {
32
+ function f(t) {
33
33
  _.addProduct(t);
34
34
  }
35
35
  function O(t) {
36
36
  _.deleteProduct(t);
37
37
  }
38
- let R = z([]);
39
- D(R), m(!1);
38
+ let R = D([]);
39
+ S(R), m(!1);
40
40
  const p = m([]);
41
41
  let s = m({});
42
- S(async () => {
43
- await _.fetchOrder(A.params.order), s.value = c.current;
42
+ T(async () => {
44
43
  try {
45
44
  const t = await L.read({
46
- organization: c.current.organization
45
+ organization: "65141c476cf9860013b49f6d"
47
46
  });
48
47
  console.log(t), p.value = t;
49
48
  } catch {
50
49
  console.error("error");
51
50
  }
51
+ await _.fetchOrder(A.params.id), s.value = u.current;
52
52
  });
53
- const l = P(() => 100);
54
- return P(() => []), (t, de) => {
55
- var f, h, v, y, g, k, x;
53
+ const c = P(() => 100);
54
+ return P(() => []), (t, ae) => {
55
+ var b, h, v, y, g, k, x;
56
56
  return o(), r(C, null, [
57
57
  M,
58
58
  e("section", j, [
@@ -60,7 +60,7 @@ const M = /* @__PURE__ */ e("header", { class: "mn-b-medium flex-v-center flex-n
60
60
  e("p", G, [
61
61
  i(" Статус заказа:"),
62
62
  H,
63
- i(d(n(s).status), 1)
63
+ i(a(n(s).status), 1)
64
64
  ]),
65
65
  J
66
66
  ]),
@@ -68,58 +68,58 @@ const M = /* @__PURE__ */ e("header", { class: "mn-b-medium flex-v-center flex-n
68
68
  e("p", Q, [
69
69
  i("Статус оплаты:"),
70
70
  W,
71
- i(d((f = n(s).payment) == null ? void 0 : f.status), 1)
71
+ i(a((b = n(s).payment) == null ? void 0 : b.status), 1)
72
72
  ]),
73
73
  X
74
74
  ])
75
75
  ]),
76
- u(E, {
76
+ l(E, {
77
77
  title: "Add Position",
78
78
  class: "mn-b-semi"
79
79
  }, {
80
80
  default: N(() => [
81
- u(V, {
82
- onAdd: b,
81
+ l(V, {
82
+ onAdd: f,
83
83
  products: p.value
84
84
  }, null, 8, ["products"])
85
85
  ]),
86
86
  _: 1
87
87
  }),
88
- u(E, {
88
+ l(E, {
89
89
  title: "Invetory Sheet",
90
90
  class: "mn-b-semi"
91
91
  }, {
92
92
  default: N(() => [
93
- c.current.positions.length === 0 ? (o(), r("span", Y, " No positions added yet ")) : a("", !0),
94
- (o(!0), r(C, null, T(c.current.positions, (w, ce) => (o(), U(V, {
93
+ u.current.positions.length === 0 ? (o(), r("span", Y, " No positions added yet ")) : d("", !0),
94
+ (o(!0), r(C, null, U(u.current.positions, (w, ce) => (o(), z(V, {
95
95
  key: w._id,
96
96
  product: w,
97
97
  products: p.value,
98
- onAdd: b,
98
+ onAdd: f,
99
99
  onDelete: O,
100
100
  onUpdate: t.updateProduct
101
101
  }, null, 8, ["product", "products", "onUpdate"]))), 128))
102
102
  ]),
103
103
  _: 1
104
104
  }),
105
- u(I, {
106
- order: c.current,
105
+ l(I, {
106
+ order: u.current,
107
107
  onCreate: t.handleCreate,
108
108
  class: "bg-grey pd-medium radius-big mn-b-semi"
109
109
  }, null, 8, ["order", "onCreate"]),
110
110
  e("div", Z, [
111
111
  e("p", ee, [
112
112
  i("Сумма к оплате: "),
113
- ((h = n(s).info) == null ? void 0 : h.delivery) === "Самовывоз" ? (o(), r("span", te, d(l.value / 100) + " ₽", 1)) : a("", !0),
114
- ((v = n(s).info) == null ? void 0 : v.delivery) === "Курьером" ? (o(), r("span", oe, d(l.value / 100 + 350) + " ₽", 1)) : a("", !0),
115
- ((y = n(s).info) == null ? void 0 : y.delivery) === "Почтой" ? (o(), r("span", se, d(l.value / 100 + 550) + " ₽", 1)) : a("", !0),
116
- i(" (Заказ " + d(l.value / 100) + " ₽ + доставка ", 1),
117
- ((g = n(s).info) == null ? void 0 : g.delivery) === "Самовывоз" ? (o(), r("span", re, "0")) : a("", !0),
118
- ((k = n(s).info) == null ? void 0 : k.delivery) === "Курьером" ? (o(), r("span", ne, "350")) : a("", !0),
119
- ((x = n(s).info) == null ? void 0 : x.delivery) === "Почтой" ? (o(), r("span", ie, "550")) : a("", !0),
113
+ ((h = n(s).info) == null ? void 0 : h.delivery) === "Самовывоз" ? (o(), r("span", te, a(c.value / 100) + " ₽", 1)) : d("", !0),
114
+ ((v = n(s).info) == null ? void 0 : v.delivery) === "Курьером" ? (o(), r("span", oe, a(c.value / 100 + 350) + " ₽", 1)) : d("", !0),
115
+ ((y = n(s).info) == null ? void 0 : y.delivery) === "Почтой" ? (o(), r("span", se, a(c.value / 100 + 550) + " ₽", 1)) : d("", !0),
116
+ i(" (Заказ " + a(c.value / 100) + " ₽ + доставка ", 1),
117
+ ((g = n(s).info) == null ? void 0 : g.delivery) === "Самовывоз" ? (o(), r("span", re, "0")) : d("", !0),
118
+ ((k = n(s).info) == null ? void 0 : k.delivery) === "Курьером" ? (o(), r("span", ne, "350")) : d("", !0),
119
+ ((x = n(s).info) == null ? void 0 : x.delivery) === "Почтой" ? (o(), r("span", ie, "550")) : d("", !0),
120
120
  i(" ₽) ")
121
121
  ]),
122
- ae
122
+ de
123
123
  ])
124
124
  ], 64);
125
125
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../store/orders.cjs");const d=require("../../../../components/Block/Block.vue.cjs"),r=require("../../../../components/Field/Field.vue2.cjs"),n=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),s=require("../../../../components/Select/Select.vue2.cjs"),u=require("../../../../components/Address/Address.vue2.cjs"),o=require("../../../../components/Radio/Radio.vue.cjs"),m={class:"order-form col"},c=e.createElementVNode("p",{class:"mn-b-small"}," Prefer to chat instead of calling? Just drop your messenger info here: ",-1),f={class:"flex-nowrap flex"},p={class:"mn-b-small flex-nowrap flex"},y={class:"mn-b-small flex-nowrap flex"},v={__name:"FormOrderDetails",props:{order:Object},setup(l){return(i,t)=>(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(d.default,{title:"Personal Data",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createVNode(r.default,{field:l.order.user.name,"onUpdate:field":t[0]||(t[0]=a=>l.order.user.name=a),label:"Name*",placeholder:"Enter your name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),e.createVNode(n.default,{modelValue:l.order.user.phone,"onUpdate:modelValue":t[1]||(t[1]=a=>l.order.user.phone=a),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.phoneValidation,mode:"national",inputOptions:{placeholder:"Enter contact phone number"},class:"bg-white pd-small radius-small mn-b-thin"},null,8,["modelValue","validation"]),c,e.createElementVNode("div",f,[e.createVNode(s.default,{options:[{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"},{name:"Line",value:"line"}],select:l.order.user.messenger.type,placeholder:"Messenger",size:"small",class:"bg-white pd-medium radius-small mn-r-small"},null,8,["select"]),e.createVNode(r.default,{field:l.order.user.messenger.value,"onUpdate:field":t[2]||(t[2]=a=>l.order.user.messenger.value=a),placeholder:"Enter your contact here",class:"bg-white pd-medium radius-small w-100"},null,8,["field"])])]),_:1}),e.createVNode(d.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:e.withCtx(()=>[e.createElementVNode("div",p,[e.createVNode(o.default,{radio:l.order.delivery.type,"onUpdate:radio":t[3]||(t[3]=a=>l.order.delivery.type=a),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),e.createVNode(o.default,{radio:l.order.delivery.type,"onUpdate:radio":t[4]||(t[4]=a=>l.order.delivery.type=a),label:"Post",value:"Post",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"])]),e.createVNode(u.default,{apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,"onUpdate:address":t[5]||(t[5]=a=>l.order.delivery.address=a),label:"Address",placeholder:"Enter delivery address",class:"bg-white pd-medium radius-small w-100 mn-b-thin"},null,8,["address"]),e.createVNode(r.default,{field:l.order.comment,"onUpdate:field":t[6]||(t[6]=a=>l.order.comment=a),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1},8,["tooltip"]),e.createVNode(d.default,{title:"Payment"},{default:e.withCtx(()=>[e.createElementVNode("div",y,[e.createVNode(s.default,{select:l.order.payment.type,"onUpdate:select":t[7]||(t[7]=a=>l.order.payment.type=a),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1})]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),r=require("../../../globals/store/globals.cjs");require("../../store/orders.cjs");const a=require("../../../../components/Block/Block.vue.cjs"),o=require("../../../../components/Field/Field.vue2.cjs"),u=require("../../../../components/FieldPhone/FieldPhone2.vue.cjs"),s=require("../../../../components/Select/Select.vue2.cjs"),m=require("../../../../components/Address/Address.vue2.cjs"),c=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),n=require("../../../../components/Radio/Radio.vue.cjs"),y={class:"order-form col"},f=t.createElementVNode("p",{class:"mn-b-small"}," Prefer to chat instead of calling? Just drop your messenger info here: ",-1),v={class:"flex-nowrap flex"},b={class:"mn-b-small flex-nowrap flex"},p={class:"mn-b-small flex-nowrap flex"},g={__name:"FormOrderDetails",props:{order:Object},setup(l){const i=l;return t.onMounted(()=>{r.state.position&&(i.order.delivery.address=r.state.position.address),r.state.position&&(i.order.delivery.location=r.state.position.location)}),(w,e)=>(t.openBlock(),t.createElementBlock("div",y,[t.createVNode(a.default,{title:"Personal Data",class:"mn-b-thin"},{default:t.withCtx(()=>[t.createVNode(o.default,{field:l.order.user.name,"onUpdate:field":e[0]||(e[0]=d=>l.order.user.name=d),label:"Name*",placeholder:"Enter your name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),t.createVNode(u.default,{modelValue:l.order.user.phone,"onUpdate:modelValue":e[1]||(e[1]=d=>l.order.user.phone=d),onCountry:e[2]||(e[2]=d=>{l.order.user.number=d}),inputOptions:{placeholder:"Enter contact phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["modelValue"]),f,t.createElementVNode("div",v,[t.createVNode(s.default,{options:[{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"},{name:"Line",value:"line"}],"onUpdate:select":e[3]||(e[3]=d=>l.order.user.messenger.type=d.value),placeholder:"Messenger",size:"small",class:"bg-white pd-medium radius-small mn-r-small"}),t.createVNode(o.default,{field:l.order.user.messenger.value,"onUpdate:field":e[4]||(e[4]=d=>l.order.user.messenger.value=d),placeholder:"Enter your contact here",class:"bg-white pd-medium radius-small w-100"},null,8,["field"])])]),_:1}),t.createVNode(a.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:t.withCtx(()=>[t.createElementVNode("div",b,[t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[5]||(e[5]=d=>l.order.delivery.type=d),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[6]||(e[6]=d=>l.order.delivery.type=d),label:"Post",value:"Post",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"])]),t.createVNode(m.default,{label:"Address",apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium","onUpdate:location":e[7]||(e[7]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[8]||(e[8]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(c.default,{apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":e[9]||(e[9]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[10]||(e[10]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(o.default,{field:l.order.comment,"onUpdate:field":e[11]||(e[11]=d=>l.order.comment=d),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1},8,["tooltip"]),t.createVNode(a.default,{title:"Payment"},{default:t.withCtx(()=>[t.createElementVNode("div",p,[t.createVNode(s.default,{select:l.order.payment.type,"onUpdate:select":e[12]||(e[12]=d=>l.order.payment.type=d),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1})]))}};exports.default=g;