@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.
- 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/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/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +49 -47
- 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 +43 -42
- 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/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/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/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +95 -92
- 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.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
package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js
CHANGED
@@ -1,25 +1,26 @@
|
|
1
|
-
import { computed as y, openBlock as e, createElementBlock as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import I from "../../../icons/navigation/IconEdit.vue.js";
|
5
|
-
import "../elements/THC.vue2.js";
|
6
|
-
import C from "../elements/Price.vue.js";
|
1
|
+
import { computed as y, openBlock as e, createElementBlock as a, createElementVNode as r, createBlock as m, createCommentVNode as i, createVNode as l, toDisplayString as s, unref as u, Fragment as w, renderList as k, withCtx as x, createTextVNode as z } from "vue";
|
2
|
+
import I from "../../../../components/Button/Button.vue2.js";
|
3
|
+
import C from "../../../icons/navigation/IconEdit.vue.js";
|
7
4
|
import E from "../../../icons/placeholders/PlaceholderImage.vue.js";
|
8
|
-
import
|
9
|
-
import
|
10
|
-
|
5
|
+
import P from "../blocks/Images360.vue.js";
|
6
|
+
import T from "../blocks/ImagesThumbnails.vue.js";
|
7
|
+
import "../elements/THC.vue2.js";
|
8
|
+
import V from "../elements/Price.vue.js";
|
9
|
+
import { useI18n as $ } from "vue-i18n";
|
10
|
+
import { state as g, actions as j } from "../../../orders/store/shopcart.js";
|
11
|
+
const A = { class: "cols-2-1_2 w-100 gap-big" }, N = { class: "flex-nowrap flex-column flex pos-relative" }, R = { class: "h-100 h-max-50vh bg-grey radius-big o-hidden" }, S = ["src"], B = { class: "pos-relative w-100 h-100 flex-column flex-justify flex col" }, F = {
|
11
12
|
key: 0,
|
12
13
|
class: "t-main t-semi p-big"
|
13
|
-
},
|
14
|
+
}, L = { class: "w-100 h1-product mn-b-thin" }, q = {
|
14
15
|
key: 1,
|
15
16
|
class: "mn-b-semi"
|
16
|
-
},
|
17
|
+
}, O = {
|
17
18
|
key: 2,
|
18
19
|
class: "w-100 mn-b-medium t-transp"
|
19
|
-
},
|
20
|
+
}, D = {
|
20
21
|
key: 3,
|
21
22
|
class: "w-100 mn-b-medium t-transp"
|
22
|
-
},
|
23
|
+
}, U = { class: "cols-2 w-100 gap-small mn-b-semi" }, Y = { class: "w-100 pd-small radius-small bg-grey-transp-30 product-information" }, G = { class: "t-demi" }, H = { class: "max-w-33rem mobile-w-100 t-white gap-small cols-2" }, ot = {
|
23
24
|
__name: "SectionProduct",
|
24
25
|
props: {
|
25
26
|
product: {
|
@@ -31,7 +32,7 @@ const j = { class: "cols-2-1_2 w-100 gap-big" }, R = { class: "flex-nowrap flex-
|
|
31
32
|
}
|
32
33
|
},
|
33
34
|
setup(t) {
|
34
|
-
const f = t,
|
35
|
+
const f = t, n = y(() => f.product.images), b = {
|
35
36
|
messages: {
|
36
37
|
en: {
|
37
38
|
airecommend: "AI Recommends You",
|
@@ -46,43 +47,43 @@ const j = { class: "cols-2-1_2 w-100 gap-big" }, R = { class: "flex-nowrap flex-
|
|
46
47
|
fastorder: "Быстрый заказ"
|
47
48
|
}
|
48
49
|
}
|
49
|
-
}, { t:
|
50
|
-
function
|
51
|
-
return !(
|
50
|
+
}, { t: c } = $(b);
|
51
|
+
function p(o) {
|
52
|
+
return !(o.quantity > 0);
|
52
53
|
}
|
53
|
-
function v(
|
54
|
-
g.organization !==
|
54
|
+
function v(o) {
|
55
|
+
g.organization !== o.organization && (g.positions = [], g.organization = o.organization), j.addProductToCart(o, o.organization);
|
55
56
|
}
|
56
|
-
return (
|
57
|
-
|
58
|
-
|
59
|
-
t.product && t.product.image3d ? (e(),
|
57
|
+
return (o, h) => (e(), a("div", A, [
|
58
|
+
r("div", N, [
|
59
|
+
r("div", R, [
|
60
|
+
t.product && t.product.image3d ? (e(), m(P, {
|
60
61
|
key: 0,
|
61
62
|
class: "h-100 w-100",
|
62
63
|
imagePath: `/assets/images/products/${t.product.image3d}`,
|
63
64
|
imageCount: 36
|
64
65
|
}, null, 8, ["imagePath"])) : i("", !0),
|
65
|
-
|
66
|
+
n.value[0] && !t.product.image3d ? (e(), a("img", {
|
66
67
|
key: 1,
|
67
68
|
class: "h-100 bg-grey w-100",
|
68
69
|
style: { "object-fit": "contain" },
|
69
|
-
src: (
|
70
|
-
}, null, 8,
|
71
|
-
!
|
70
|
+
src: (o.FILE_SERVER_URL || "") + n.value[0]
|
71
|
+
}, null, 8, S)) : i("", !0),
|
72
|
+
!n.value[0] && !t.product.image3d ? (e(), m(E, {
|
72
73
|
key: 2,
|
73
74
|
class: "h-100 w-100",
|
74
75
|
style: { "object-fit": "cover" }
|
75
76
|
})) : i("", !0)
|
76
77
|
]),
|
77
|
-
|
78
|
+
n.value.length > 1 ? (e(), m(T, {
|
78
79
|
key: 0,
|
79
|
-
images:
|
80
|
+
images: n.value,
|
80
81
|
class: "mn-t-medium"
|
81
82
|
}, null, 8, ["images"])) : i("", !0)
|
82
83
|
]),
|
83
|
-
|
84
|
-
|
85
|
-
onClick:
|
84
|
+
r("div", B, [
|
85
|
+
l(C, {
|
86
|
+
onClick: h[0] || (h[0] = (d) => o.$router.push({
|
86
87
|
name: "ProductEdit",
|
87
88
|
params: {
|
88
89
|
_id: t.product.organization,
|
@@ -91,33 +92,42 @@ const j = { class: "cols-2-1_2 w-100 gap-big" }, R = { class: "flex-nowrap flex-
|
|
91
92
|
})),
|
92
93
|
class: "pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
93
94
|
}),
|
94
|
-
t.recommendation ? (e(),
|
95
|
-
|
96
|
-
|
95
|
+
t.recommendation ? (e(), a("h2", F, s(u(c)("airecommend")), 1)) : i("", !0),
|
96
|
+
r("h1", L, s(t.product.name), 1),
|
97
|
+
l(V, {
|
97
98
|
product: t.product,
|
98
99
|
size: "big",
|
99
100
|
class: "mn-b-semi"
|
100
101
|
}, null, 8, ["product"]),
|
101
|
-
t.recommendation ? (e(),
|
102
|
-
t.product.description && !t.product.localization < 1 && !t.recommendation ? (e(),
|
103
|
-
t.product.localization && t.product.localization.length > 1 && !t.recommendation ? (e(),
|
104
|
-
|
105
|
-
t.product.information.length > 0 ? (e(!0),
|
106
|
-
|
107
|
-
|
102
|
+
t.recommendation ? (e(), a("h3", q, s(t.recommendation), 1)) : i("", !0),
|
103
|
+
t.product.description && !t.product.localization < 1 && !t.recommendation ? (e(), a("p", O, s(t.product.description), 1)) : i("", !0),
|
104
|
+
t.product.localization && t.product.localization.length > 1 && !t.recommendation ? (e(), a("p", D, s(u(c)("description")), 1)) : i("", !0),
|
105
|
+
r("div", U, [
|
106
|
+
t.product.information.length > 0 ? (e(!0), a(w, { key: 0 }, k(t.product.information, (d) => (e(), a("div", Y, [
|
107
|
+
r("p", G, s(d.name), 1),
|
108
|
+
r("p", null, s(d.value), 1)
|
108
109
|
]))), 256)) : i("", !0)
|
109
110
|
]),
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
111
|
+
r("div", H, [
|
112
|
+
l(I, {
|
113
|
+
submit: (d) => v(t.product),
|
114
|
+
disabled: p(t.product),
|
115
|
+
text: {
|
116
|
+
success: " ✔ Added",
|
117
|
+
error: "error"
|
118
|
+
},
|
114
119
|
class: "w-100 mn-r-small bg-main button"
|
115
|
-
},
|
120
|
+
}, {
|
121
|
+
default: x(() => [
|
122
|
+
z(s(u(c)("addtoorder")), 1)
|
123
|
+
]),
|
124
|
+
_: 1
|
125
|
+
}, 8, ["submit", "disabled"])
|
116
126
|
])
|
117
127
|
])
|
118
128
|
]));
|
119
129
|
}
|
120
130
|
};
|
121
131
|
export {
|
122
|
-
|
132
|
+
ot as default
|
123
133
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),i=o.default.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingridients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await i.post("/api/products/create",a).then(c=>(d(c.data,"current"),Promise.resolve(c.data)),c=>(s.setError(c),Promise.reject(c)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),r.sort="createdAt",r.skip=e.skip||0,r.limit=e.limit||10,console.log(r);try{const a=await i.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await i.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await i.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return console.log(e),i.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(console.log(r),s.setError(r),Promise.reject(r)))},async fetchProducts(){return await i.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await i.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await i.get("/api/products").then(e=>{let r=e.data.filter(function(a,c){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,c){return a[t.sort.current]>c[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<c[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await i.get("/api/products/"+e);return console.log(r),t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await i.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}};function d(e,r){t[r]=e}n.watch(t,(e,r)=>{});exports.actions=u;exports.state=t;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { reactive as n, watch as o } from "vue";
|
2
2
|
import u from "../../../../node_modules/axios/lib/axios.js";
|
3
|
-
import { setError as
|
4
|
-
const
|
3
|
+
import { setError as i } from "../../globals/store/globals.js";
|
4
|
+
const c = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n({
|
5
5
|
all: [],
|
6
6
|
current: {
|
7
7
|
recommendation: !1,
|
@@ -26,76 +26,76 @@ const s = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n
|
|
26
26
|
...t,
|
27
27
|
organization: e
|
28
28
|
};
|
29
|
-
return await
|
30
|
-
(
|
31
|
-
(
|
29
|
+
return await c.post("/api/products/create", a).then(
|
30
|
+
(s) => (d(s.data, "current"), Promise.resolve(s.data)),
|
31
|
+
(s) => (i(s), Promise.reject(s))
|
32
32
|
);
|
33
33
|
},
|
34
34
|
async read(e = {}) {
|
35
35
|
let t = {};
|
36
36
|
e._id && (t._id = e._id), e.category && (t.category = e.category), e.organization && (t.organization = e.organization), e.count && (t.count = e.count), e.categories && (t.categories = e.categories), e.prices && (t.prices = e.prices), e.delivery && (t.delivery = e.delivery), e.status && (t.status = e.status), t.sort = "createdAt", t.skip = e.skip || 0, t.limit = e.limit || 10, console.log(t);
|
37
37
|
try {
|
38
|
-
const a = await
|
38
|
+
const a = await c.get("/api/products/read", { params: t });
|
39
39
|
return e._id ? (r.current = { ...a.data[0] }, Promise.resolve(a.data[0])) : Promise.resolve(a.data);
|
40
40
|
} catch (a) {
|
41
|
-
return
|
41
|
+
return i(a), Promise.reject(a);
|
42
42
|
}
|
43
43
|
},
|
44
44
|
async update(e, t) {
|
45
|
-
return await
|
45
|
+
return await c.post("/api/products/" + e, t).then(
|
46
46
|
(a) => Promise.resolve(a.data),
|
47
|
-
(a) => (
|
47
|
+
(a) => (i(a), Promise.reject(a))
|
48
48
|
);
|
49
49
|
},
|
50
50
|
async deleteProduct(e) {
|
51
|
-
return await
|
51
|
+
return await c.delete("/api/products/" + e).then(
|
52
52
|
(t) => Promise.resolve(t.data),
|
53
|
-
(t) => (
|
53
|
+
(t) => (i(t), Promise.reject(t))
|
54
54
|
);
|
55
55
|
},
|
56
56
|
async submitMood(e = null) {
|
57
|
-
return console.log(e),
|
57
|
+
return console.log(e), c.post("/api/product/recommended", { mood: e }).then(
|
58
58
|
(t) => (r.current = t.data.product, r.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
|
59
|
-
(t) => (console.log(t),
|
59
|
+
(t) => (console.log(t), i(t), Promise.reject(t))
|
60
60
|
);
|
61
61
|
},
|
62
62
|
async fetchProducts() {
|
63
|
-
return await
|
63
|
+
return await c.get("/api/products/read").then(
|
64
64
|
(e) => (r.all = e.data, Promise.resolve(e.data)),
|
65
|
-
(e) => (
|
65
|
+
(e) => (i(e), Promise.reject(e))
|
66
66
|
);
|
67
67
|
},
|
68
68
|
async fetchProductsPopular() {
|
69
|
-
return await
|
69
|
+
return await c.get("/api/products/popular").then(
|
70
70
|
(e) => (r.popular = e.data, Promise.resolve(e.data)),
|
71
|
-
(e) => (
|
71
|
+
(e) => (i(e), Promise.reject(e))
|
72
72
|
);
|
73
73
|
},
|
74
74
|
async fetchProductsPublished() {
|
75
|
-
return await
|
75
|
+
return await c.get("/api/products").then(
|
76
76
|
(e) => {
|
77
|
-
let t = e.data.filter(function(a,
|
77
|
+
let t = e.data.filter(function(a, s) {
|
78
78
|
return a.status !== "unpublished";
|
79
79
|
});
|
80
|
-
return r.all = t, r.filtered = t.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(a,
|
81
|
-
return a[r.sort.current] >
|
80
|
+
return r.all = t, r.filtered = t.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(a, s) {
|
81
|
+
return a[r.sort.current] > s[r.sort.current] ? r.sort.ascending ? 1 : -1 : a[r.sort.current] < s[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
|
82
82
|
}), Promise.resolve(e.data);
|
83
83
|
},
|
84
|
-
(e) => (
|
84
|
+
(e) => (i(e), Promise.reject(e))
|
85
85
|
);
|
86
86
|
},
|
87
87
|
async fetchProduct(e) {
|
88
88
|
try {
|
89
|
-
const t = await
|
89
|
+
const t = await c.get("/api/products/" + e);
|
90
90
|
return console.log(t), r.current = t.data[0], Promise.resolve(t.data[0]);
|
91
91
|
} catch (t) {
|
92
|
-
return
|
92
|
+
return i(t), Promise.reject(t);
|
93
93
|
}
|
94
94
|
},
|
95
95
|
async fetchProductPopular() {
|
96
|
-
return await
|
96
|
+
return await c.get("/api/products").then(
|
97
97
|
(e) => (r.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
|
98
|
-
(e) => (
|
98
|
+
(e) => (i(e), Promise.reject(e))
|
99
99
|
);
|
100
100
|
}
|
101
101
|
};
|