@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.
Files changed (165) hide show
  1. package/dist/events.server.js +14 -6
  2. package/dist/events.server.mjs +14 -6
  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 +37 -23
  7. package/dist/orders.server.mjs +37 -23
  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/components/Spoiler/Spoiler.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  22. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  24. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
  30. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  32. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  34. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +45 -45
  36. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
  37. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
  38. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
  40. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
  41. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
  42. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
  43. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
  44. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
  46. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +28 -28
  48. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
  50. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
  62. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
  64. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
  66. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +28 -26
  68. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +47 -44
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
  74. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
  76. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
  78. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +13 -13
  90. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +14 -15
  96. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
  98. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  100. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
  104. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  106. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
  108. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
  110. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  112. package/dist/prometheus-framework.cjs.js +1 -1
  113. package/dist/prometheus-framework.es.js +1 -1
  114. package/dist/style.css +1 -1
  115. package/dist/web-CQQEUA9l.js +1 -0
  116. package/dist/web-D2Em-p-C.mjs +54 -0
  117. package/package.json +1 -1
  118. package/src/components/Address/Address.vue +23 -34
  119. package/src/components/LocationMarker/LocationMarker.vue +6 -1
  120. package/src/components/LocationSelection/LocationSelection.vue +4 -0
  121. package/src/components/Map/Map.vue +29 -15
  122. package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
  123. package/src/modules/events/controllers/events.controller.js +4 -4
  124. package/src/modules/globals/components/blocks/CardHeader.vue +2 -2
  125. package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
  126. package/src/modules/landing/components/pages/Farming.vue +226 -0
  127. package/src/modules/landing/components/pages/Governance.vue +3 -5
  128. package/src/modules/landing/components/pages/Home.vue +0 -3
  129. package/src/modules/landing/components/pages/Hotel.vue +1 -3
  130. package/src/modules/landing/components/pages/Page.vue +0 -3
  131. package/src/modules/landing/components/sections/Examples.vue +4 -56
  132. package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
  133. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
  134. package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
  135. package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
  136. package/src/modules/landing/router/landing.js +11 -0
  137. package/src/modules/marketplace/components/sections/Filters.vue +26 -23
  138. package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
  139. package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
  140. package/src/modules/orders/components/pages/Order.vue +2 -6
  141. package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
  142. package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
  143. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
  144. package/src/modules/orders/components/pages/Orders.vue +60 -11
  145. package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
  146. package/src/modules/orders/controllers/orders.controller.js +30 -19
  147. package/src/modules/orders/models/order.model.js +8 -2
  148. package/src/modules/orders/router/orders.backoffice.router.js +1 -1
  149. package/src/modules/orders/router/orders.router.js +2 -2
  150. package/src/modules/orders/store/orders.js +3 -7
  151. package/src/modules/orders/store/shopcart.js +1 -1
  152. package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
  153. package/src/modules/organizations/components/pages/Department.vue +5 -1
  154. package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
  155. package/src/modules/organizations/components/pages/Members.vue +2 -1
  156. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  157. package/src/modules/organizations/controllers/memberships.controller.js +3 -1
  158. package/src/modules/organizations/store/memberships.js +1 -1
  159. package/src/modules/products/components/blocks/CardProduct.vue +2 -3
  160. package/src/modules/products/components/pages/ProductEdit.vue +10 -13
  161. package/src/modules/products/components/pages/Products.vue +2 -0
  162. package/src/modules/products/store/products.js +25 -2
  163. package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
  164. package/src/modules/users/components/blocks/CardUser.vue +1 -0
  165. package/src/modules/landing/components/sections/AboutSection.vue +0 -69
