@ozdao/prometheus-framework 0.2.92 → 0.2.94
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/events.server.js +14 -6
- package/dist/events.server.mjs +14 -6
- 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 +37 -23
- package/dist/orders.server.mjs +37 -23
- 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/components/Spoiler/Spoiler.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
- 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/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/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 +45 -45
- 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 +1 -1
- 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 +28 -26
- 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 +47 -44
- 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 +13 -13
- 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/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.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/controllers/events.controller.js +4 -4
- package/src/modules/globals/components/blocks/CardHeader.vue +2 -2
- 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/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/controllers/orders.controller.js +30 -19
- package/src/modules/orders/models/order.model.js +8 -2
- package/src/modules/orders/router/orders.backoffice.router.js +1 -1
- 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 +2 -3
- package/src/modules/products/components/pages/ProductEdit.vue +10 -13
- package/src/modules/products/components/pages/Products.vue +2 -0
- 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
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.vue.js";
|
4
4
|
import U from "../../../../components/Button/Button.vue2.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;
|
@@ -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.vue.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.vue.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.vue2.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.vue.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.vue2.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.vue2.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.vue2.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.vue2.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.vue2.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.vue2.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.vue2.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;
|