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