@ozdao/prometheus-framework 0.2.59 → 0.2.61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. package/dist/auth.server.js +12 -223
  2. package/dist/auth.server.mjs +12 -223
  3. package/dist/community.server.js +3 -2
  4. package/dist/community.server.mjs +2 -1
  5. package/dist/events.server.js +117 -25
  6. package/dist/events.server.mjs +116 -24
  7. package/dist/files.server.js +7 -7
  8. package/dist/files.server.mjs +7 -7
  9. package/dist/gallery.server.js +2 -2
  10. package/dist/gallery.server.mjs +2 -2
  11. package/dist/main-DsseFd2d.mjs +13753 -0
  12. package/dist/main-U466Gwzt.js +91 -0
  13. package/dist/main.css +1 -1
  14. package/dist/metadata.schema-CS6_9GLU.js +174 -0
  15. package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
  16. package/dist/metadata.schema-D88c1Ebp.mjs +175 -0
  17. package/dist/metadata.schema-doiYQfuO.js +209 -0
  18. package/dist/organizations.server.js +212 -16
  19. package/dist/organizations.server.mjs +212 -16
  20. package/dist/ownership.schema-DN0SlQL6.js +36 -0
  21. package/dist/ownership.schema-oyx6eNkZ.mjs +37 -0
  22. package/dist/products.server.js +8 -5
  23. package/dist/products.server.mjs +8 -5
  24. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +19 -14
  26. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +26 -26
  28. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -373
  30. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -1
  34. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
  36. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
  38. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +46 -1
  40. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -46
  42. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/auth.client.js +12 -14
  44. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  65. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  66. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  67. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  68. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +199 -185
  74. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -0
  75. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +168 -0
  76. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.cjs +1 -0
  77. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.js +1 -0
  78. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  79. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +43 -43
  80. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  82. package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/events/router/events.js +11 -2
  84. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +59 -56
  90. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  94. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  96. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +167 -124
  98. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +56 -45
  100. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/store/orders.js +19 -24
  102. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +25 -25
  110. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  112. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  118. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  120. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -38
  122. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +19 -19
  124. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +5 -5
  126. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +36 -27
  128. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +16 -16
  130. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +11 -11
  136. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +21 -21
  138. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  140. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +36 -50
  142. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  146. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  150. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  154. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  156. package/dist/prometheus-framework.cjs.js +1 -1
  157. package/dist/prometheus-framework.es.js +1 -1
  158. package/dist/style.css +1 -1
  159. package/dist/web-D7bW32Ul.mjs +54 -0
  160. package/dist/web-DpE9HxA3.js +1 -0
  161. package/package.json +1 -1
  162. package/src/components/Chips/Chips.vue +2 -2
  163. package/src/components/Feed/Feed.vue +2 -1
  164. package/src/modules/auth/auth.client.js +0 -2
  165. package/src/modules/auth/auth.server.js +1 -7
  166. package/src/modules/auth/components/pages/Invite.vue +1 -1
  167. package/src/modules/events/components/pages/EditEvent.vue +19 -0
  168. package/src/modules/events/components/pages/EditEventTickets.vue +194 -0
  169. package/src/modules/events/controllers/tickets.controller.js +103 -28
  170. package/src/modules/events/models/ticket.model.js +22 -4
  171. package/src/modules/events/router/events.js +5 -0
  172. package/src/modules/events/routes/tickets.routes.js +2 -2
  173. package/src/modules/events/store/tickets.js +1 -0
  174. package/src/modules/globals/components/blocks/CardHeader.vue +6 -6
  175. package/src/modules/organizations/components/pages/Members.vue +1 -1
  176. package/src/modules/organizations/components/pages/Organization.vue +4 -4
  177. package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
  178. package/src/modules/organizations/controllers/departments.controller.js +14 -1
  179. package/src/modules/organizations/models/department.model.js +5 -1
  180. package/src/modules/organizations/organizations.client.js +2 -0
  181. package/src/modules/organizations/organizations.server.js +6 -2
  182. package/src/modules/organizations/routes/departments.routes.js +1 -1
  183. package/src/modules/organizations/store/departments.js +3 -2
  184. package/src/modules/products/components/blocks/CardLeftover.vue +19 -7
  185. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  186. package/src/modules/products/components/pages/Leftovers.vue +14 -3
  187. package/src/modules/products/components/pages/Products.vue +8 -8
  188. package/src/modules/products/models/leftover.model.js +9 -5
  189. package/src/modules/users/models/client.model.js +60 -0
  190. /package/src/modules/{auth → organizations}/controllers/invites.controller.js +0 -0
  191. /package/src/modules/{auth → organizations}/models/invite.model.js +0 -0
  192. /package/src/modules/{auth → organizations}/routes/invites.routes.js +0 -0
  193. /package/src/modules/{auth → organizations}/store/invites.js +0 -0
