@ozdao/prometheus-framework 0.2.91 → 0.2.93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/events.server.js +19 -9
- package/dist/events.server.mjs +19 -9
- package/dist/main-CX2ISR43.mjs +13629 -0
- package/dist/main-cffh4bbv.js +92 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +32 -18
- package/dist/orders.server.mjs +32 -18
- package/dist/organizations.server.js +2 -1
- package/dist/organizations.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +14 -48
- 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 +1 -1
- 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 +85 -25
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- 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 +74 -63
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.js +74 -0
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/landing.client.js +4 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +28 -28
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +7 -9
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +27 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +46 -43
- 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 +162 -168
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
- 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/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +37 -26
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.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 +14 -15
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
- 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/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-CQQEUA9l.js +1 -0
- package/dist/web-D2Em-p-C.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +23 -34
- package/src/components/LocationMarker/LocationMarker.vue +6 -1
- package/src/components/LocationSelection/LocationSelection.vue +4 -0
- package/src/components/Map/Map.vue +29 -15
- package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
- package/src/modules/events/components/layouts/layoutEvents.vue +2 -59
- package/src/modules/events/components/pages/Events.vue +106 -23
- package/src/modules/events/controllers/events.controller.js +10 -7
- package/src/modules/globals/components/blocks/CardHeader.vue +31 -6
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
- package/src/modules/landing/components/pages/Farming.vue +226 -0
- package/src/modules/landing/components/pages/Governance.vue +3 -5
- package/src/modules/landing/components/pages/Home.vue +0 -3
- package/src/modules/landing/components/pages/Hotel.vue +1 -3
- package/src/modules/landing/components/pages/Page.vue +0 -3
- package/src/modules/landing/components/sections/Examples.vue +4 -56
- package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
- package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
- package/src/modules/landing/landing.client.js +3 -1
- package/src/modules/landing/router/landing.js +11 -0
- package/src/modules/marketplace/components/sections/Filters.vue +26 -23
- package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
- package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
- package/src/modules/orders/components/pages/Order.vue +2 -6
- package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
- package/src/modules/orders/components/pages/Orders.vue +60 -11
- package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
- package/src/modules/orders/components/sections/SubscribeNewsletter.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +29 -18
- package/src/modules/orders/models/order.model.js +8 -2
- package/src/modules/orders/router/orders.backoffice.router.js +3 -5
- package/src/modules/orders/router/orders.router.js +2 -2
- package/src/modules/orders/store/orders.js +3 -7
- package/src/modules/orders/store/shopcart.js +1 -1
- package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
- package/src/modules/organizations/components/pages/Department.vue +5 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
- package/src/modules/organizations/components/pages/Members.vue +2 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +3 -1
- package/src/modules/organizations/store/memberships.js +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +32 -22
- package/src/modules/products/components/pages/ProductEdit.vue +10 -13
- package/src/modules/products/components/pages/Products.vue +2 -0
- package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
- package/src/modules/products/store/products.js +25 -2
- package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
- package/src/modules/users/components/blocks/CardUser.vue +1 -0
- package/src/modules/landing/components/sections/AboutSection.vue +0 -69
@@ -1,4 +1,4 @@
|
|
1
|
-
import { computed as a, ref as z, onMounted as
|
1
|
+
import { computed as a, ref as z, onMounted as S, watch as B, openBlock as s, createElementBlock as h, createBlock as l, createCommentVNode as i, createElementVNode as o, createVNode as I, Fragment as N, renderList as D, toDisplayString as d } from "vue";
|
2
2
|
import F from "../blocks/CardOrderItem.vue.js";
|
3
3
|
import E from "../sections/AskToLogin.vue.js";
|
4
4
|
import G from "../sections/Succes.vue.js";
|
@@ -6,36 +6,36 @@ import Q from "../sections/EmptyState.vue.js";
|
|
6
6
|
import R from "../sections/FormCustomerDetails.vue.js";
|
7
7
|
import A from "../sections/FormDelivery.vue.js";
|
8
8
|
import L from "../sections/FormPayment.vue.js";
|
9
|
-
import { useRoute as
|
10
|
-
import { state as
|
11
|
-
import { state as
|
12
|
-
import { getters as
|
9
|
+
import { useRoute as U, useRouter as Y } from "vue-router";
|
10
|
+
import { state as j } from "../../../globals/store/globals.js";
|
11
|
+
import { state as v } from "../../../auth/store/auth.js";
|
12
|
+
import { getters as q, state as t, actions as y } from "../../store/shopcart.js";
|
13
13
|
import { actions as $ } from "../../../organizations/store/organizations.js";
|
14
|
-
import { state as e, actions as
|
15
|
-
import { state as
|
14
|
+
import { state as e, actions as x } from "../../store/orders.js";
|
15
|
+
import { state as H } from "../../../users/store/users.js";
|
16
16
|
import "./OrderCreate.vue2.js";
|
17
|
-
const
|
17
|
+
const J = { class: "pd-thin" }, K = { class: "gap-small mn-b-thin cols-2" }, W = {
|
18
18
|
key: 2,
|
19
19
|
class: "order-form col"
|
20
|
-
}, X = { key: 3 }, Z = /* @__PURE__ */
|
20
|
+
}, X = { key: 3 }, Z = /* @__PURE__ */ o("p", { class: "p-big mn-b-small" }, "Your Order", -1), ee = { class: "mn-b-semi" }, re = {
|
21
21
|
style: { "border-bottom": "1px solid #f7f7f7", "border-top": "1px solid #f7f7f7" },
|
22
22
|
class: "pd-b-medium pd-t-medium mn-b-medium"
|
23
|
-
}, te = { class: "mn-b-thin" }, se = { class: "mn-b-thin" },
|
23
|
+
}, te = { class: "mn-b-thin" }, se = { class: "mn-b-thin" }, oe = { class: "h3" }, ne = /* @__PURE__ */ o("p", { class: "mn-b-thin" }, " By making this purchase you agree to the General Terms and Conditions. ", -1), ae = /* @__PURE__ */ o("p", { class: "mn-b-small" }, " I agree that placing the order places me under an obligation to make a payment in accordance with the General Terms and Conditions. ", -1), ie = ["disabled"], Pe = {
|
24
24
|
__name: "OrderCreate",
|
25
|
-
setup(
|
26
|
-
|
27
|
-
const C =
|
28
|
-
a(() =>
|
29
|
-
const k = a(() =>
|
30
|
-
|
25
|
+
setup(ce) {
|
26
|
+
U();
|
27
|
+
const C = Y(), b = a(() => e.current);
|
28
|
+
a(() => H.current);
|
29
|
+
const k = a(() => q.cartTotalPrice), c = z({});
|
30
|
+
S(async () => {
|
31
31
|
var r;
|
32
|
-
|
33
|
-
_id:
|
34
|
-
location: (r =
|
32
|
+
c.value = await $.read({
|
33
|
+
_id: t.organization,
|
34
|
+
location: (r = j.position) == null ? void 0 : r.location
|
35
35
|
});
|
36
|
-
}),
|
37
|
-
|
38
|
-
_id:
|
36
|
+
}), B(() => e.current.delivery.address, async (r, n) => {
|
37
|
+
c.value = await $.read({
|
38
|
+
_id: t.organization,
|
39
39
|
location: e.current.delivery.location
|
40
40
|
});
|
41
41
|
}, { deep: !0 });
|
@@ -43,77 +43,77 @@ const K = { class: "pd-thin" }, U = { class: "gap-small mn-b-thin cols-2" }, W =
|
|
43
43
|
var r;
|
44
44
|
return ((r = e.current.customer.name) == null ? void 0 : r.length) < 2;
|
45
45
|
}), P = a(() => {
|
46
|
-
var m, p, _,
|
47
|
-
const r = (m = e.current.customer.messenger) == null ? void 0 : m.type,
|
48
|
-
return !(((
|
46
|
+
var m, p, _, u;
|
47
|
+
const r = (m = e.current.customer.messenger) == null ? void 0 : m.type, n = ((_ = (p = e.current.customer.messenger) == null ? void 0 : p.value) == null ? void 0 : _.length) > 2;
|
48
|
+
return !(((u = e.current.customer.number) == null ? void 0 : u.length) > 0) && !(r && n);
|
49
49
|
}), M = a(() => e.current.delivery.type !== "Pickup" && e.current.delivery.address < 2), O = a(() => !e.current.delivery.type), T = a(() => !e.current.payment.type);
|
50
50
|
async function V() {
|
51
51
|
e.current.status = "created", e.current.owner = {
|
52
|
-
target:
|
52
|
+
target: t.organization,
|
53
53
|
type: "organization"
|
54
|
-
},
|
55
|
-
target:
|
56
|
-
type: "
|
57
|
-
}), e.current.positions =
|
54
|
+
}, v.user._id && (e.current.creator = {
|
55
|
+
target: v.user._id,
|
56
|
+
type: "User"
|
57
|
+
}), e.current.positions = t.positions;
|
58
58
|
const r = localStorage.getItem("referalCode");
|
59
59
|
r && (e.current.referralCode = r);
|
60
|
-
let
|
61
|
-
|
60
|
+
let n = await x.create(e.current);
|
61
|
+
n ? (y.resetShopcart(), C.push({
|
62
62
|
name: "Order Status",
|
63
63
|
params: {
|
64
|
-
order:
|
64
|
+
order: n._id
|
65
65
|
}
|
66
|
-
}) : alert("something wrong");
|
66
|
+
})) : alert("something wrong");
|
67
67
|
}
|
68
|
-
return (r,
|
69
|
-
var
|
70
|
-
return
|
71
|
-
|
68
|
+
return (r, n) => {
|
69
|
+
var g, m, p, _;
|
70
|
+
return s(), h("section", J, [
|
71
|
+
v.access.status === !1 ? (s(), l(E, {
|
72
72
|
key: 0,
|
73
73
|
class: "mn-b-big"
|
74
74
|
})) : i("", !0),
|
75
|
-
|
76
|
-
|
77
|
-
b.value.status === !0 &&
|
75
|
+
o("div", K, [
|
76
|
+
t.positions < 1 ? (s(), l(Q, { key: 0 })) : i("", !0),
|
77
|
+
b.value.status === !0 && t.positions.length > 0 ? (s(), l(G, {
|
78
78
|
key: 1,
|
79
79
|
order: b.value
|
80
80
|
}, null, 8, ["order"])) : i("", !0),
|
81
|
-
e.current.status !== !0 &&
|
82
|
-
|
83
|
-
|
84
|
-
}, null, 8, ["
|
85
|
-
e.current.status !== !0 &&
|
81
|
+
e.current.status !== !0 && t.positions.length > 0 ? (s(), h("div", W, [
|
82
|
+
I(R, {
|
83
|
+
customer: e.current.customer
|
84
|
+
}, null, 8, ["customer"]),
|
85
|
+
e.current.status !== !0 && t.positions.length > 0 ? (s(), l(A, {
|
86
86
|
key: 0,
|
87
87
|
order: e.current
|
88
88
|
}, null, 8, ["order"])) : i("", !0),
|
89
|
-
e.current.status !== !0 &&
|
89
|
+
e.current.status !== !0 && t.positions.length > 0 ? (s(), l(L, {
|
90
90
|
key: 1,
|
91
91
|
order: e.current
|
92
92
|
}, null, 8, ["order"])) : i("", !0)
|
93
93
|
])) : i("", !0),
|
94
|
-
|
94
|
+
t.positions.length > 0 ? (s(), h("div", X, [
|
95
95
|
Z,
|
96
|
-
|
97
|
-
(
|
98
|
-
key:
|
96
|
+
o("ul", ee, [
|
97
|
+
(s(!0), h(N, null, D(t.positions, (u) => (s(), l(F, {
|
98
|
+
key: u._id,
|
99
99
|
editable: "true",
|
100
|
-
product:
|
101
|
-
increase: (f) =>
|
102
|
-
decrease: (f) =>
|
103
|
-
remove: (f) =>
|
100
|
+
product: u,
|
101
|
+
increase: (f) => y.incrementItemQuantity(f._id),
|
102
|
+
decrease: (f) => y.decrementItemQuantity(f._id),
|
103
|
+
remove: (f) => y.removeProduct(f._id)
|
104
104
|
}, null, 8, ["product", "increase", "decrease", "remove"]))), 128))
|
105
105
|
]),
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
106
|
+
o("div", re, [
|
107
|
+
o("p", te, " Subtotal: " + d(r.returnCurrency()) + " " + d(k.value), 1),
|
108
|
+
o("p", se, " Delivery: " + d(r.returnCurrency()) + " " + d(Math.trunc(100 + 20 * ((g = c.value[0]) == null ? void 0 : g.distance) - 7, 5 * (((m = c.value[0]) == null ? void 0 : m.distance) / 10))), 1),
|
109
|
+
o("p", oe, " Total: " + d(r.returnCurrency()) + " " + d(Math.trunc(100 + 20 * ((p = c.value[0]) == null ? void 0 : p.distance) - 7, 5 * (((_ = c.value[0]) == null ? void 0 : _.distance) / 10)) + k.value.value), 1)
|
110
110
|
]),
|
111
|
-
|
111
|
+
ne,
|
112
112
|
ae,
|
113
|
-
e.current.status !== !0 &&
|
113
|
+
e.current.status !== !0 && t.positions.length > 0 ? (s(), h("button", {
|
114
114
|
key: 0,
|
115
115
|
disabled: w.value || P.value || r.errorCity || M.value || O.value || T.value,
|
116
|
-
onClick:
|
116
|
+
onClick: n[0] || (n[0] = (u) => V()),
|
117
117
|
class: "bg-main pd-small radius-big w-100 button"
|
118
118
|
}, " Place an Order ", 8, ie)) : i("", !0)
|
119
119
|
])) : i("", !0)
|
package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router");require("../../../../components/Field/Field.vue2.cjs");const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router");require("../../../../components/Field/Field.vue2.cjs");const P=require("../../../../components/Button/Button.vue.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const C=require("../../../users/components/blocks/CardUser.vue.cjs"),V=require("../sections/FormAddCustomer.vue.cjs"),O=require("../sections/FormDelivery.vue.cjs"),E=require("../sections/FormPayment.vue.cjs"),l=require("../../../globals/store/globals.cjs"),F=require("../../../auth/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");require("./OrderCreateBackoffice.vue2.cjs");const R={class:"h-100 flex flex-column pd-thin"},T={class:"flex-v-center flex-nowrap flex"},A=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),I=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),z={class:"bg-grey h-max-100 mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=h.useRoute(),y=h.useRouter();let g=e.computed(()=>Number(t.state.current.positions.reduce((d,n)=>d+n.price*n.quantity,0)));const s=e.ref("positions"),c=e.ref(!1);function v(){c.value=!0}function m(){c.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"user",target:F.state.user._id},t.state.current.owner={type:"organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function x(){y.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(async()=>{}),(d,n)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(P.default,{submit:w,callback:x,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(q.default,{selected:s.value,"onUpdate:selected":n[0]||(n[0]=r=>s.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-grey mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let f={...o};f.quantity=1,l.actions.add(t.state.current.positions,f),m()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),s.value==="positions"?(e.openBlock(),e.createBlock(u.default,{key:0,title:"Positions",actions:[{label:"+",function:()=>v()}],class:"mn-b-small"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",L," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{l.actions.increment(t.state.current.positions,r)},onDecrease:()=>{l.actions.decrement(t.state.current.positions,r)},onRemove:()=>{l.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:n[1]||(n[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name"])):(e.openBlock(),e.createBlock(b.default,{key:1,search:{placeholder:"Search customer...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>e.unref(D.default).read(r),state:null},options:{owner:e.unref(a).params._id},class:"bg-grey h-max-20r o-scroll"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),s.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(g))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;
|
package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { computed as I, ref as d, onMounted as T, openBlock as r, createElementBlock as
|
1
|
+
import { computed as I, ref as d, onMounted as T, openBlock as r, createElementBlock as m, createVNode as a, withCtx as s, createElementVNode as u, createTextVNode as q, unref as f, Fragment as g, renderList as C, createBlock as n, createCommentVNode as c, normalizeClass as E, toDisplayString as x } from "vue";
|
2
2
|
import { useRoute as L, useRouter as M } from "vue-router";
|
3
3
|
import "../../../../components/Field/Field.vue2.js";
|
4
4
|
import U from "../../../../components/Button/Button.vue.js";
|
@@ -7,7 +7,7 @@ import $ from "../../../../components/Popup/Popup.vue.js";
|
|
7
7
|
import _ from "../../../../components/Block/Block.vue.js";
|
8
8
|
import O from "../../../../components/Feed/Feed.vue.js";
|
9
9
|
import N from "../blocks/CardOrderItem.vue.js";
|
10
|
-
import "../../../../components/Select/Select.
|
10
|
+
import "../../../../components/Select/Select.vue2.js";
|
11
11
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
12
12
|
import B from "../../../users/components/blocks/CardUser.vue.js";
|
13
13
|
import G from "../sections/FormAddCustomer.vue.js";
|
@@ -19,14 +19,14 @@ import { state as e, mutations as Q, actions as W } from "../../store/orders.js"
|
|
19
19
|
import { actions as X } from "../../../products/store/products.js";
|
20
20
|
import Y from "../../store/customers.store.js";
|
21
21
|
import "./OrderCreateBackoffice.vue2.js";
|
22
|
-
const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-center flex-nowrap flex" }, te = /* @__PURE__ */ u("h2", { class: "mn-r-auto" }, "Create Order", -1), re = /* @__PURE__ */ u("h3", { class: "mn-b-small" }, "Add to order", -1), oe = { class: "h-100
|
22
|
+
const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-center flex-nowrap flex" }, te = /* @__PURE__ */ u("h2", { class: "mn-r-auto" }, "Create Order", -1), re = /* @__PURE__ */ u("h3", { class: "mn-b-small" }, "Add to order", -1), oe = { class: "bg-grey h-max-100 mn-b-thin o-scroll pd-medium radius-big" }, se = {
|
23
23
|
key: 0,
|
24
24
|
class: "w-100"
|
25
|
-
}, ne = { class: "h3 flex" },
|
25
|
+
}, ne = { class: "h3 flex" }, ae = /* @__PURE__ */ u("span", { class: "mn-r-auto t-transp" }, "In total", -1), Be = {
|
26
26
|
__name: "OrderCreateBackoffice",
|
27
|
-
setup(
|
27
|
+
setup(ie) {
|
28
28
|
const p = L(), D = M();
|
29
|
-
let R = I(() => Number(e.current.positions.reduce((
|
29
|
+
let R = I(() => Number(e.current.positions.reduce((v, i) => v + i.price * i.quantity, 0)));
|
30
30
|
const l = d("positions"), b = d(!1);
|
31
31
|
function S() {
|
32
32
|
b.value = !0;
|
@@ -63,12 +63,12 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
63
63
|
});
|
64
64
|
}
|
65
65
|
return T(async () => {
|
66
|
-
}), (
|
67
|
-
|
66
|
+
}), (v, i) => (r(), m("div", Z, [
|
67
|
+
a(_, { class: "mn-b-thin" }, {
|
68
68
|
default: s(() => [
|
69
69
|
u("header", ee, [
|
70
70
|
te,
|
71
|
-
|
71
|
+
a(U, {
|
72
72
|
submit: z,
|
73
73
|
callback: A,
|
74
74
|
class: "pd-small radius-big bg-main t-black uppercase t-medium"
|
@@ -82,9 +82,9 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
82
82
|
]),
|
83
83
|
_: 1
|
84
84
|
}),
|
85
|
-
|
85
|
+
a(j, {
|
86
86
|
selected: l.value,
|
87
|
-
"onUpdate:selected":
|
87
|
+
"onUpdate:selected": i[0] || (i[0] = (t) => l.value = t),
|
88
88
|
tabs: [
|
89
89
|
{ name: "Positions", value: "positions" },
|
90
90
|
{ name: "Customer", value: "customer" },
|
@@ -93,15 +93,15 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
93
93
|
],
|
94
94
|
class: "t-medium radius-medium bg-grey mn-b-small"
|
95
95
|
}, null, 8, ["selected"]),
|
96
|
-
|
96
|
+
a($, {
|
97
97
|
onClosePopup: k,
|
98
98
|
isPopupOpen: b.value,
|
99
|
-
class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
|
99
|
+
class: "bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"
|
100
100
|
}, {
|
101
101
|
default: s(() => [
|
102
102
|
re,
|
103
103
|
u("div", oe, [
|
104
|
-
|
104
|
+
a(O, {
|
105
105
|
search: {
|
106
106
|
placeholder: "Search products...",
|
107
107
|
class: "bg-white mn-b-thin"
|
@@ -124,7 +124,7 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
124
124
|
default: s(({
|
125
125
|
items: t
|
126
126
|
}) => [
|
127
|
-
(r(!0),
|
127
|
+
(r(!0), m(g, null, C(t, (o, F) => (r(), n(N, {
|
128
128
|
key: o._id,
|
129
129
|
editable: !1,
|
130
130
|
product: o,
|
@@ -151,8 +151,8 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
151
151
|
class: "mn-b-small"
|
152
152
|
}, {
|
153
153
|
default: s(() => [
|
154
|
-
e.current.positions.length === 0 ? (r(),
|
155
|
-
(r(!0),
|
154
|
+
e.current.positions.length === 0 ? (r(), m("span", se, " No positions added yet ")) : c("", !0),
|
155
|
+
(r(!0), m(g, null, C(e.current.positions, (t, o) => (r(), n(N, {
|
156
156
|
key: t._id,
|
157
157
|
editable: !0,
|
158
158
|
product: t,
|
@@ -169,7 +169,7 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
169
169
|
}, null, 8, ["product", "onIncrease", "onDecrease", "onRemove"]))), 128))
|
170
170
|
]),
|
171
171
|
_: 1
|
172
|
-
}, 8, ["actions"])) :
|
172
|
+
}, 8, ["actions"])) : c("", !0),
|
173
173
|
l.value === "customer" ? (r(), n(_, {
|
174
174
|
key: 1,
|
175
175
|
title: "Customer",
|
@@ -185,7 +185,7 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
185
185
|
user: e.current.customer,
|
186
186
|
photo: e.current.customer.profile.photo,
|
187
187
|
name: e.current.customer.profile.name || e.current.customer.phone || e.current.customer.email,
|
188
|
-
onClick:
|
188
|
+
onClick: i[1] || (i[1] = () => {
|
189
189
|
Q.resetCustomer(e.current.customer);
|
190
190
|
}),
|
191
191
|
class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
|
@@ -213,7 +213,7 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
213
213
|
default: s(({
|
214
214
|
items: t
|
215
215
|
}) => [
|
216
|
-
(r(!0),
|
216
|
+
(r(!0), m(g, null, C(t, (o, F) => (r(), n(B, {
|
217
217
|
key: o._id,
|
218
218
|
user: o,
|
219
219
|
photo: o.profile.photo,
|
@@ -228,31 +228,31 @@ const Z = { class: "h-100 flex flex-column pd-thin" }, ee = { class: "flex-v-cen
|
|
228
228
|
}, 8, ["store", "options"]))
|
229
229
|
]),
|
230
230
|
_: 1
|
231
|
-
}, 8, ["actions"])) :
|
231
|
+
}, 8, ["actions"])) : c("", !0),
|
232
232
|
l.value === "delivery" ? (r(), n(H, {
|
233
233
|
key: 2,
|
234
234
|
order: e.current
|
235
|
-
}, null, 8, ["order"])) :
|
235
|
+
}, null, 8, ["order"])) : c("", !0),
|
236
236
|
l.value === "payment" ? (r(), n(J, {
|
237
237
|
key: 3,
|
238
238
|
order: e.current
|
239
|
-
}, null, 8, ["order"])) :
|
240
|
-
|
239
|
+
}, null, 8, ["order"])) : c("", !0),
|
240
|
+
a($, {
|
241
241
|
title: "Add customer",
|
242
242
|
onClosePopup: P,
|
243
243
|
isPopupOpen: y.value,
|
244
244
|
class: E("bg-white w-min-30r w-max-30r radius-big pd-medium")
|
245
245
|
}, {
|
246
246
|
default: s(() => [
|
247
|
-
|
247
|
+
a(G, { onCallbackCustomer: P })
|
248
248
|
]),
|
249
249
|
_: 1
|
250
250
|
}, 8, ["isPopupOpen"]),
|
251
|
-
|
251
|
+
a(_, { class: "mn-b-semi" }, {
|
252
252
|
default: s(() => [
|
253
253
|
u("div", ne, [
|
254
|
-
|
255
|
-
u("span", null, x(f(R)) + " " + x(
|
254
|
+
ae,
|
255
|
+
u("span", null, x(f(R)) + " " + x(v.returnCurrency()), 1)
|
256
256
|
])
|
257
257
|
]),
|
258
258
|
_: 1
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");require("../../../../components/Tab/Tab.vue.cjs");const y=require("../../../../components/Block/Block.vue.cjs"),c=require("../../store/orders.cjs"),v=require("../../../auth/store/auth.cjs");require("../blocks/CardOrder.vue2.cjs");const f=require("../../../globals/components/blocks/CardHeader.vue.cjs"),N=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),V=require("../../../icons/entities/IconTime.vue.cjs"),E={class:"pd-thin"},k={class:"gap-micro flex-nowrap flex"},w={class:"w-100 bg-white radius-small pd-small"},S=e.createElementVNode("p",{class:"mn-b-thin"},"Total",-1),D={class:"w-100 bg-white radius-small pd-small"},B=e.createElementVNode("p",{class:"mn-b-thin"},"Paid",-1),x={class:"w-100 bg-white radius-small pd-small"},C=e.createElementVNode("p",{class:"mn-b-thin"},"Unpaid",-1),q={class:"mn-b-small pd-small bg-white radius-small flex-nowrap flex"},P={class:"w-100"},T={class:"mn-b-thin"},O={class:"t-truncate"},F={class:"w-100 t-right"},A={class:"mn-b-thin"},M={class:"cols-1 mn-b-small gap-thin pd-small bg-white radius-small"},U={class:"mn-r-auto"},L={class:"t-right"},R={class:"t-transp"},z={key:0},H={class:"mn-r-auto"},I={class:"t-right"},$={class:"t-transp"},j={class:"pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex"},G={class:"t-medium mn-r-auto"},J={class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"},K=e.createElementVNode("span",{class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin t-white bg-red"}," Unpaid ",-1),Q={key:0,class:"pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small"},W=e.createElementVNode("p",{class:"mn-b-thin t-transp uppercase p-small t-medium"},"Comment",-1),X={__name:"Orders",setup(Y){const p=m.useRoute();m.useRouter();const i=e.ref(!1),o=e.ref("all"),u=e.computed(()=>_(c.state.all)),h=e.computed(()=>g(c.state.all,"unpaid"));function _(n){return n.reduce((s,r)=>s+r.positions.reduce((l,t)=>l+t.price,0),0)}function g(n,s){return n.reduce((r,l)=>l.payment.status===s?r+l.positions.reduce((t,a)=>t+a.price,0):r,0)}return e.onMounted(async()=>{}),(n,s)=>{const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",E,[e.createVNode(N.default,{title:"Orders","onUpdate:tabs_current":s[0]||(s[0]=l=>o.value=l),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Created",value:"created"},{name:"Confirmed",value:"confirmed"},{name:"Preparing",value:"preparing"},{name:"Prepared",value:"prepared"},{name:"In delivery",value:"in delivery"},{name:"Delivered",value:"delivered"},{name:"Closed",value:"closed"}],actions:[{to:{name:"AdminOrderAdd"},label:"Create Order"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current"]),e.createVNode(y.default,{title:"Balance",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[e.createElementVNode("div",w,[S,e.createElementVNode("h3",null,e.toDisplayString(n.formatPrice(u.value)),1)]),e.createElementVNode("div",D,[B,e.createElementVNode("h3",null,e.toDisplayString(n.formatPrice(h.value)),1)]),e.createElementVNode("div",x,[C,e.createElementVNode("h3",null,e.toDisplayString(n.formatPrice(u.value)),1)])])]),_:1}),e.createVNode(b.default,{search:!0,states:{empty:{title:"No Orders Found",description:"Currently, there are no orders."}},store:{read:l=>c.actions.read(l)},options:{limit:15,owner:e.unref(p).params._id,...o.value!=="all"&&{status:o.value}},class:"gap-thin cols-3"},{default:e.withCtx(({items:l})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,t=>(e.openBlock(),e.createBlock(r,{to:{name:"Order Edit",params:{order:t._id}},class:"bg-grey pos-relative pd-medium radius-big"},{default:e.withCtx(()=>[e.createVNode(f.default,{entity:t,entityType:"order",user:v.state.user,owner:t.creator,creator:t.creator,date:t.createdAt,class:"mn-b-small"},null,8,["entity","user","owner","creator","date"]),e.createElementVNode("div",q,[e.createElementVNode("div",P,[e.createElementVNode("h3",T,e.toDisplayString(t.customer.target.profile.name||t.customer.target.phone||t.customer.target.email||"No name"),1),e.createElementVNode("p",O,e.toDisplayString(t.delivery.address||"Not specified"),1)]),e.createElementVNode("div",F,[e.createElementVNode("h3",A,e.toDisplayString(n.returnCurrency())+e.toDisplayString(c.getters.getTotal(t.positions)),1),e.createElementVNode("p",null,"#"+e.toDisplayString(t._id.slice(0,4)+"..."+t._id.slice(-4)),1)])]),e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(0,2),(a,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"w-100 flex"},[e.createElementVNode("p",U,e.toDisplayString(a.name),1),e.createElementVNode("p",L,[e.createTextVNode(e.toDisplayString(a.quantity)+" "+e.toDisplayString(a.type)+" x "+e.toDisplayString(a.price)+" ",1),e.createElementVNode("span",R,e.toDisplayString(n.returnCurrency()),1)])]))),128)),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&t.positions.length>2?(e.openBlock(),e.createElementBlock("div",z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(2),(a,d)=>(e.openBlock(),e.createElementBlock("div",{key:d+2,class:"w-100 flex"},[e.createElementVNode("p",H,e.toDisplayString(a.name),1),e.createElementVNode("p",I,[e.createTextVNode(e.toDisplayString(a.quantity)+" "+e.toDisplayString(a.type)+" x "+e.toDisplayString(a.price)+" ",1),e.createElementVNode("span",$,e.toDisplayString(n.returnCurrency()),1)])]))),128))])):e.createCommentVNode("",!0)]),_:2},1024),t.positions.length>2?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[1]||(s[1]=e.withModifiers(a=>i.value=!i.value,["prevent"])),class:"radius-big bg-grey-transp-50 pd-nano w-100 flex-center flex"},e.toDisplayString(i.value?"Hide":`+${t.positions.length-2} more`),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",j,[e.createVNode(V.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),e.createElementVNode("p",G,e.toDisplayString(n.formatDate(t.deadline)),1),e.createElementVNode("span",J,e.toDisplayString(t.status),1),K]),t.comment?(e.openBlock(),e.createElementBlock("div",Q,[W,e.createElementVNode("p",null,e.toDisplayString(t.comment),1)])):e.createCommentVNode("",!0)]),_:2},1032,["to"]))),256))]),_:1},8,["store","options"])])}}};exports.default=X;
|