@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,48 +1,77 @@
|
|
1
|
-
import { ref as
|
2
|
-
import { useRoute as
|
1
|
+
import { ref as b, computed as y, onMounted as T, resolveComponent as $, openBlock as i, createElementBlock as r, createVNode as d, withCtx as p, createElementVNode as e, toDisplayString as s, unref as O, Fragment as h, renderList as f, createBlock as A, createTextVNode as w, Transition as B, createCommentVNode as v, withModifiers as U } from "vue";
|
2
|
+
import { useRoute as V, useRouter as D } from "vue-router";
|
3
3
|
import "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
|
4
4
|
import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
|
5
5
|
import "../../../../components/Tab/Tab.vue.js";
|
6
|
-
import
|
7
|
-
import { state as
|
6
|
+
import E from "../../../../components/Block/Block.vue.js";
|
7
|
+
import { state as x, actions as q, getters as z } from "../../store/orders.js";
|
8
|
+
import { state as F } from "../../../auth/store/auth.js";
|
8
9
|
import "../blocks/CardOrder.vue2.js";
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
const
|
10
|
+
import I from "../../../globals/components/blocks/CardHeader.vue.js";
|
11
|
+
import M from "../../../globals/components/sections/SectionPageTitle.vue.js";
|
12
|
+
import R from "../../../../components/Feed/Feed.vue.js";
|
13
|
+
import S from "../../../icons/entities/IconTime.vue.js";
|
14
|
+
const H = { class: "pd-thin" }, L = { class: "gap-micro flex-nowrap flex" }, j = { class: "w-100 bg-white radius-small pd-small" }, G = /* @__PURE__ */ e("p", { class: "mn-b-thin" }, "Total", -1), J = { class: "w-100 bg-white radius-small pd-small" }, K = /* @__PURE__ */ e("p", { class: "mn-b-thin" }, "Paid", -1), Q = { class: "w-100 bg-white radius-small pd-small" }, W = /* @__PURE__ */ e("p", { class: "mn-b-thin" }, "Unpaid", -1), X = { class: "mn-b-small pd-small bg-white radius-small flex-nowrap flex" }, Y = { class: "w-100" }, Z = { class: "mn-b-thin" }, ee = { class: "t-truncate" }, te = { class: "w-100 t-right" }, se = { class: "mn-b-thin" }, ae = { class: "cols-1 mn-b-small gap-thin pd-small bg-white radius-small" }, ne = { class: "mn-r-auto" }, le = { class: "t-right" }, ie = { class: "t-transp" }, re = { key: 0 }, oe = { class: "mn-r-auto" }, ce = { class: "t-right" }, de = { class: "t-transp" }, me = { class: "pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex" }, ue = { class: "t-medium mn-r-auto" }, pe = { 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" }, _e = /* @__PURE__ */ e("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), he = {
|
14
15
|
key: 0,
|
15
16
|
class: "pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small"
|
16
|
-
},
|
17
|
+
}, fe = /* @__PURE__ */ e("p", { class: "mn-b-thin t-transp uppercase p-small t-medium" }, "Comment", -1), Be = {
|
17
18
|
__name: "Orders",
|
18
|
-
setup(
|
19
|
-
const
|
20
|
-
|
21
|
-
const
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
setup(ve) {
|
20
|
+
const k = V();
|
21
|
+
D();
|
22
|
+
const m = b(!1), u = b("all"), g = y(() => P(x.all)), C = y(() => N(x.all, "unpaid"));
|
23
|
+
function P(n) {
|
24
|
+
return n.reduce((o, c) => o + c.positions.reduce((l, t) => l + t.price, 0), 0);
|
25
|
+
}
|
26
|
+
function N(n, o) {
|
27
|
+
return n.reduce((c, l) => l.payment.status === o ? c + l.positions.reduce((t, a) => t + a.price, 0) : c, 0);
|
28
|
+
}
|
29
|
+
return T(async () => {
|
30
|
+
}), (n, o) => {
|
31
|
+
const c = $("router-link");
|
32
|
+
return i(), r("div", H, [
|
33
|
+
d(M, {
|
27
34
|
title: "Orders",
|
28
|
-
"onUpdate:tabs_current":
|
29
|
-
tabs_current:
|
35
|
+
"onUpdate:tabs_current": o[0] || (o[0] = (l) => u.value = l),
|
36
|
+
tabs_current: u.value,
|
30
37
|
tabs: [
|
31
38
|
{ name: "All", value: "all" },
|
32
|
-
{ name: "Created", value: "
|
33
|
-
{ name: "Confirmed", value: "
|
34
|
-
{ name: "Preparing", value: "
|
35
|
-
{ name: "Prepared", value: "
|
36
|
-
{ name: "In delivery", value: "
|
37
|
-
{ name: "Delivered", value: "
|
38
|
-
{ name: "Closed", value: "
|
39
|
+
{ name: "Created", value: "created" },
|
40
|
+
{ name: "Confirmed", value: "confirmed" },
|
41
|
+
{ name: "Preparing", value: "preparing" },
|
42
|
+
{ name: "Prepared", value: "prepared" },
|
43
|
+
{ name: "In delivery", value: "in delivery" },
|
44
|
+
{ name: "Delivered", value: "delivered" },
|
45
|
+
{ name: "Closed", value: "closed" }
|
39
46
|
],
|
40
47
|
actions: [
|
41
48
|
{ to: { name: "AdminOrderAdd" }, label: "Create Order" }
|
42
49
|
],
|
43
50
|
class: "mn-b-small bg-grey bg-grey radius-big"
|
44
51
|
}, null, 8, ["tabs_current"]),
|
45
|
-
|
52
|
+
d(E, {
|
53
|
+
title: "Balance",
|
54
|
+
class: "mn-b-thin"
|
55
|
+
}, {
|
56
|
+
default: p(() => [
|
57
|
+
e("div", L, [
|
58
|
+
e("div", j, [
|
59
|
+
G,
|
60
|
+
e("h3", null, s(n.formatPrice(g.value)), 1)
|
61
|
+
]),
|
62
|
+
e("div", J, [
|
63
|
+
K,
|
64
|
+
e("h3", null, s(n.formatPrice(C.value)), 1)
|
65
|
+
]),
|
66
|
+
e("div", Q, [
|
67
|
+
W,
|
68
|
+
e("h3", null, s(n.formatPrice(g.value)), 1)
|
69
|
+
])
|
70
|
+
])
|
71
|
+
]),
|
72
|
+
_: 1
|
73
|
+
}),
|
74
|
+
d(R, {
|
46
75
|
search: !0,
|
47
76
|
states: {
|
48
77
|
empty: {
|
@@ -51,19 +80,19 @@ const F = { class: "pd-thin" }, M = { class: "mn-b-small pd-small bg-white radiu
|
|
51
80
|
}
|
52
81
|
},
|
53
82
|
store: {
|
54
|
-
read: (
|
83
|
+
read: (l) => q.read(l)
|
55
84
|
},
|
56
85
|
options: {
|
57
86
|
limit: 15,
|
58
|
-
owner:
|
59
|
-
...
|
87
|
+
owner: O(k).params._id,
|
88
|
+
...u.value !== "all" && { status: u.value }
|
60
89
|
},
|
61
90
|
class: "gap-thin cols-3"
|
62
91
|
}, {
|
63
92
|
default: p(({
|
64
|
-
items:
|
93
|
+
items: l
|
65
94
|
}) => [
|
66
|
-
(
|
95
|
+
(i(!0), r(h, null, f(l, (t) => (i(), A(c, {
|
67
96
|
to: {
|
68
97
|
name: "Order Edit",
|
69
98
|
params: {
|
@@ -73,72 +102,72 @@ const F = { class: "pd-thin" }, M = { class: "mn-b-small pd-small bg-white radiu
|
|
73
102
|
class: "bg-grey pos-relative pd-medium radius-big"
|
74
103
|
}, {
|
75
104
|
default: p(() => [
|
76
|
-
|
105
|
+
d(I, {
|
77
106
|
entity: t,
|
78
107
|
entityType: "order",
|
79
|
-
user:
|
108
|
+
user: F.user,
|
80
109
|
owner: t.creator,
|
81
110
|
creator: t.creator,
|
82
111
|
date: t.createdAt,
|
83
112
|
class: "mn-b-small"
|
84
113
|
}, null, 8, ["entity", "user", "owner", "creator", "date"]),
|
85
|
-
e("div",
|
86
|
-
e("div",
|
87
|
-
e("h3",
|
88
|
-
e("p",
|
114
|
+
e("div", X, [
|
115
|
+
e("div", Y, [
|
116
|
+
e("h3", Z, s(t.customer.target.profile.name || t.customer.target.phone || t.customer.target.email || "No name"), 1),
|
117
|
+
e("p", ee, s(t.delivery.address || "Not specified"), 1)
|
89
118
|
]),
|
90
|
-
e("div",
|
91
|
-
e("h3",
|
119
|
+
e("div", te, [
|
120
|
+
e("h3", se, s(n.returnCurrency()) + s(z.getTotal(t.positions)), 1),
|
92
121
|
e("p", null, "#" + s(t._id.slice(0, 4) + "..." + t._id.slice(-4)), 1)
|
93
122
|
])
|
94
123
|
]),
|
95
|
-
e("div",
|
96
|
-
(
|
97
|
-
key:
|
124
|
+
e("div", ae, [
|
125
|
+
(i(!0), r(h, null, f(t.positions.slice(0, 2), (a, _) => (i(), r("div", {
|
126
|
+
key: _,
|
98
127
|
class: "w-100 flex"
|
99
128
|
}, [
|
100
|
-
e("p",
|
101
|
-
e("p",
|
102
|
-
|
103
|
-
e("span",
|
129
|
+
e("p", ne, s(a.name), 1),
|
130
|
+
e("p", le, [
|
131
|
+
w(s(a.quantity) + " " + s(a.type) + " x " + s(a.price) + " ", 1),
|
132
|
+
e("span", ie, s(n.returnCurrency()), 1)
|
104
133
|
])
|
105
134
|
]))), 128)),
|
106
|
-
|
135
|
+
d(B, { name: "fade" }, {
|
107
136
|
default: p(() => [
|
108
|
-
|
109
|
-
(
|
110
|
-
key:
|
137
|
+
m.value && t.positions.length > 2 ? (i(), r("div", re, [
|
138
|
+
(i(!0), r(h, null, f(t.positions.slice(2), (a, _) => (i(), r("div", {
|
139
|
+
key: _ + 2,
|
111
140
|
class: "w-100 flex"
|
112
141
|
}, [
|
113
|
-
e("p",
|
114
|
-
e("p",
|
115
|
-
|
116
|
-
e("span",
|
142
|
+
e("p", oe, s(a.name), 1),
|
143
|
+
e("p", ce, [
|
144
|
+
w(s(a.quantity) + " " + s(a.type) + " x " + s(a.price) + " ", 1),
|
145
|
+
e("span", de, s(n.returnCurrency()), 1)
|
117
146
|
])
|
118
147
|
]))), 128))
|
119
|
-
])) :
|
148
|
+
])) : v("", !0)
|
120
149
|
]),
|
121
150
|
_: 2
|
122
151
|
}, 1024),
|
123
|
-
t.positions.length > 2 ? (
|
152
|
+
t.positions.length > 2 ? (i(), r("button", {
|
124
153
|
key: 0,
|
125
|
-
onClick:
|
154
|
+
onClick: o[1] || (o[1] = U((a) => m.value = !m.value, ["prevent"])),
|
126
155
|
class: "radius-big bg-grey-transp-50 pd-nano w-100 flex-center flex"
|
127
|
-
}, s(
|
156
|
+
}, s(m.value ? "Hide" : `+${t.positions.length - 2} more`), 1)) : v("", !0)
|
128
157
|
]),
|
129
|
-
e("div",
|
130
|
-
|
158
|
+
e("div", me, [
|
159
|
+
d(S, {
|
131
160
|
class: "i-semi t-transp",
|
132
161
|
fill: "rgb(var(--black)"
|
133
162
|
}),
|
134
|
-
|
135
|
-
e("span",
|
136
|
-
|
163
|
+
e("p", ue, s(n.formatDate(t.deadline)), 1),
|
164
|
+
e("span", pe, s(t.status), 1),
|
165
|
+
_e
|
137
166
|
]),
|
138
|
-
t.comment ? (
|
139
|
-
|
167
|
+
t.comment ? (i(), r("div", he, [
|
168
|
+
fe,
|
140
169
|
e("p", null, s(t.comment), 1)
|
141
|
-
])) :
|
170
|
+
])) : v("", !0)
|
142
171
|
]),
|
143
172
|
_: 2
|
144
173
|
}, 1032, ["to"]))), 256))
|
@@ -150,5 +179,5 @@ const F = { class: "pd-thin" }, M = { class: "mn-b-small pd-small bg-white radiu
|
|
150
179
|
}
|
151
180
|
};
|
152
181
|
export {
|
153
|
-
|
182
|
+
Be as default
|
154
183
|
};
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.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"),k=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");const b=require("../../../../components/FieldPhone/click-outside.cjs");require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");const b=require("../../../../components/FieldPhone/click-outside.cjs");require("../../../../components/Select/Select.vue2.cjs");const g=require("../../../../components/Feed/Feed.vue.cjs"),v=require("../../../../components/Button/Button.vue.cjs"),C=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),n=require("../../../users/components/blocks/CardUser.vue.cjs"),q=require("./FormCustomerDetails.vue.cjs"),_=require("../../../users/store/users.cjs"),w=require("../../../auth/store/auth.cjs"),y=require("../../../globals/store/globals.cjs"),B=require("../../store/customers.store.cjs"),x=require("../../store/models/customer.cjs"),E={key:2,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-grey pd-small radius-small"},N={__name:"FormAddCustomer",props:{order:Object},emits:["callbackCustomer"],setup(V,{emit:i}){let c=b.default;const d=i,m=h.useRoute();let r=e.ref(x.default),u=e.ref(null),l=e.ref(!1);async function f(){let a={identity:{type:r.value.user?"User":"Visitor",target:r.value.user?r.value.user._id:null},owner:{type:"Organization",target:m.params._id},creator:{type:"User",target:w.state.user._id},phone:r.value.phone,email:r.value.email,profile:r.value.profile,socials:r.value.socials};try{let o=await B.default.create(a);r.value=o}catch(o){console.log(o)}}function p(){d("callbackCustomer",r.value)}return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k.default,{class:"pos-relative mn-b-thin"},{default:e.withCtx(()=>[e.unref(r).user?(e.openBlock(),e.createBlock(n.default,{key:1,user:e.unref(r).user,photo:e.unref(r).user.profile.photo,name:e.unref(r).user.profile.name||e.unref(r).user.phone||e.unref(r).user.email,onClick:o[1]||(o[1]=()=>{e.unref(r).user=null}),class:"bg-white pd-thin radius-medium w-100"},null,8,["user","photo","name"])):e.withDirectives((e.openBlock(),e.createBlock(C.default,{key:0,onSearch:o[0]||(o[0]=s=>{e.isRef(u)?u.value=s:u=s,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-white"},null,512)),[[e.unref(c),()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(u)&&e.unref(l)&&!e.unref(r).user?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(g.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:s=>_.actions.read(s),state:null},options:{search:e.unref(u)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(t,F)=>(e.openBlock(),e.createBlock(n.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{e.unref(r).user=t,e.unref(r).profile=t.profile,e.unref(r).phone=t.phone,e.unref(r).email=t.email,e.unref(r).socials=t.socials},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(q.default,{customer:e.unref(r),class:"mn-b-thin bg-grey"},null,8,["customer"]),e.createVNode(v.default,{submit:f,callback:p,onError:e.unref(y.setError),class:"w-100 pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Customer ")]),_:1},8,["onError"])],64))}};exports.default=N;
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js
CHANGED
@@ -3,7 +3,7 @@ import { useRoute as U } from "vue-router";
|
|
3
3
|
import N from "../../../../components/Block/Block.vue.js";
|
4
4
|
import "../../../../components/Field/Field.vue2.js";
|
5
5
|
import O from "../../../../components/FieldPhone/click-outside.js";
|
6
|
-
import "../../../../components/Select/Select.
|
6
|
+
import "../../../../components/Select/Select.vue2.js";
|
7
7
|
import V from "../../../../components/Feed/Feed.vue.js";
|
8
8
|
import B from "../../../../components/Button/Button.vue.js";
|
9
9
|
import F from "../../../globals/components/blocks/BlockSearch.vue.js";
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Field/Field.vue.cjs"),o=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),u=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Field/Field.vue.cjs"),o=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),u=require("../../../../components/Select/Select.vue.cjs"),i={class:"gap-thin flex-justify-between flex-nowrap flex"},d={__name:"FormCustomerDetails",props:{customer:Object,title:{type:String,default:"Personal Data"}},setup(a){let s=e.ref("instagram");return(m,l)=>(e.openBlock(),e.createBlock(r.default,{title:a.title,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createVNode(n.default,{field:a.customer.profile.name,"onUpdate:field":l[0]||(l[0]=t=>a.customer.profile.name=t),label:"Name",placeholder:"Enter name",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["field"]),e.createVNode(o.default,{modelValue:a.customer.phone,"onUpdate:modelValue":l[1]||(l[1]=t=>a.customer.phone=t),onCountry:l[2]||(l[2]=t=>{a.customer.number=t}),inputOptions:{placeholder:"Enter phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"w-100 bg-white pd-small mn-b-thin radius-small"},null,8,["modelValue"]),e.createElementVNode("div",i,[e.createVNode(u.default,{select:e.unref(s),options:[{name:"Instagram",value:"instagram"},{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"}],"onUpdate:select":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),placeholder:"Messenger",size:"small",class:"bg-white pd-small radius-small"},null,8,["select"]),e.createVNode(n.default,{field:a.customer.socials[e.unref(s)],"onUpdate:field":l[4]||(l[4]=t=>a.customer.socials[e.unref(s)]=t),label:"@",placeholder:"Enter username",class:"bg-white pd-small radius-small w-100"},null,8,["field"])])]),_:1},8,["title"]))}};exports.default=d;
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js
CHANGED
@@ -2,7 +2,7 @@ import { ref as r, openBlock as m, createBlock as i, withCtx as u, createVNode a
|
|
2
2
|
import p from "../../../../components/Block/Block.vue.js";
|
3
3
|
import o from "../../../../components/Field/Field.vue.js";
|
4
4
|
import c from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import h from "../../../../components/Select/Select.
|
5
|
+
import h from "../../../../components/Select/Select.vue.js";
|
6
6
|
const g = { class: "gap-thin flex-justify-between flex-nowrap flex" }, V = {
|
7
7
|
__name: "FormCustomerDetails",
|
8
8
|
props: {
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),t=require("../../../globals/store/globals.cjs"),s=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Address/Address.vue2.cjs"),u=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),i=require("../../../../components/Radio/Radio.vue.cjs"),m=require("../../../../components/Field/Field.vue.cjs"),c=l.createElementVNode("h4",{class:"mn-b-thin"},"Spot",-1),y=l.createElementVNode("div",{class:"mn-b-small flex-nowrap flex"},null,-1),b=l.createElementVNode("h4",{class:"mn-b-thin"},"
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),t=require("../../../globals/store/globals.cjs"),s=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Address/Address.vue2.cjs"),u=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),i=require("../../../../components/Radio/Radio.vue.cjs"),m=require("../../../../components/Field/Field.vue.cjs"),c=l.createElementVNode("h4",{class:"mn-b-thin"},"Spot",-1),y=l.createElementVNode("div",{class:"mn-b-small flex-nowrap flex"},null,-1),b=l.createElementVNode("h4",{class:"mn-b-thin"},"Select zone",-1),v={class:"mn-b-small flex-nowrap flex"},f=l.createElementVNode("h4",{class:"mn-b-thin"},"Address",-1),p={__name:"FormDelivery",props:{order:Object},setup(e){const o=e;return l.onMounted(()=>{t.state.position&&(o.order.delivery.address=t.state.position.address),t.state.position&&(o.order.delivery.location=t.state.position.location)}),(a,d)=>(l.openBlock(),l.createBlock(s.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:l.withCtx(()=>[c,y,b,l.createElementVNode("div",v,[l.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[0]||(d[0]=r=>e.order.delivery.type=r),label:"Pickup",value:"pickup",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),l.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[1]||(d[1]=r=>e.order.delivery.type=r),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),l.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[2]||(d[2]=r=>e.order.delivery.type=r),label:"Post",value:"mail",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"])]),f,l.createVNode(n.default,{label:"Location",apiKey:a.GOOGLE_MAPS_API_KEY,address:e.order.delivery.address,location:e.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":d[3]||(d[3]=r=>{e.order.delivery.location=r}),"onUpdate:address":d[4]||(d[4]=r=>{e.order.delivery.address=r})},null,8,["apiKey","address","location"]),l.createVNode(u.default,{apiKey:a.GOOGLE_MAPS_API_KEY,address:e.order.delivery.address,location:e.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":d[5]||(d[5]=r=>{e.order.delivery.location=r}),"onUpdate:address":d[6]||(d[6]=r=>{e.order.delivery.address=r})},null,8,["apiKey","address","location"]),l.createVNode(m.default,{field:e.order.comment,"onUpdate:field":d[7]||(d[7]=r=>e.order.comment=r),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1}))}};exports.default=p;
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js
CHANGED
@@ -2,10 +2,10 @@ import { onMounted as n, openBlock as m, createBlock as u, withCtx as y, createE
|
|
2
2
|
import { state as o } from "../../../globals/store/globals.js";
|
3
3
|
import b from "../../../../components/Block/Block.vue.js";
|
4
4
|
import v from "../../../../components/Address/Address.vue2.js";
|
5
|
-
import
|
5
|
+
import f from "../../../../components/LocationMarker/LocationMarker.vue2.js";
|
6
6
|
import t from "../../../../components/Radio/Radio.vue.js";
|
7
|
-
import
|
8
|
-
const
|
7
|
+
import c from "../../../../components/Field/Field.vue.js";
|
8
|
+
const p = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Spot", -1), w = /* @__PURE__ */ l("div", { class: "mn-b-small flex-nowrap flex" }, null, -1), g = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Select zone", -1), h = { class: "mn-b-small flex-nowrap flex" }, U = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Address", -1), G = {
|
9
9
|
__name: "FormDelivery",
|
10
10
|
props: {
|
11
11
|
order: Object
|
@@ -20,10 +20,10 @@ const c = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Spot", -1), h = /* @_
|
|
20
20
|
tooltip: "Delivery by mail takes 3-5 days."
|
21
21
|
}, {
|
22
22
|
default: y(() => [
|
23
|
-
|
24
|
-
h,
|
23
|
+
p,
|
25
24
|
w,
|
26
|
-
|
25
|
+
g,
|
26
|
+
l("div", h, [
|
27
27
|
i(t, {
|
28
28
|
radio: e.order.delivery.type,
|
29
29
|
"onUpdate:radio": d[0] || (d[0] = (r) => e.order.delivery.type = r),
|
@@ -41,7 +41,7 @@ const c = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Spot", -1), h = /* @_
|
|
41
41
|
i(t, {
|
42
42
|
radio: e.order.delivery.type,
|
43
43
|
"onUpdate:radio": d[2] || (d[2] = (r) => e.order.delivery.type = r),
|
44
|
-
label: "
|
44
|
+
label: "Post",
|
45
45
|
value: "mail",
|
46
46
|
class: "bg-white pd-medium radius-small w-100 mn-r-small"
|
47
47
|
}, null, 8, ["radio"])
|
@@ -61,7 +61,7 @@ const c = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Spot", -1), h = /* @_
|
|
61
61
|
e.order.delivery.address = r;
|
62
62
|
})
|
63
63
|
}, null, 8, ["apiKey", "address", "location"]),
|
64
|
-
i(
|
64
|
+
i(f, {
|
65
65
|
apiKey: s.GOOGLE_MAPS_API_KEY,
|
66
66
|
address: e.order.delivery.address,
|
67
67
|
location: e.order.delivery.location,
|
@@ -73,7 +73,7 @@ const c = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Spot", -1), h = /* @_
|
|
73
73
|
e.order.delivery.address = r;
|
74
74
|
})
|
75
75
|
}, null, 8, ["apiKey", "address", "location"]),
|
76
|
-
i(
|
76
|
+
i(c, {
|
77
77
|
field: e.order.comment,
|
78
78
|
"onUpdate:field": d[7] || (d[7] = (r) => e.order.comment = r),
|
79
79
|
placeholder: "Comments regarding the address (apartment unit, floor level, building section)",
|
@@ -86,5 +86,5 @@ const c = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Spot", -1), h = /* @_
|
|
86
86
|
}
|
87
87
|
};
|
88
88
|
export {
|
89
|
-
|
89
|
+
G as default
|
90
90
|
};
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Select/Select.vue.cjs"),o={class:"mn-b-small flex-nowrap flex"},s={__name:"FormPayment",props:{order:Object},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(r.default,{title:"Payment"},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(n.default,{select:t.order.payment.type,"onUpdate:select":l[0]||(l[0]=a=>t.order.payment.type=a),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1}))}};exports.default=s;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { openBlock as r, createBlock as l, withCtx as o, createElementVNode as n, createVNode as m } from "vue";
|
2
2
|
import s from "../../../../components/Block/Block.vue.js";
|
3
|
-
import p from "../../../../components/Select/Select.
|
3
|
+
import p from "../../../../components/Select/Select.vue.js";
|
4
4
|
const c = { class: "mn-b-small flex-nowrap flex" }, f = {
|
5
5
|
__name: "FormPayment",
|
6
6
|
props: {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("vue")
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r=[{path:"orders",meta:{title:{en:"Backoffice Orders",ru:"Управление Заказами"}},component:e.default,children:[{path:"",name:"Backoffice Orders",meta:{title:{en:"Backoffice Orders",ru:"Управление Заказами"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Orders.vue.cjs"))},{path:"add",name:"AdminOrderAdd",component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreateBackoffice.vue.cjs"))},{path:":order",name:"AdminOrderEdit",component:()=>Promise.resolve().then(()=>require("../components/pages/OrderBackoffice.vue.cjs"))}]}];exports.default=r;
|
@@ -1,15 +1,14 @@
|
|
1
|
-
import "vue";
|
2
|
-
const
|
1
|
+
import e from "../../globals/components/layouts/Empty.vue.js";
|
2
|
+
const t = [
|
3
3
|
{
|
4
4
|
path: "orders",
|
5
|
-
name: "Backoffice Orders",
|
6
5
|
meta: {
|
7
6
|
title: {
|
8
7
|
en: "Backoffice Orders",
|
9
8
|
ru: "Управление Заказами"
|
10
|
-
}
|
11
|
-
authorize: []
|
9
|
+
}
|
12
10
|
},
|
11
|
+
component: e,
|
13
12
|
children: [{
|
14
13
|
path: "",
|
15
14
|
name: "Backoffice Orders",
|
@@ -17,8 +16,7 @@ const r = [
|
|
17
16
|
title: {
|
18
17
|
en: "Backoffice Orders",
|
19
18
|
ru: "Управление Заказами"
|
20
|
-
}
|
21
|
-
authorize: []
|
19
|
+
}
|
22
20
|
},
|
23
21
|
component: () => import(
|
24
22
|
/* webpackChunkName: 'BackofficeOrders' */
|
@@ -36,11 +34,11 @@ const r = [
|
|
36
34
|
name: "AdminOrderEdit",
|
37
35
|
component: () => import(
|
38
36
|
/* webpackChunkName: 'BackofficeOrders' */
|
39
|
-
"../components/pages/
|
37
|
+
"../components/pages/OrderBackoffice.vue.js"
|
40
38
|
)
|
41
39
|
}]
|
42
40
|
}
|
43
41
|
];
|
44
42
|
export {
|
45
|
-
|
43
|
+
t as default
|
46
44
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r={path:"orders",component:e.default,meta:{title:{en:"Marketplace",ru:"Маркетплейс"}},children:[{path:"form",name:"Form Order",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreate.vue.cjs"))},{path:":order",name:"Order Status",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r={path:"orders",component:e.default,meta:{title:{en:"Marketplace",ru:"Маркетплейс"}},children:[{path:"form",name:"Form Order",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreate.vue.cjs"))},{path:":order",name:"Order Status",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderBackoffice.vue.cjs"))},{path:":order/edit",name:"Order Edit",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderBackoffice.vue.cjs"))}]};exports.default=r;
|
@@ -34,7 +34,7 @@ const t = {
|
|
34
34
|
},
|
35
35
|
component: () => import(
|
36
36
|
/* webpackChunkName: 'Order' */
|
37
|
-
"../components/pages/
|
37
|
+
"../components/pages/OrderBackoffice.vue.js"
|
38
38
|
)
|
39
39
|
},
|
40
40
|
{
|
@@ -48,7 +48,7 @@ const t = {
|
|
48
48
|
},
|
49
49
|
component: () => import(
|
50
50
|
/* webpackChunkName: 'Order' */
|
51
|
-
"../components/pages/
|
51
|
+
"../components/pages/OrderBackoffice.vue.js"
|
52
52
|
)
|
53
53
|
}
|
54
54
|
]
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),l=require("./models/customer.cjs"),n=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=i.reactive({all:[],current:{_id:void 0,positions:[],status:null,comment:"",owner:{type:"Organization",target:null},creator:{type:"Customer",target:null},customer:{...l.default},payment:{type:"Cash",status:"Unpaid"},delivery:{type:null,address:null,status:""}}}),p={async create(e){try{const t=await n.post("/api/orders/create",e);return a.all.push(t.data),t.data}catch(t){s.setError(t)}},async read(e={}){try{const t=await n.get("/api/orders/read",{params:e});return e._id?c(t.data[0],"current"):c(t.data,"all"),t.data}catch(t){throw s.setError(t),t}},async update(e){try{const t=await n.post("/api/orders/update",e),r=a.all.findIndex(o=>o._id===e._id);return r!==-1&&(a.all[r]=t.data),t.data}catch(t){s.setError(t)}},async delete(e){try{await n.delete(`/api/orders/${e}`),a.all=a.all.filter(t=>t._id!==e)}catch(t){s.setError(t)}},async changePaymentStatus(e,t){try{const r=await n.post(`/api/orders/payment/${e}`,{status:t}),o=a.all.findIndex(d=>d._id===e);o!==-1&&(a.all[o]=r.data)}catch(r){s.setError(r)}}},y={resetCustomer(e){Object.assign(e,l.default)}},m={getTotal(e){return e.reduce((t,r)=>t+r.price*r.quantity,0)}};function c(e,t){a[t]=e}i.watch(a,(e,t)=>{});exports.actions=p;exports.getters=m;exports.mutations=y;exports.state=a;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { reactive as
|
1
|
+
import { reactive as l, watch as p } from "vue";
|
2
2
|
import u from "../../../../node_modules/axios/lib/axios.js";
|
3
3
|
import { setError as s } from "../../globals/store/globals.js";
|
4
|
-
import
|
5
|
-
const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r =
|
4
|
+
import c from "./models/customer.js";
|
5
|
+
const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = l({
|
6
6
|
all: [],
|
7
7
|
current: {
|
8
|
-
_id:
|
8
|
+
_id: void 0,
|
9
9
|
positions: [],
|
10
10
|
status: null,
|
11
11
|
comment: "",
|
@@ -17,7 +17,7 @@ const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = d
|
|
17
17
|
type: "Customer",
|
18
18
|
target: null
|
19
19
|
},
|
20
|
-
customer: { ...
|
20
|
+
customer: { ...c },
|
21
21
|
payment: {
|
22
22
|
type: "Cash",
|
23
23
|
status: "Unpaid"
|
@@ -28,64 +28,63 @@ const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = d
|
|
28
28
|
status: ""
|
29
29
|
}
|
30
30
|
}
|
31
|
-
}),
|
32
|
-
async create(
|
31
|
+
}), w = {
|
32
|
+
async create(e) {
|
33
33
|
try {
|
34
|
-
const t = await n.post("/api/orders/create",
|
34
|
+
const t = await n.post("/api/orders/create", e);
|
35
35
|
return r.all.push(t.data), t.data;
|
36
36
|
} catch (t) {
|
37
37
|
s(t);
|
38
38
|
}
|
39
39
|
},
|
40
|
-
async read(
|
40
|
+
async read(e = {}) {
|
41
41
|
try {
|
42
|
-
|
43
|
-
|
44
|
-
return a._id ? c(t.data[0], "current") : c(t.data, "all"), t.data;
|
42
|
+
const t = await n.get("/api/orders/read", { params: e });
|
43
|
+
return e._id ? i(t.data[0], "current") : i(t.data, "all"), t.data;
|
45
44
|
} catch (t) {
|
46
45
|
throw s(t), t;
|
47
46
|
}
|
48
47
|
},
|
49
|
-
async update(
|
48
|
+
async update(e) {
|
50
49
|
try {
|
51
|
-
const t = await n.post(
|
52
|
-
return
|
50
|
+
const t = await n.post("/api/orders/update", e), a = r.all.findIndex((o) => o._id === e._id);
|
51
|
+
return a !== -1 && (r.all[a] = t.data), t.data;
|
53
52
|
} catch (t) {
|
54
53
|
s(t);
|
55
54
|
}
|
56
55
|
},
|
57
|
-
async delete(
|
56
|
+
async delete(e) {
|
58
57
|
try {
|
59
|
-
await n.delete(`/api/orders/${
|
58
|
+
await n.delete(`/api/orders/${e}`), r.all = r.all.filter((t) => t._id !== e);
|
60
59
|
} catch (t) {
|
61
60
|
s(t);
|
62
61
|
}
|
63
62
|
},
|
64
|
-
async changePaymentStatus(
|
63
|
+
async changePaymentStatus(e, t) {
|
65
64
|
try {
|
66
|
-
const
|
67
|
-
|
68
|
-
} catch (
|
69
|
-
s(
|
65
|
+
const a = await n.post(`/api/orders/payment/${e}`, { status: t }), o = r.all.findIndex((d) => d._id === e);
|
66
|
+
o !== -1 && (r.all[o] = a.data);
|
67
|
+
} catch (a) {
|
68
|
+
s(a);
|
70
69
|
}
|
71
70
|
}
|
72
|
-
}, w = {
|
73
|
-
resetCustomer(a) {
|
74
|
-
Object.assign(a, o);
|
75
|
-
}
|
76
71
|
}, g = {
|
77
|
-
|
78
|
-
|
72
|
+
resetCustomer(e) {
|
73
|
+
Object.assign(e, c);
|
74
|
+
}
|
75
|
+
}, x = {
|
76
|
+
getTotal(e) {
|
77
|
+
return e.reduce((t, a) => t + a.price * a.quantity, 0);
|
79
78
|
}
|
80
79
|
};
|
81
|
-
function
|
82
|
-
r[t] =
|
80
|
+
function i(e, t) {
|
81
|
+
r[t] = e;
|
83
82
|
}
|
84
|
-
p(r, (
|
83
|
+
p(r, (e, t) => {
|
85
84
|
});
|
86
85
|
export {
|
87
|
-
|
88
|
-
|
89
|
-
|
86
|
+
w as actions,
|
87
|
+
x as getters,
|
88
|
+
g as mutations,
|
90
89
|
r as state
|
91
90
|
};
|