@@ -1,29 +1,29 @@
1
- import { openBlock as t, createElementBlock as n, createElementVNode as l, withModifiers as h, createCommentVNode as o, createBlock as y, toDisplayString as d, Fragment as k, renderList as $, normalizeStyle as x, withCtx as b } from "vue";
2
- import { useRouter as v } from "vue-router";
3
- import p from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
4
- import E from "../../../reports/components/sections/FormReport.vue.js";
5
- import R from "../../../../components/Dropdown/Dropdown.vue.js";
1
+ import { openBlock as t, createElementBlock as n, createElementVNode as d, withModifiers as b, createCommentVNode as o, createBlock as w, toDisplayString as f, Fragment as C, renderList as M, normalizeStyle as P, withCtx as R } from "vue";
2
+ import { useRouter as U } from "vue-router";
3
+ import F from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
4
+ import D from "../../../reports/components/sections/FormReport.vue.js";
5
+ import L from "../../../../components/Dropdown/Dropdown.vue.js";
6
6
  import "../../../../components/Button/Button.vue2.js";
7
7
  import "../../../auth/store/auth.js";
8
8
  import "../../../organizations/store/memberships.js";
9
- import z from "../../../icons/navigation/IconEllipsis.vue.js";
10
- const C = {
9
+ import S from "../../../icons/navigation/IconEllipsis.vue.js";
10
+ const V = {
11
11
  key: 0,
12
12
  class: "pd-b-zero"
13
- }, M = { class: "w-100 flex-v-center flex-nojustify flex" }, P = { class: "w-100 flex-nowrap flex-v-center flex" }, U = ["src"], F = {
13
+ }, B = { class: "w-100 flex-v-center flex-nojustify flex" }, I = { class: "w-100 flex-nowrap flex-v-center flex" }, O = ["src"], T = {
14
14
  key: 2,
15
15
  class: "t-semi"
16
- }, D = { key: 1 }, L = { key: 2 }, S = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, V = {
16
+ }, j = { key: 1 }, N = { key: 2 }, A = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, H = {
17
17
  key: 0,
18
18
  class: "w-4r i-thin"
19
- }, B = {
19
+ }, J = {
20
20
  style: {
21
21
  position: "absolute",
22
22
  top: "0px",
23
23
  right: "0px"
24
24
  },
25
25
  class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"
26
- }, I = ["src"], O = { class: "bg-black pd-thin radius-small" }, T = /* @__PURE__ */ l("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), W = {
26
+ }, q = ["src"], G = { class: "bg-black pd-thin radius-small" }, K = /* @__PURE__ */ d("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), oe = {
27
27
  __name: "CardHeader",
28
28
  props: [
29
29
  "user",
@@ -38,83 +38,86 @@ const C = {
38
38
  "type"
39
39
  ],
40
40
  setup(e) {
41
- v();
42
- function w(i) {
43
- const r = /* @__PURE__ */ new Date(), m = new Date(i), u = Math.abs(r - m), a = Math.floor(u / 1e3), s = Math.floor(a / 60), c = Math.floor(s / 60), f = Math.floor(c / 24), g = Math.floor(f / 7);
44
- return g > 0 ? `${g} week${g > 1 ? "s" : ""} ago` : f > 0 ? `${f} day${f > 1 ? "s" : ""} ago` : c > 0 ? `${c} hour${c > 1 ? "s" : ""} ago` : s > 0 ? `${s} minute${s > 1 ? "s" : ""} ago` : "Just now";
41
+ U();
42
+ function z(i) {
43
+ const r = /* @__PURE__ */ new Date(), h = new Date(i), g = Math.abs(r - h), y = Math.floor(g / 1e3), s = Math.floor(y / 60), a = Math.floor(s / 60), l = Math.floor(a / 24), m = Math.floor(l / 7);
44
+ return m > 0 ? `${m} week${m > 1 ? "s" : ""} ago` : l > 0 ? `${l} day${l > 1 ? "s" : ""} ago` : a > 0 ? `${a} hour${a > 1 ? "s" : ""} ago` : s > 0 ? `${s} minute${s > 1 ? "s" : ""} ago` : "Just now";
45
45
  }
46
46
  return (i, r) => {
47
- var m, u;
48
- return e.owner ? (t(), n("header", C, [
49
- l("div", M, [
50
- l("div", P, [
51
- e.owner.target.profile.photo.length > 0 && e.type !== "short" ? (t(), n("img", {
47
+ var h, g, y, s, a, l, m, k, $, x, v, p, E;
48
+ return e.owner ? (t(), n("header", V, [
49
+ d("div", B, [
50
+ d("div", I, [
51
+ ((y = (g = (h = e.owner.target) == null ? void 0 : h.profile) == null ? void 0 : g.photo) == null ? void 0 : y.length) > 0 && e.type !== "short" ? (t(), n("img", {
52
52
  key: 0,
53
53
  src: (i.FILE_SERVER_URL || "") + e.owner.target.profile.photo,
54
54
  class: "radius-medium object-fit-cover mn-r-thin i-thin",
55
- onClick: r[0] || (r[0] = h((a) => i.$router.push({
55
+ onClick: r[0] || (r[0] = b((c) => i.$router.push({
56
56
  name: e.owner.type === "user" ? "User Profile" : "Organization",
57
57
  params: {
58
58
  _id: e.owner.target._id
59
59
  }
60
60
  }), ["stop"]))
61
- }, null, 8, U)) : o("", !0),
62
- !e.owner.target.profile.photo && e.type !== "short" ? (t(), y(p, {
61
+ }, null, 8, O)) : o("", !0),
62
+ !((a = (s = e.owner.target) == null ? void 0 : s.profile) != null && a.photo) && e.type !== "short" ? (t(), w(F, {
63
63
  key: 1,
64
64
  class: "radius-medium mn-r-thin i-thin",
65
- onClick: r[1] || (r[1] = h((a) => i.$router.push({
65
+ onClick: r[1] || (r[1] = b((c) => i.$router.push({
66
66
  name: e.owner.type === "user" ? "User Profile" : "Organization",
67
67
  params: {
68
68
  _id: e.owner.target._id
69
69
  }
70
70
  }), ["stop"]))
71
71
  })) : o("", !0),
72
- e.type !== "short" ? (t(), n("span", F, [
73
- l("span", {
74
- onClick: r[2] || (r[2] = h((a) => i.$router.push({
72
+ e.type !== "short" ? (t(), n("span", T, [
73
+ d("span", {
74
+ onClick: r[2] || (r[2] = b((c) => i.$router.push({
75
75
  name: e.owner.type === "user" ? "User Profile" : "Organization",
76
76
  params: {
77
77
  _id: e.owner.target._id
78
78
  }
79
79
  }), ["stop"]))
80
- }, d(e.owner.target.profile.name), 1),
81
- !e.creator.hidden && e.owner.target.profile.name !== ((m = e.creator.target.profile) == null ? void 0 : m.name) ? (t(), n("span", {
80
+ }, f((m = (l = e.owner.target) == null ? void 0 : l.profile) == null ? void 0 : m.name), 1),
81
+ !e.creator.hidden && (($ = (k = e.owner.target) == null ? void 0 : k.profile) == null ? void 0 : $.name) !== ((v = (x = e.creator.target) == null ? void 0 : x.profile) == null ? void 0 : v.name) ? (t(), n("span", {
82
82
  key: 0,
83
- onClick: r[3] || (r[3] = h((a) => i.$router.push({
84
- name: "User Profile",
85
- params: {
86
- _id: e.creator.target._id
87
- }
88
- }), ["stop"]))
89
- }, " · by " + d((u = e.creator.target.profile) == null ? void 0 : u.name), 1)) : o("", !0),
90
- e.date ? (t(), n("span", D, " · " + d(w(e.date)), 1)) : o("", !0),
91
- e.dateFormatted ? (t(), n("span", L, " · " + d(e.dateFormatted), 1)) : o("", !0)
83
+ onClick: r[3] || (r[3] = b((c) => {
84
+ var u;
85
+ return i.$router.push({
86
+ name: "User Profile",
87
+ params: {
88
+ _id: (u = e.creator.target) == null ? void 0 : u._id
89
+ }
90
+ });
91
+ }, ["stop"]))
92
+ }, " · by " + f((E = (p = e.creator.target) == null ? void 0 : p.profile) == null ? void 0 : E.name), 1)) : o("", !0),
93
+ e.date ? (t(), n("span", j, " · " + f(z(e.date)), 1)) : o("", !0),
94
+ e.dateFormatted ? (t(), n("span", N, " · " + f(e.dateFormatted), 1)) : o("", !0)
92
95
  ])) : o("", !0),
93
- l("div", S, [
94
- e.members ? (t(), n("div", V, [
95
- l("span", B, d(e.members), 1),
96
- (t(!0), n(k, null, $(e.membersPhotos.slice(0, 2), (a, s) => (t(), n("img", {
97
- key: s,
98
- src: (i.FILE_SERVER_URL || "") + a,
99
- style: x({
96
+ d("div", A, [
97
+ e.members ? (t(), n("div", H, [
98
+ d("span", J, f(e.members), 1),
99
+ (t(!0), n(C, null, M(e.membersPhotos.slice(0, 2), (c, u) => (t(), n("img", {
100
+ key: u,
101
+ src: (i.FILE_SERVER_URL || "") + c,
102
+ style: P({
100
103
  position: "absolute",
101
104
  top: "0px",
102
- right: s * 20 + 20 + "%",
103
- zIndex: 1 - s
105
+ right: u * 20 + 20 + "%",
106
+ zIndex: 1 - u
104
107
  }),
105
108
  class: "br-solid br-2px br-white i-thin bg-grey radius-big"
106
- }, null, 12, I))), 128))
109
+ }, null, 12, q))), 128))
107
110
  ])) : o("", !0)
108
111
  ]),
109
- e.type !== "short" && e.user && e.user != e.creator.target._id ? (t(), y(R, {
112
+ e.type !== "short" && e.user && e.user != e.creator.target._id ? (t(), w(L, {
110
113
  key: 3,
111
- label: { component: z, class: "t-transp i-regular" },
114
+ label: { component: S, class: "t-transp i-regular" },
112
115
  align: "right",
113
116
  class: "cursor-pointer z-index-2"
114
117
  }, {
115
- default: b(() => [
116
- l("section", O, [
117
- e.user !== e.creator.target._id ? (t(), y(E, {
118
+ default: R(() => [
119
+ d("section", G, [
120
+ e.user !== e.creator.target._id ? (t(), w(D, {
118
121
  key: 0,
119
122
  user: e.user,
120
123
  type: e.entityType,
@@ -122,8 +125,8 @@ const C = {
122
125
  text: "Report",
123
126
  class: "w-100"
124
127
  }, {
125
- default: b(() => [
126
- T
128
+ default: R(() => [
129
+ K
127
130
  ]),
128
131
  _: 1
129
132
  }, 8, ["user", "type", "target"])) : o("", !0)
@@ -138,5 +141,5 @@ const C = {
138
141
  }
139
142
  };
140
143
  export {
141
- W as default
144
+ oe as default
142
145
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");const a=require("../../../mobile/components/Menu/Menu.vue.cjs"),r=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-grey radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");const a=require("../../../mobile/components/Menu/Menu.vue2.cjs"),r=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-grey radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
@@ -1,7 +1,7 @@
1
1
  import { ref as l, openBlock as m, createElementBlock as u, createVNode as t, withCtx as o, unref as r, createStaticVNode as c, createElementVNode as a } from "vue";
2
2
  import "../../../../components/Field/Field.vue2.js";
3
3
  import "../../../../components/Button/Button.vue2.js";
4
- import p from "../../../mobile/components/Menu/Menu.vue.js";
4
+ import p from "../../../mobile/components/Menu/Menu.vue2.js";
5
5
  import n from "../../../mobile/components/Menu/MenuItem.vue.js";
6
6
  import { useRoute as d, useRouter as h } from "vue-router";
7
7
  import "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Menu.vue2.cjs");const r={class:"mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium"},o={__name:"Menu",setup(u){return(t,n)=>(e.openBlock(),e.createElementBlock("section",r,[e.renderSlot(t.$slots,"default")]))}};exports.default=o;
1
+ "use strict";
@@ -1,13 +1 @@
1
- import { openBlock as t, createElementBlock as o, renderSlot as n } from "vue";
2
- import "./Menu.vue2.js";
3
- const r = { class: "mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium" }, d = {
4
- __name: "Menu",
5
- setup(s) {
6
- return (e, i) => (t(), o("section", r, [
7
- n(e.$slots, "default")
8
- ]));
9
- }
10
- };
11
- export {
12
- d as default
13
- };
1
+
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Menu.vue.cjs");const r={class:"mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium"},o={__name:"Menu",setup(u){return(t,n)=>(e.openBlock(),e.createElementBlock("section",r,[e.renderSlot(t.$slots,"default")]))}};exports.default=o;
@@ -1 +1,13 @@
1
-
1
+ import { openBlock as t, createElementBlock as o, renderSlot as n } from "vue";
2
+ import "./Menu.vue.js";
3
+ const r = { class: "mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium" }, d = {
4
+ __name: "Menu",
5
+ setup(s) {
6
+ return (e, i) => (t(), o("section", r, [
7
+ n(e.$slots, "default")
8
+ ]));
9
+ }
10
+ };
11
+ export {
12
+ d as default
13
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("vue-router"),C=require("../../../../components/Feed/Feed.vue.cjs"),P=require("../../../../components/Popup/Popup.vue.cjs"),q=require("../../../../components/Block/Block.vue.cjs"),v=require("../blocks/CardOrderItem.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const i=require("../../../globals/store/globals.cjs"),r=require("../../store/orders.cjs"),w=require("../../../products/store/products.cjs");require("./EditOrder.vue2.cjs");const x=e.createElementVNode("header",{class:"mn-b-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Create Order")],-1),T=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),O={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},S={key:0,class:"w-100"},D={class:"mn-thinw-100 flex-v-center flex block"},F={class:"p-big"},I={key:0,class:"p-big t-semi"},R={key:1,class:"p-big t-semi"},M={key:2,class:"p-big t-semi"},L={key:3},j={key:4},z={key:5},A=e.createElementVNode("button",{class:"mn-l-auto button"},"Запросить онлайн",-1),G={__name:"EditOrder",setup(H){const N=E.useRoute(),c=e.ref(!1);function V(){c.value=!0}function a(){c.value=!1}let o=e.ref(null);return e.onMounted(async()=>{}),(n,J)=>{var l,d,u,m,p,_,f,k,h,y,b,B;return e.openBlock(),e.createElementBlock("div",null,[x,e.createVNode(P.default,{title:"Добавить участника",onClosePopup:a,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[T,e.createElementVNode("div",O,[e.createVNode(C.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:t=>w.actions.read(t),state:null},options:{organization:e.unref(N).params._id},class:""},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(s,K)=>(e.openBlock(),e.createBlock(v.default,{key:s._id,editable:!1,product:s,onClick:()=>{let g={...s};g.quantity=1,i.actions.add(r.state.current.positions,g),a()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(q.default,{title:"Invetory Sheet",actions:[{label:"+",function:()=>V()}],class:"mn-b-semi"},{default:e.withCtx(()=>[r.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",S," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.state.current.positions,(t,s)=>(e.openBlock(),e.createBlock(v.default,{key:t._id,editable:!0,product:t,onIncrease:()=>{i.actions.increment(r.state.current.positions,t)},onDecrease:()=>{i.actions.decrement(r.state.current.positions,t)},onRemove:()=>{i.actions.delete(r.state.current.positions,t)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"]),e.createElementVNode("div",D,[e.createElementVNode("p",F,[e.createTextVNode("Сумма к оплате: "),((d=(l=e.unref(o))==null?void 0:l.info)==null?void 0:d.delivery)==="Самовывоз"?(e.openBlock(),e.createElementBlock("span",I,e.toDisplayString(n.orderTotalPrice/100)+"",1)):e.createCommentVNode("",!0),((m=(u=e.unref(o))==null?void 0:u.info)==null?void 0:m.delivery)==="Курьером"?(e.openBlock(),e.createElementBlock("span",R,e.toDisplayString(n.orderTotalPrice/100+350)+" ",1)):e.createCommentVNode("",!0),((_=(p=e.unref(o))==null?void 0:p.info)==null?void 0:_.delivery)==="Почтой"?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(n.orderTotalPrice/100+550)+" ₽",1)):e.createCommentVNode("",!0),e.createTextVNode(" (Заказ "+e.toDisplayString(n.orderTotalPrice/100)+" + доставка ",1),((k=(f=e.unref(o))==null?void 0:f.info)==null?void 0:k.delivery)==="Самовывоз"?(e.openBlock(),e.createElementBlock("span",L,"0")):e.createCommentVNode("",!0),((y=(h=e.unref(o))==null?void 0:h.info)==null?void 0:y.delivery)==="Курьером"?(e.openBlock(),e.createElementBlock("span",j,"350")):e.createCommentVNode("",!0),((B=(b=e.unref(o))==null?void 0:b.info)==null?void 0:B.delivery)==="Почтой"?(e.openBlock(),e.createElementBlock("span",z,"550")):e.createCommentVNode("",!0),e.createTextVNode(" ₽) ")]),A])])}}};exports.default=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),N=require("../../../../components/Feed/Feed.vue.cjs"),p=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),w=require("../../../../components/Popup/Popup.vue2.cjs"),o=require("../../../../components/Block/Block.vue.cjs"),f=require("../blocks/CardOrderItem.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");require("../../../../components/FieldPhone/all-countries.cjs");require("../../../../components/FieldPhone/FieldPhone2.vue.cjs");const C=require("../../../auth/store/auth.cjs"),a=require("../../../globals/store/globals.cjs"),t=require("../../store/orders.cjs"),V=require("../../../products/store/products.cjs");require("./EditOrder.vue2.cjs");const x={class:"flex-v-center flex-nowrap flex"},y=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),B=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),v={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},E={key:0,class:"w-100"},P={class:"h3 flex"},O=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),F={__name:"EditOrder",setup(R){const i=m.useRoute(),h=m.useRouter();let b=e.computed(()=>Number(t.state.current.positions.reduce((c,n)=>c+n.price*n.quantity,0)));const l=e.ref(!1);function _(){l.value=!0}function u(){l.value=!1}e.ref(null);function g(){t.state.current.creator={type:"user",target:C.state.user._id},t.state.current.owner={type:"organization",target:i.params._id},t.actions.create(t.state.current)}function k(){h.push({name:"Backoffice Orders",params:{_id:i.params._id}})}return e.onMounted(async()=>{}),(c,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(o.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",x,[y,e.createVNode(q.default,{submit:g,callback:k,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(w.default,{title:"Добавить участника",onClosePopup:u,isPopupOpen:l.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[B,e.createElementVNode("div",v,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>V.actions.read(r),state:null},options:{organization:e.unref(i).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(s,S)=>(e.openBlock(),e.createBlock(f.default,{key:s._id,editable:!1,product:s,onClick:()=>{let d={...s};d.quantity=1,a.actions.add(t.state.current.positions,d),u()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(o.default,{title:"Positions",actions:[{label:"+",function:()=>_()}],class:"mn-b-semi"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",E," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,s)=>(e.openBlock(),e.createBlock(f.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{a.actions.increment(t.state.current.positions,r)},onDecrease:()=>{a.actions.decrement(t.state.current.positions,r)},onRemove:()=>{a.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.createVNode(o.default,{title:"Client",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(p.default,{field:t.state.current.client.name,"onUpdate:field":n[0]||(n[0]=r=>t.state.current.client.name=r),label:"Client",placeholder:"Enter client name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),e.createVNode(p.default,{field:t.state.current.comment,"onUpdate:field":n[1]||(n[1]=r=>t.state.current.comment=r),label:"Comment",placeholder:"Enter comment",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"])]),_:1}),e.createVNode(o.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",P,[O,e.createElementVNode("span",null,e.toDisplayString(e.unref(b))+" "+e.toDisplayString(c.returnCurrency()),1)])]),_:1})]))}};exports.default=F;
@@ -1,138 +1,181 @@
1
- import { ref as V, onMounted as S, openBlock as e, createElementBlock as t, createVNode as p, withCtx as _, createElementVNode as r, unref as s, Fragment as B, renderList as D, createBlock as E, createCommentVNode as n, createTextVNode as f, toDisplayString as d } from "vue";
2
- import { useRoute as q } from "vue-router";
3
- import z from "../../../../components/Feed/Feed.vue.js";
4
- import A from "../../../../components/Popup/Popup.vue.js";
5
- import L from "../../../../components/Block/Block.vue.js";
6
- import I from "../blocks/CardOrderItem.vue.js";
7
- import "../../../../components/Field/Field.vue2.js";
8
- import "../../../../components/Select/Select.vue2.js";
1
+ import { computed as E, ref as b, onMounted as B, openBlock as i, createElementBlock as l, createVNode as r, withCtx as s, createElementVNode as o, createTextVNode as R, unref as h, Fragment as g, renderList as y, createBlock as w, createCommentVNode as V, toDisplayString as P } from "vue";
2
+ import { useRoute as D, useRouter as F } from "vue-router";
3
+ import I from "../../../../components/Feed/Feed.vue.js";
4
+ import k from "../../../../components/Field/Field.vue.js";
5
+ import T from "../../../../components/Button/Button.vue.js";
6
+ import q from "../../../../components/Popup/Popup.vue2.js";
7
+ import c from "../../../../components/Block/Block.vue.js";
8
+ import x from "../blocks/CardOrderItem.vue.js";
9
+ import "../../../../components/Select/Select.vue.js";
9
10
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
10
- import { actions as u } from "../../../globals/store/globals.js";
11
- import { state as a } from "../../store/orders.js";
12
- import { actions as M } from "../../../products/store/products.js";
11
+ import "../../../../components/FieldPhone/all-countries.js";
12
+ import "../../../../components/FieldPhone/FieldPhone2.vue.js";
13
+ import { state as z } from "../../../auth/store/auth.js";
14
+ import { actions as m } from "../../../globals/store/globals.js";
15
+ import { state as e, actions as A } from "../../store/orders.js";
16
+ import { actions as S } from "../../../products/store/products.js";
13
17
  import "./EditOrder.vue2.js";
14
- const j = /* @__PURE__ */ r("header", { class: "mn-b-medium flex-v-center flex-nowrap flex" }, [
15
- /* @__PURE__ */ r("h2", { class: "mn-r-medium" }, "Create Order")
16
- ], -1), G = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Add to order", -1), H = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, J = {
18
+ const U = { class: "flex-v-center flex-nowrap flex" }, L = /* @__PURE__ */ o("h2", { class: "mn-r-auto" }, "Create Order", -1), M = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Add to order", -1), j = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, G = {
17
19
  key: 0,
18
20
  class: "w-100"
19
- }, K = { class: "mn-thinw-100 flex-v-center flex block" }, Q = { class: "p-big" }, U = {
20
- key: 0,
21
- class: "p-big t-semi"
22
- }, W = {
23
- key: 1,
24
- class: "p-big t-semi"
25
- }, X = {
26
- key: 2,
27
- class: "p-big t-semi"
28
- }, Y = { key: 3 }, Z = { key: 4 }, ee = { key: 5 }, te = /* @__PURE__ */ r("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ye = {
21
+ }, H = { class: "h3 flex" }, J = /* @__PURE__ */ o("span", { class: "mn-r-auto t-transp" }, "In total", -1), pe = {
29
22
  __name: "EditOrder",
30
- setup(oe) {
31
- const R = q(), m = V(!1);
32
- function F() {
33
- m.value = !0;
23
+ setup(K) {
24
+ const u = D(), C = F();
25
+ let v = E(() => Number(e.current.positions.reduce((p, n) => p + n.price * n.quantity, 0)));
26
+ const d = b(!1);
27
+ function $() {
28
+ d.value = !0;
29
+ }
30
+ function f() {
31
+ d.value = !1;
32
+ }
33
+ b(null);
34
+ function N() {
35
+ e.current.creator = {
36
+ type: "user",
37
+ target: z.user._id
38
+ }, e.current.owner = {
39
+ type: "organization",
40
+ target: u.params._id
41
+ }, A.create(e.current);
34
42
  }
35
- function h() {
36
- m.value = !1;
43
+ function O() {
44
+ C.push({
45
+ name: "Backoffice Orders",
46
+ params: {
47
+ _id: u.params._id
48
+ }
49
+ });
37
50
  }
38
- let i = V(null);
39
- return S(async () => {
40
- }), (l, se) => {
41
- var b, y, v, g, k, P, w, x, C, N, O, T;
42
- return e(), t("div", null, [
43
- j,
44
- p(A, {
45
- title: "Добавить участника",
46
- onClosePopup: h,
47
- isPopupOpen: m.value,
48
- class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
49
- }, {
50
- default: _(() => [
51
- G,
52
- r("div", H, [
53
- p(z, {
54
- search: !0,
55
- states: {
56
- empty: {
57
- title: "No Products Found",
58
- description: "Currently, there are no such products available."
59
- }
60
- },
61
- store: {
62
- read: (o) => M.read(o),
63
- state: null
64
- },
65
- options: {
66
- organization: s(R).params._id
67
- },
68
- class: ""
69
- }, {
70
- default: _(({
71
- items: o
72
- }) => [
73
- (e(!0), t(B, null, D(o, (c, ne) => (e(), E(I, {
74
- key: c._id,
75
- editable: !1,
76
- product: c,
77
- onClick: () => {
78
- let $ = { ...c };
79
- $.quantity = 1, u.add(a.current.positions, $), h();
80
- },
81
- class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
82
- }, null, 8, ["product", "onClick"]))), 128))
83
- ]),
84
- _: 1
85
- }, 8, ["states", "store", "options"])
86
- ])
87
- ]),
88
- _: 1
89
- }, 8, ["isPopupOpen"]),
90
- p(L, {
91
- title: "Invetory Sheet",
92
- actions: [{
93
- label: "+",
94
- function: () => F()
95
- }],
96
- class: "mn-b-semi"
97
- }, {
98
- default: _(() => [
99
- a.current.positions.length === 0 ? (e(), t("span", J, " No positions added yet ")) : n("", !0),
100
- (e(!0), t(B, null, D(a.current.positions, (o, c) => (e(), E(I, {
101
- key: o._id,
102
- editable: !0,
103
- product: o,
104
- onIncrease: () => {
105
- u.increment(a.current.positions, o);
51
+ return B(async () => {
52
+ }), (p, n) => (i(), l("div", null, [
53
+ r(c, { class: "mn-b-thin" }, {
54
+ default: s(() => [
55
+ o("header", U, [
56
+ L,
57
+ r(T, {
58
+ submit: N,
59
+ callback: O,
60
+ class: "pd-small radius-big bg-main t-black uppercase t-medium"
61
+ }, {
62
+ default: s(() => [
63
+ R(" Add Order ")
64
+ ]),
65
+ _: 1
66
+ })
67
+ ])
68
+ ]),
69
+ _: 1
70
+ }),
71
+ r(q, {
72
+ title: "Добавить участника",
73
+ onClosePopup: f,
74
+ isPopupOpen: d.value,
75
+ class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
76
+ }, {
77
+ default: s(() => [
78
+ M,
79
+ o("div", j, [
80
+ r(I, {
81
+ search: !0,
82
+ states: {
83
+ empty: {
84
+ title: "No Products Found",
85
+ description: "Currently, there are no such products available."
86
+ }
106
87
  },
107
- onDecrease: () => {
108
- u.decrement(a.current.positions, o);
88
+ store: {
89
+ read: (t) => S.read(t),
90
+ state: null
109
91
  },
110
- onRemove: () => {
111
- u.delete(a.current.positions, o);
92
+ options: {
93
+ organization: h(u).params._id
112
94
  },
113
- class: "mn-b-thin pd-thin radius-medium bg-white"
114
- }, null, 8, ["product", "onIncrease", "onDecrease", "onRemove"]))), 128))
115
- ]),
116
- _: 1
117
- }, 8, ["actions"]),
118
- r("div", K, [
119
- r("p", Q, [
120
- f("Сумма к оплате: "),
121
- ((y = (b = s(i)) == null ? void 0 : b.info) == null ? void 0 : y.delivery) === "Самовывоз" ? (e(), t("span", U, d(l.orderTotalPrice / 100) + " ₽", 1)) : n("", !0),
122
- ((g = (v = s(i)) == null ? void 0 : v.info) == null ? void 0 : g.delivery) === "Курьером" ? (e(), t("span", W, d(l.orderTotalPrice / 100 + 350) + " ₽", 1)) : n("", !0),
123
- ((P = (k = s(i)) == null ? void 0 : k.info) == null ? void 0 : P.delivery) === "Почтой" ? (e(), t("span", X, d(l.orderTotalPrice / 100 + 550) + " ₽", 1)) : n("", !0),
124
- f(" (Заказ " + d(l.orderTotalPrice / 100) + " ₽ + доставка ", 1),
125
- ((x = (w = s(i)) == null ? void 0 : w.info) == null ? void 0 : x.delivery) === "Самовывоз" ? (e(), t("span", Y, "0")) : n("", !0),
126
- ((N = (C = s(i)) == null ? void 0 : C.info) == null ? void 0 : N.delivery) === "Курьером" ? (e(), t("span", Z, "350")) : n("", !0),
127
- ((T = (O = s(i)) == null ? void 0 : O.info) == null ? void 0 : T.delivery) === "Почтой" ? (e(), t("span", ee, "550")) : n("", !0),
128
- f(" ₽) ")
129
- ]),
130
- te
131
- ])
132
- ]);
133
- };
95
+ class: ""
96
+ }, {
97
+ default: s(({
98
+ items: t
99
+ }) => [
100
+ (i(!0), l(g, null, y(t, (a, Q) => (i(), w(x, {
101
+ key: a._id,
102
+ editable: !1,
103
+ product: a,
104
+ onClick: () => {
105
+ let _ = { ...a };
106
+ _.quantity = 1, m.add(e.current.positions, _), f();
107
+ },
108
+ class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
109
+ }, null, 8, ["product", "onClick"]))), 128))
110
+ ]),
111
+ _: 1
112
+ }, 8, ["states", "store", "options"])
113
+ ])
114
+ ]),
115
+ _: 1
116
+ }, 8, ["isPopupOpen"]),
117
+ r(c, {
118
+ title: "Positions",
119
+ actions: [{
120
+ label: "+",
121
+ function: () => $()
122
+ }],
123
+ class: "mn-b-semi"
124
+ }, {
125
+ default: s(() => [
126
+ e.current.positions.length === 0 ? (i(), l("span", G, " No positions added yet ")) : V("", !0),
127
+ (i(!0), l(g, null, y(e.current.positions, (t, a) => (i(), w(x, {
128
+ key: t._id,
129
+ editable: !0,
130
+ product: t,
131
+ onIncrease: () => {
132
+ m.increment(e.current.positions, t);
133
+ },
134
+ onDecrease: () => {
135
+ m.decrement(e.current.positions, t);
136
+ },
137
+ onRemove: () => {
138
+ m.delete(e.current.positions, t);
139
+ },
140
+ class: "mn-b-thin pd-thin radius-medium bg-white"
141
+ }, null, 8, ["product", "onIncrease", "onDecrease", "onRemove"]))), 128))
142
+ ]),
143
+ _: 1
144
+ }, 8, ["actions"]),
145
+ r(c, {
146
+ title: "Client",
147
+ class: "mn-b-semi"
148
+ }, {
149
+ default: s(() => [
150
+ r(k, {
151
+ field: e.current.client.name,
152
+ "onUpdate:field": n[0] || (n[0] = (t) => e.current.client.name = t),
153
+ label: "Client",
154
+ placeholder: "Enter client name",
155
+ class: "bg-white pd-medium radius-small mn-b-thin"
156
+ }, null, 8, ["field"]),
157
+ r(k, {
158
+ field: e.current.comment,
159
+ "onUpdate:field": n[1] || (n[1] = (t) => e.current.comment = t),
160
+ label: "Comment",
161
+ placeholder: "Enter comment",
162
+ class: "bg-white pd-medium radius-small mn-b-thin"
163
+ }, null, 8, ["field"])
164
+ ]),
165
+ _: 1
166
+ }),
167
+ r(c, { class: "mn-b-semi" }, {
168
+ default: s(() => [
169
+ o("div", H, [
170
+ J,
171
+ o("span", null, P(h(v)) + " " + P(p.returnCurrency()), 1)
172
+ ])
173
+ ]),
174
+ _: 1
175
+ })
176
+ ]));
134
177
  }
135
178
  };
136
179
  export {
137
- ye as default
180
+ pe as default
138
181
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),l=require("../../store/orders.cjs");require("../blocks/CardOrder.vue.cjs");const c={class:"mn-b-medium flex-v-center flex-nowrap flex"},u=e.createElementVNode("h2",{class:"mn-r-medium"},"Orders",-1),m={class:"cols-3 gap-thin"},p={class:"bg-grey pd-small radius-big"},_={class:"w-100 mn-b-thin p-big"},b=e.createElementVNode("p",{class:"mn-b-small t-transp w-100"},null,-1),g={__name:"Orders",setup(h){const n=o.useRoute();o.useRouter();const r=e.ref(n.query.tab?n.query.tab:"posts");return e.onMounted(async()=>{await l.actions.read()}),(a,s)=>{const d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",c,[u,e.createElementVNode("button",{onClick:s[0]||(s[0]=t=>a.$router.push({name:"AdminOrderAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(i.default,{selected:r.value,"onUpdate:selected":s[1]||(s[1]=t=>r.value=t),tabs:[{name:"All",value:"all"},{name:"New",value:"new"},{name:"Confirmed",value:"confirmed"},{name:"Finished",value:"finished"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("section",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.all,t=>(e.openBlock(),e.createElementBlock("div",p,[e.createTextVNode(" Status: "+e.toDisplayString(t.status)+" ",1),e.createElementVNode("p",_," Order No.: #"+e.toDisplayString(t._id),1),b,e.createElementVNode("p",{class:e.normalizeClass([{new:t.status==="Создан"},"mn-b-small"])},[e.createTextVNode(" Order Created: "+e.toDisplayString(a.formatDate(t.createdAt))+" ",1),e.createVNode(d,{to:{name:"AdminOrderEdit",params:{order:t._id}},class:"i-small"},{default:e.withCtx(()=>[e.createTextVNode(" EDIT ")]),_:2},1032,["to"])],2)]))),256))])],64)}}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),i=require("../../../../components/Tab/Tab.vue.cjs"),o=require("../../store/orders.cjs"),c=require("../../../auth/store/auth.cjs");require("../blocks/CardOrder.vue.cjs");const u=require("../../../globals/components/blocks/CardHeader.vue.cjs"),m={class:"mn-b-medium flex-v-center flex-nowrap flex"},p=e.createElementVNode("h2",{class:"mn-r-medium"},"Orders",-1),b={class:"cols-3 gap-thin"},h={class:"pd-small"},_={class:"w-100 mn-b-thin p-big"},g={class:"mn-b-thin pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},f=e.createElementVNode("p",{class:"mn-b-small t-transp w-100"},null,-1),v={__name:"Orders",setup(y){const r=l.useRoute();l.useRouter();const a=e.ref(r.query.tab?r.query.tab:"posts");return e.onMounted(async()=>{await o.actions.read()}),(n,s)=>{const d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",m,[p,e.createElementVNode("button",{onClick:s[0]||(s[0]=t=>n.$router.push({name:"AdminOrderAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(i.default,{selected:a.value,"onUpdate:selected":s[1]||(s[1]=t=>a.value=t),tabs:[{name:"All",value:"all"},{name:"New",value:"new"},{name:"Confirmed",value:"confirmed"},{name:"Finished",value:"finished"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("section",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.state.all,t=>(e.openBlock(),e.createBlock(d,{to:{name:"Order Edit",params:{order:t._id}},class:"bg-grey radius-big"},{default:e.withCtx(()=>[e.createVNode(u.default,{class:e.normalizeClass({"mn-b-small pd-medium":n.type!=="short","flex-child-order-last flex-child mn-l-small":n.type==="short"}),entity:t,entityType:"order",user:c.state.user,owner:t.creator,creator:t.creator,date:t.createdAt},null,8,["class","entity","user","owner","creator","date"]),e.createElementVNode("div",h,[e.createElementVNode("p",_," Order No.: #"+e.toDisplayString(t._id),1),e.createElementVNode("span",g,e.toDisplayString(t.status),1),f,e.createElementVNode("p",{class:e.normalizeClass([{new:t.status==="Создан"},"mn-b-small"])},null,2)])]),_:2},1032,["to"]))),256))])],64)}}};exports.default=v;