@@ -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.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.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;
@@ -1,48 +1,77 @@
1
- import { ref as g, onMounted as k, resolveComponent as w, openBlock as n, createElementBlock as l, createVNode as r, unref as x, withCtx as p, Fragment as _, renderList as h, createBlock as C, createElementVNode as e, toDisplayString as s, createTextVNode as v, Transition as N, createCommentVNode as f, withModifiers as O } from "vue";
2
- import { useRoute as $, useRouter as A } from "vue-router";
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 { actions as T, getters as V } from "../../store/orders.js";
7
- import { state as B } from "../../../auth/store/auth.js";
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 E from "../../../globals/components/blocks/CardHeader.vue.js";
10
- import q from "../../../globals/components/sections/SectionPageTitle.vue.js";
11
- import z from "../../../../components/Feed/Feed.vue.js";
12
- import D from "../../../icons/entities/IconEvents.vue.js";
13
- const F = { class: "pd-thin" }, M = { class: "mn-b-small pd-small bg-white radius-small flex-nowrap flex" }, P = { class: "w-100" }, R = { class: "mn-b-thin" }, U = { class: "t-truncate" }, H = { class: "w-100 t-right" }, I = { class: "mn-b-thin" }, L = { class: "cols-1 mn-b-small gap-thin pd-small bg-white radius-small" }, S = { class: "mn-r-auto" }, j = { class: "t-right" }, G = { class: "t-transp" }, J = { key: 0 }, K = { class: "mn-r-auto" }, Q = { class: "t-right" }, W = { class: "t-transp" }, X = { class: "pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex" }, Y = /* @__PURE__ */ e("p", { class: "t-medium mn-r-auto" }, "16:40, 21.04", -1), Z = { 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" }, tt = /* @__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), et = {
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
- }, st = /* @__PURE__ */ e("p", { class: "mn-b-thin t-transp uppercase p-small t-medium" }, "Comment", -1), ft = {
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(at) {
19
- const b = $();
20
- A();
21
- const o = g(!1), c = g("all");
22
- return k(async () => {
23
- }), (d, m) => {
24
- const y = w("router-link");
25
- return n(), l("div", F, [
26
- r(q, {
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": m[0] || (m[0] = (i) => c.value = i),
29
- tabs_current: c.value,
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: "stock-in" },
33
- { name: "Confirmed", value: "stock-out" },
34
- { name: "Preparing", value: "stock-out" },
35
- { name: "Prepared", value: "stock-out" },
36
- { name: "In delivery", value: "stock-out" },
37
- { name: "Delivered", value: "stock-out" },
38
- { name: "Closed", value: "stock-out" }
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
- r(z, {
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: (i) => T.read(i)
83
+ read: (l) => q.read(l)
55
84
  },
56
85
  options: {
57
86
  limit: 15,
58
- owner: x(b).params._id,
59
- ...c.value !== "all" && { type: c.value }
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: i
93
+ items: l
65
94
  }) => [
66
- (n(!0), l(_, null, h(i, (t) => (n(), C(y, {
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
- r(E, {
105
+ d(I, {
77
106
  entity: t,
78
107
  entityType: "order",
79
- user: B.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", M, [
86
- e("div", P, [
87
- e("h3", R, s(t.customer.target.profile.name || t.customer.target.phone || t.customer.target.email || "No name"), 1),
88
- e("p", U, s(t.delivery.address || "Not specified"), 1)
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", H, [
91
- e("h3", I, s(d.returnCurrency()) + s(V.getTotal(t.positions)), 1),
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", L, [
96
- (n(!0), l(_, null, h(t.positions.slice(0, 2), (a, u) => (n(), l("div", {
97
- key: u,
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", S, s(a.name), 1),
101
- e("p", j, [
102
- v(s(a.quantity) + " " + s(a.type) + " x " + s(a.price) + " ", 1),
103
- e("span", G, s(d.returnCurrency()), 1)
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
- r(N, { name: "fade" }, {
135
+ d(B, { name: "fade" }, {
107
136
  default: p(() => [
108
- o.value && t.positions.length > 2 ? (n(), l("div", J, [
109
- (n(!0), l(_, null, h(t.positions.slice(2), (a, u) => (n(), l("div", {
110
- key: u + 2,
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", K, s(a.name), 1),
114
- e("p", Q, [
115
- v(s(a.quantity) + " " + s(a.type) + " x " + s(a.price) + " ", 1),
116
- e("span", W, s(d.returnCurrency()), 1)
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
- ])) : f("", !0)
148
+ ])) : v("", !0)
120
149
  ]),
121
150
  _: 2
122
151
  }, 1024),
123
- t.positions.length > 2 ? (n(), l("button", {
152
+ t.positions.length > 2 ? (i(), r("button", {
124
153
  key: 0,
125
- onClick: m[1] || (m[1] = O((a) => o.value = !o.value, ["prevent"])),
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(o.value ? "Hide" : `+${t.positions.length - 2} more`), 1)) : f("", !0)
156
+ }, s(m.value ? "Hide" : `+${t.positions.length - 2} more`), 1)) : v("", !0)
128
157
  ]),
129
- e("div", X, [
130
- r(D, {
158
+ e("div", me, [
159
+ d(S, {
131
160
  class: "i-semi t-transp",
132
161
  fill: "rgb(var(--black)"
133
162
  }),
134
- Y,
135
- e("span", Z, s(t.status), 1),
136
- tt
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 ? (n(), l("div", et, [
139
- st,
167
+ t.comment ? (i(), r("div", he, [
168
+ fe,
140
169
  e("p", null, s(t.comment), 1)
141
- ])) : f("", !0)
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
- ft as default
182
+ Be as default
154
183
  };
@@ -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.vue.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;
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;
@@ -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.vue.js";
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";
@@ -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.vue2.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;
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;
@@ -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.vue2.js";
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: {
@@ -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"},"Shipping Method",-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:"Mail",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;
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;
@@ -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 p from "../../../../components/LocationMarker/LocationMarker.vue2.js";
5
+ import f from "../../../../components/LocationMarker/LocationMarker.vue2.js";
6
6
  import t from "../../../../components/Radio/Radio.vue.js";
7
- import f from "../../../../components/Field/Field.vue2.js";
8
- const c = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Spot", -1), h = /* @__PURE__ */ l("div", { class: "mn-b-small flex-nowrap flex" }, null, -1), w = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Shipping Method", -1), g = { class: "mn-b-small flex-nowrap flex" }, U = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Address", -1), P = {
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
- c,
24
- h,
23
+ p,
25
24
  w,
26
- l("div", g, [
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: "Mail",
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(p, {
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(f, {
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
- P as default
89
+ G as default
90
90
  };
@@ -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.vue2.cjs"),o={class:"mn-b-small flex-nowrap flex"},s={__name:"FormPayment",props:{order:Object},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(r.default,{title:"Payment"},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(n.default,{select:t.order.payment.type,"onUpdate:select":l[0]||(l[0]=a=>t.order.payment.type=a),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1}))}};exports.default=s;
1
+ "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;