@ozdao/prometheus-framework 0.2.36 → 0.2.37
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +42 -52
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +61 -2
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +2 -61
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +2 -49
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +49 -2
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +39 -242
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +373 -0
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +4 -0
- package/dist/prometheus-framework/src/components/FieldPhone/click-outside.cjs +1 -2
- package/dist/prometheus-framework/src/components/FieldPhone/click-outside.js +13 -13
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +111 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +49 -47
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +45 -44
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +61 -56
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +59 -39
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +85 -55
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +30 -38
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +31 -21
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +96 -93
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +54 -74
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +58 -48
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +26 -26
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +18 -18
- package/dist/prometheus-framework.es.js +507 -493
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/globals/store/globals.js +0 -1
@@ -1,7 +1,7 @@
|
|
1
|
-
import
|
2
|
-
import { reactive as
|
3
|
-
import { setError as
|
4
|
-
const c =
|
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
|
42
|
-
|
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:" +
|
45
|
-
const
|
46
|
-
return console.log(
|
47
|
-
} catch (
|
48
|
-
return
|
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
|
52
|
-
return c.post("/api/events/create",
|
53
|
-
(
|
54
|
-
(
|
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
|
58
|
-
return c.post("/api/events/update",
|
59
|
-
(
|
60
|
-
(
|
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
|
64
|
-
return await c.post("/api/events/delete", { _id:
|
65
|
-
(
|
66
|
-
const
|
67
|
-
return
|
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
|
-
(
|
67
|
+
(a) => (s(a), Promise.reject(a))
|
70
68
|
);
|
71
69
|
}
|
72
|
-
function t(
|
73
|
-
|
70
|
+
function t(e, a) {
|
71
|
+
r[a] = e;
|
74
72
|
}
|
75
|
-
function
|
76
|
-
|
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
|
-
|
111
|
+
d(r, (e, a) => {
|
92
112
|
});
|
93
113
|
export {
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
114
|
+
h as clean,
|
115
|
+
v as create,
|
116
|
+
p as read,
|
117
|
+
w as remove,
|
98
118
|
t as set,
|
99
|
-
|
100
|
-
|
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"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},x={key:0,class:"w-4r i-thin"},C={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},N=["src"],$={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",C,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,N))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
|
@@ -2,7 +2,7 @@ import { openBlock as t, createElementBlock as i, createElementVNode as l, withM
|
|
2
2
|
import { useRouter as v } from "vue-router";
|
3
3
|
import p from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
|
4
4
|
import E from "../../../reports/components/sections/FormReport.vue.js";
|
5
|
-
import R from "../../../../components/Dropdown/Dropdown.
|
5
|
+
import R from "../../../../components/Dropdown/Dropdown.vue2.js";
|
6
6
|
import "../../../../components/Button/Button.vue.js";
|
7
7
|
import "../../../auth/store/auth.js";
|
8
8
|
import "../../../organizations/store/memberships.js";
|
@@ -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"},
|
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
|
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
|
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 },
|
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
|
32
|
+
function f(t) {
|
33
33
|
_.addProduct(t);
|
34
34
|
}
|
35
35
|
function O(t) {
|
36
36
|
_.deleteProduct(t);
|
37
37
|
}
|
38
|
-
let R =
|
39
|
-
|
38
|
+
let R = D([]);
|
39
|
+
S(R), m(!1);
|
40
40
|
const p = m([]);
|
41
41
|
let s = m({});
|
42
|
-
|
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:
|
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
|
54
|
-
return P(() => []), (t,
|
55
|
-
var
|
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(
|
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(
|
71
|
+
i(a((b = n(s).payment) == null ? void 0 : b.status), 1)
|
72
72
|
]),
|
73
73
|
X
|
74
74
|
])
|
75
75
|
]),
|
76
|
-
|
76
|
+
l(E, {
|
77
77
|
title: "Add Position",
|
78
78
|
class: "mn-b-semi"
|
79
79
|
}, {
|
80
80
|
default: N(() => [
|
81
|
-
|
82
|
-
onAdd:
|
81
|
+
l(V, {
|
82
|
+
onAdd: f,
|
83
83
|
products: p.value
|
84
84
|
}, null, 8, ["products"])
|
85
85
|
]),
|
86
86
|
_: 1
|
87
87
|
}),
|
88
|
-
|
88
|
+
l(E, {
|
89
89
|
title: "Invetory Sheet",
|
90
90
|
class: "mn-b-semi"
|
91
91
|
}, {
|
92
92
|
default: N(() => [
|
93
|
-
|
94
|
-
(o(!0), r(C, null,
|
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:
|
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
|
-
|
106
|
-
order:
|
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,
|
114
|
-
((v = n(s).info) == null ? void 0 : v.delivery) === "Курьером" ? (o(), r("span", oe,
|
115
|
-
((y = n(s).info) == null ? void 0 : y.delivery) === "Почтой" ? (o(), r("span", se,
|
116
|
-
i(" (Заказ " +
|
117
|
-
((g = n(s).info) == null ? void 0 : g.delivery) === "Самовывоз" ? (o(), r("span", re, "0")) :
|
118
|
-
((k = n(s).info) == null ? void 0 : k.delivery) === "Курьером" ? (o(), r("span", ne, "350")) :
|
119
|
-
((x = n(s).info) == null ? void 0 : x.delivery) === "Почтой" ? (o(), r("span", ie, "550")) :
|
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
|
-
|
122
|
+
de
|
123
123
|
])
|
124
124
|
], 64);
|
125
125
|
};
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
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;
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js
CHANGED
@@ -1,59 +1,71 @@
|
|
1
|
-
import { openBlock as
|
1
|
+
import { onMounted as y, openBlock as p, createElementBlock as f, createVNode as d, withCtx as a, createElementVNode as o } from "vue";
|
2
|
+
import { state as t } from "../../../globals/store/globals.js";
|
2
3
|
import "../../store/orders.js";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
|
4
|
+
import i from "../../../../components/Block/Block.vue.js";
|
5
|
+
import s from "../../../../components/Field/Field.vue2.js";
|
6
|
+
import v from "../../../../components/FieldPhone/FieldPhone2.vue.js";
|
7
|
+
import m from "../../../../components/Select/Select.vue2.js";
|
8
|
+
import b from "../../../../components/Address/Address.vue2.js";
|
9
|
+
import c from "../../../../components/LocationMarker/LocationMarker.vue2.js";
|
10
|
+
import u from "../../../../components/Radio/Radio.vue.js";
|
11
|
+
const g = { class: "order-form col" }, w = /* @__PURE__ */ o("p", { class: "mn-b-small" }, " Prefer to chat instead of calling? Just drop your messenger info here: ", -1), h = { class: "flex-nowrap flex" }, D = { class: "mn-b-small flex-nowrap flex" }, U = { class: "mn-b-small flex-nowrap flex" }, B = {
|
10
12
|
__name: "FormOrderDetails",
|
11
13
|
props: {
|
12
14
|
order: Object
|
13
15
|
},
|
14
|
-
setup(
|
15
|
-
|
16
|
-
|
16
|
+
setup(l) {
|
17
|
+
const n = l;
|
18
|
+
return y(() => {
|
19
|
+
t.position && (n.order.delivery.address = t.position.address), t.position && (n.order.delivery.location = t.position.location);
|
20
|
+
}), (x, e) => (p(), f("div", g, [
|
21
|
+
d(i, {
|
17
22
|
title: "Personal Data",
|
18
23
|
class: "mn-b-thin"
|
19
24
|
}, {
|
20
|
-
default:
|
21
|
-
|
22
|
-
field:
|
23
|
-
"onUpdate:field":
|
25
|
+
default: a(() => [
|
26
|
+
d(s, {
|
27
|
+
field: l.order.user.name,
|
28
|
+
"onUpdate:field": e[0] || (e[0] = (r) => l.order.user.name = r),
|
24
29
|
label: "Name*",
|
25
30
|
placeholder: "Enter your name",
|
26
31
|
class: "bg-white pd-medium radius-small mn-b-thin"
|
27
32
|
}, null, 8, ["field"]),
|
28
|
-
|
29
|
-
modelValue:
|
30
|
-
"onUpdate:modelValue":
|
33
|
+
d(v, {
|
34
|
+
modelValue: l.order.user.phone,
|
35
|
+
"onUpdate:modelValue": e[1] || (e[1] = (r) => l.order.user.phone = r),
|
36
|
+
onCountry: e[2] || (e[2] = (r) => {
|
37
|
+
l.order.user.number = r;
|
38
|
+
}),
|
39
|
+
inputOptions: {
|
40
|
+
placeholder: "Enter contact phone number",
|
41
|
+
type: "tel"
|
42
|
+
},
|
43
|
+
defaultCountry: "TH",
|
44
|
+
validCharactersOnly: !0,
|
31
45
|
dropdownOptions: {
|
32
46
|
showDialCodeInSelection: !0,
|
33
47
|
showFlags: !0,
|
34
48
|
showDialCodeInList: !0
|
35
49
|
},
|
36
|
-
validation: m.phoneValidation,
|
37
50
|
mode: "national",
|
38
|
-
inputOptions: { placeholder: "Enter contact phone number" },
|
39
51
|
class: "bg-white pd-small radius-small mn-b-thin"
|
40
|
-
}, null, 8, ["modelValue"
|
41
|
-
|
42
|
-
|
43
|
-
|
52
|
+
}, null, 8, ["modelValue"]),
|
53
|
+
w,
|
54
|
+
o("div", h, [
|
55
|
+
d(m, {
|
44
56
|
options: [
|
45
57
|
{ name: "Telegram", value: "telegram" },
|
46
58
|
{ name: "WhatsApp", value: "whatsapp" },
|
47
59
|
{ name: "Line", value: "line" }
|
48
60
|
],
|
49
|
-
select: e.order.user.messenger.type,
|
61
|
+
"onUpdate:select": e[3] || (e[3] = (r) => l.order.user.messenger.type = r.value),
|
50
62
|
placeholder: "Messenger",
|
51
63
|
size: "small",
|
52
64
|
class: "bg-white pd-medium radius-small mn-r-small"
|
53
|
-
}
|
54
|
-
|
55
|
-
field:
|
56
|
-
"onUpdate:field":
|
65
|
+
}),
|
66
|
+
d(s, {
|
67
|
+
field: l.order.user.messenger.value,
|
68
|
+
"onUpdate:field": e[4] || (e[4] = (r) => l.order.user.messenger.value = r),
|
57
69
|
placeholder: "Enter your contact here",
|
58
70
|
class: "bg-white pd-medium radius-small w-100"
|
59
71
|
}, null, 8, ["field"])
|
@@ -61,39 +73,57 @@ const c = { class: "order-form col" }, h = /* @__PURE__ */ d("p", { class: "mn-b
|
|
61
73
|
]),
|
62
74
|
_: 1
|
63
75
|
}),
|
64
|
-
|
76
|
+
d(i, {
|
65
77
|
title: "Delivery",
|
66
78
|
class: "mn-b-thin",
|
67
79
|
tooltip: "Delivery by mail takes 3-5 days."
|
68
80
|
}, {
|
69
|
-
default:
|
70
|
-
|
71
|
-
|
72
|
-
radio:
|
73
|
-
"onUpdate:radio":
|
81
|
+
default: a(() => [
|
82
|
+
o("div", D, [
|
83
|
+
d(u, {
|
84
|
+
radio: l.order.delivery.type,
|
85
|
+
"onUpdate:radio": e[5] || (e[5] = (r) => l.order.delivery.type = r),
|
74
86
|
label: "Courier",
|
75
87
|
value: "courier",
|
76
88
|
class: "bg-white pd-medium radius-small w-100 mn-r-small"
|
77
89
|
}, null, 8, ["radio"]),
|
78
|
-
|
79
|
-
radio:
|
80
|
-
"onUpdate:radio":
|
90
|
+
d(u, {
|
91
|
+
radio: l.order.delivery.type,
|
92
|
+
"onUpdate:radio": e[6] || (e[6] = (r) => l.order.delivery.type = r),
|
81
93
|
label: "Post",
|
82
94
|
value: "Post",
|
83
95
|
class: "bg-white pd-medium radius-small w-100 mn-r-small"
|
84
96
|
}, null, 8, ["radio"])
|
85
97
|
]),
|
86
|
-
|
87
|
-
apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
|
88
|
-
address: e.order.delivery.address,
|
89
|
-
"onUpdate:address": l[5] || (l[5] = (r) => e.order.delivery.address = r),
|
98
|
+
d(b, {
|
90
99
|
label: "Address",
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
"onUpdate:
|
100
|
+
apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
|
101
|
+
address: l.order.delivery.address,
|
102
|
+
location: l.order.delivery.location,
|
103
|
+
placeholder: "Enter your address",
|
104
|
+
class: "bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium",
|
105
|
+
"onUpdate:location": e[7] || (e[7] = (r) => {
|
106
|
+
l.order.delivery.location = r;
|
107
|
+
}),
|
108
|
+
"onUpdate:address": e[8] || (e[8] = (r) => {
|
109
|
+
l.order.delivery.address = r;
|
110
|
+
})
|
111
|
+
}, null, 8, ["address", "location"]),
|
112
|
+
d(c, {
|
113
|
+
apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
|
114
|
+
address: l.order.delivery.address,
|
115
|
+
location: l.order.delivery.location,
|
116
|
+
class: "mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden",
|
117
|
+
"onUpdate:location": e[9] || (e[9] = (r) => {
|
118
|
+
l.order.delivery.location = r;
|
119
|
+
}),
|
120
|
+
"onUpdate:address": e[10] || (e[10] = (r) => {
|
121
|
+
l.order.delivery.address = r;
|
122
|
+
})
|
123
|
+
}, null, 8, ["address", "location"]),
|
124
|
+
d(s, {
|
125
|
+
field: l.order.comment,
|
126
|
+
"onUpdate:field": e[11] || (e[11] = (r) => l.order.comment = r),
|
97
127
|
placeholder: "Comments regarding the address (apartment unit, floor level, building section)",
|
98
128
|
type: "textarea",
|
99
129
|
class: "bg-white pd-medium radius-small"
|
@@ -101,12 +131,12 @@ const c = { class: "order-form col" }, h = /* @__PURE__ */ d("p", { class: "mn-b
|
|
101
131
|
]),
|
102
132
|
_: 1
|
103
133
|
}, 8, ["tooltip"]),
|
104
|
-
|
105
|
-
default:
|
106
|
-
|
107
|
-
|
108
|
-
select:
|
109
|
-
"onUpdate:select":
|
134
|
+
d(i, { title: "Payment" }, {
|
135
|
+
default: a(() => [
|
136
|
+
o("div", U, [
|
137
|
+
d(m, {
|
138
|
+
select: l.order.payment.type,
|
139
|
+
"onUpdate:select": e[12] || (e[12] = (r) => l.order.payment.type = r),
|
110
140
|
property: "value",
|
111
141
|
options: [
|
112
142
|
{ name: "Cash On Delivery", value: "cash" },
|
@@ -125,5 +155,5 @@ const c = { class: "order-form col" }, h = /* @__PURE__ */ d("p", { class: "mn-b
|
|
125
155
|
}
|
126
156
|
};
|
127
157
|
export {
|
128
|
-
|
158
|
+
B as default
|
129
159
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),n=l.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=c.reactive({all:[],current:{_id:"",organization:"",positions:[],status:null,comment:"",user:{_id:null,name:"",phone:null,messenger:{type:"",value:""}},payment:{type:"",status:""},delivery:{type:null,address:"",status:""}}}),d={async create(e,t){try{r.current.positions=e,r.current.organization=t;const a=await n.post("/api/orders/create",r.current);return r.all.push(a.data),a.data}catch(a){s.setError(a)}},async fetchOrder(e){try{const t=await n.get(`/api/orders/${e}`);return r.current=t.data,console.log(t.data),t.data}catch(t){throw s.setError(t),err}},async read(e){try{const t=await n.get("/api/orders/read");return r.all=t.data,t.data}catch(t){throw s.setError(t),t}},async update(e){try{const t=await n.post(`/api/orders/${e._id}`,e),a=r.all.findIndex(o=>o._id===e._id);return a!==-1&&(r.all[a]=t.data),t.data}catch(t){s.setError(t)}},async delete(e){try{await n.delete(`/api/orders/${e}`),r.all=r.all.filter(t=>t._id!==e)}catch(t){s.setError(t)}},async changePaymentStatus(e,t){try{const a=await n.post(`/api/orders/payment/${e}`,{status:t}),o=r.all.findIndex(i=>i._id===e);o!==-1&&(r.all[o]=a.data)}catch(a){s.setError(a)}}};c.watch(r,(e,t)=>{});exports.actions=d;exports.state=r;
|