@ozdao/prometheus-framework 0.2.101 โ†’ 0.2.103

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/main-DfD5hLQo.mjs +13633 -0
  2. package/dist/main-DwyUYWFX.js +92 -0
  3. package/dist/orders.server.js +16 -0
  4. package/dist/orders.server.mjs +16 -0
  5. package/dist/products.server.js +7 -1
  6. package/dist/products.server.mjs +7 -1
  7. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  9. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -94
  11. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +94 -1
  13. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +23 -21
  15. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
  17. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
  19. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  21. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +1 -36
  23. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +36 -1
  25. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
  27. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -1
  29. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  43. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  63. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  69. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  73. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  75. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  81. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  85. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  107. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +87 -67
  109. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +30 -31
  119. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +120 -88
  123. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  129. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  131. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  135. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  139. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  143. package/dist/prometheus-framework.cjs.js +1 -1
  144. package/dist/prometheus-framework.es.js +1 -1
  145. package/dist/style.css +1 -1
  146. package/dist/web-C0sFgeYh.mjs +54 -0
  147. package/dist/web-kg3KgbAF.js +1 -0
  148. package/package.json +1 -1
  149. package/src/components/Feed/Feed.vue +9 -10
  150. package/src/modules/orders/controllers/orders.controller.js +20 -1
  151. package/src/modules/products/components/blocks/CardPosition.vue +32 -7
  152. package/src/modules/products/components/pages/EditLeftover.vue +0 -3
  153. package/src/modules/products/components/pages/ProductEdit.vue +51 -15
  154. package/src/modules/products/controllers/products.controller.js +1 -2
  155. package/src/modules/products/models/product.model.js +6 -0
  156. package/src/modules/products/routes/products.routes.js +1 -10
@@ -1,83 +1,85 @@
1
- import { ref as U, onMounted as A, openBlock as n, createElementBlock as s, createVNode as a, withCtx as l, createElementVNode as f, toDisplayString as B, unref as g, createBlock as y, createTextVNode as C, createCommentVNode as $, Fragment as _, renderList as h } from "vue";
2
- import { useRoute as E, useRouter as R } from "vue-router";
1
+ import { ref as U, onMounted as B, openBlock as n, createElementBlock as s, createVNode as a, withCtx as l, createElementVNode as m, toDisplayString as E, unref as p, createBlock as b, createTextVNode as $, createCommentVNode as z, Fragment as f, renderList as _ } from "vue";
2
+ import { useRoute as F, useRouter as R } from "vue-router";
3
3
  import "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import d from "../../../../components/Block/Block.vue.js";
7
- import "../../../../components/Tab/Tab.vue2.js";
8
- import b from "../../../../components/Field/Field.vue.js";
7
+ import "../../../../components/Tab/Tab.vue.js";
8
+ import v from "../../../../components/Field/Field.vue2.js";
9
9
  import S from "../../../../components/Checkbox/Checkbox.vue.js";
10
- import z from "../../../../components/Button/Button.vue.js";
10
+ import N from "../../../../components/Button/Button.vue2.js";
11
11
  import T from "../../../../components/Popup/Popup.vue.js";
12
- import F from "../../../../components/EditImages/EditImages.vue.js";
13
- import N from "../../../icons/navigation/IconDelete.vue.js";
14
- import D from "../blocks/CardPosition.vue.js";
15
- import L from "../sections/EditProductInfo.vue.js";
16
- import { actions as v } from "../../../globals/store/globals.js";
17
- import { state as e, mutations as M, actions as u } from "../../store/products.js";
18
- import { actions as j, state as q } from "../../store/categories.js";
12
+ import A from "../../../../components/Feed/Feed.vue.js";
13
+ import L from "../../../../components/EditImages/EditImages.vue.js";
14
+ import D from "../../../icons/navigation/IconDelete.vue.js";
15
+ import q from "../blocks/CardPosition.vue.js";
16
+ import M from "../../../orders/components/blocks/CardOrderItem.vue.js";
17
+ import j from "../sections/EditProductInfo.vue.js";
18
+ import { actions as w } from "../../../globals/store/globals.js";
19
+ import { state as e, mutations as G, actions as c } from "../../store/products.js";
20
+ import { actions as H, state as J } from "../../store/categories.js";
19
21
  import "./ProductEdit.vue2.js";
20
- const G = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, H = { class: "mn-r-auto" }, J = { class: "cols-2 gap-thin" }, K = {
22
+ const K = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, Q = { class: "mn-r-auto" }, W = { class: "cols-2 gap-thin" }, X = {
21
23
  key: 0,
22
24
  class: "cols-1 gap-thin"
23
- }, Q = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, W = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, he = {
25
+ }, Y = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, Z = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, ee = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, ke = {
24
26
  __name: "ProductEdit",
25
- setup(X) {
26
- const i = E(), k = R(), w = U(e.all), x = U(!1);
27
- function O(m) {
28
- x.value = !0;
27
+ setup(te) {
28
+ const o = F(), k = R(), P = U(e.all), y = U(!1);
29
+ function O(g) {
30
+ y.value = !0;
29
31
  }
30
- function p() {
31
- x.value = !1;
32
+ function u() {
33
+ y.value = !1;
32
34
  }
33
- A(async () => {
34
- M.resetProduct(), i.params.product && await u.read({ _id: i.params.product }), e.current.ingredients || (e.current.ingredients = []), await j.fetchCategories();
35
+ B(async () => {
36
+ G.resetProduct(), o.params.product && await c.read({ _id: o.params.product }), e.current.ingredients || (e.current.ingredients = []), await H.fetchCategories();
35
37
  try {
36
- const m = await u.read({
37
- organization: i.params._id,
38
+ const g = await c.read({
39
+ organization: o.params._id,
38
40
  limit: 100
39
41
  });
40
- w.value = m;
42
+ P.value = g;
41
43
  } catch {
42
44
  console.error("error");
43
45
  }
44
46
  });
45
47
  function I() {
46
- i.params.product ? u.update(i.params.product, e.current) : u.create(i.params._id, e.current);
48
+ o.params.product ? c.update(o.params.product, e.current) : c.create(o.params._id, e.current);
47
49
  }
48
50
  function V() {
49
- u.deleteProduct(e.current._id);
51
+ c.deleteProduct(e.current._id);
50
52
  }
51
- function P() {
53
+ function C() {
52
54
  k.push({
53
55
  name: "Organization",
54
56
  params: {
55
- _id: i.params._id
57
+ _id: o.params._id
56
58
  }
57
59
  });
58
60
  }
59
- return (m, c) => (n(), s("div", G, [
61
+ return (g, h) => (n(), s("div", K, [
60
62
  a(d, { class: "flex-nowrap flex-v-center flex" }, {
61
63
  default: l(() => [
62
- f("h1", H, B(g(i).params.product ? e.current.name : "Create Product"), 1),
63
- g(i).params.product ? (n(), y(z, {
64
+ m("h1", Q, E(p(o).params.product ? e.current.name : "Create Product"), 1),
65
+ p(o).params.product ? (n(), b(N, {
64
66
  key: 0,
65
67
  submit: V,
66
- callback: P,
68
+ callback: C,
67
69
  class: "bg-red mn-r-thin"
68
70
  }, {
69
71
  default: l(() => [
70
- C(" Delete ")
72
+ $(" Delete ")
71
73
  ]),
72
74
  _: 1
73
- })) : $("", !0),
74
- a(z, {
75
+ })) : z("", !0),
76
+ a(N, {
75
77
  submit: I,
76
- callback: P,
78
+ callback: C,
77
79
  class: "bg-main"
78
80
  }, {
79
81
  default: l(() => [
80
- C(" Save ")
82
+ $(" Save ")
81
83
  ]),
82
84
  _: 1
83
85
  })
@@ -89,20 +91,20 @@ const G = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, H = { class
89
91
  class: "h-min"
90
92
  }, {
91
93
  default: l(() => [
92
- a(F, {
94
+ a(L, {
93
95
  images: e.current.images,
94
96
  uploadPath: "photos",
95
- "onUpdate:images": c[0] || (c[0] = (t) => {
97
+ "onUpdate:images": h[0] || (h[0] = (t) => {
96
98
  e.current.images = t;
97
99
  })
98
100
  }, null, 8, ["images"])
99
101
  ]),
100
102
  _: 1
101
103
  }),
102
- f("div", J, [
104
+ m("div", W, [
103
105
  a(d, { title: "Profile" }, {
104
106
  default: l(() => [
105
- a(L, {
107
+ a(j, {
106
108
  product: e.current
107
109
  }, null, 8, ["product"])
108
110
  ]),
@@ -117,41 +119,89 @@ const G = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, H = { class
117
119
  }]
118
120
  }, {
119
121
  default: l(() => [
120
- e.current.ingredients.length > 0 ? (n(), s("div", K, [
121
- (n(!0), s(_, null, h(e.current.ingredients, (t, o) => (n(), y(D, {
122
+ e.current.ingredients.length > 0 ? (n(), s("div", X, [
123
+ (n(!0), s(f, null, _(e.current.ingredients, (t, i) => (n(), b(q, {
122
124
  key: t._id,
123
125
  product: t,
124
126
  array: e.current.ingredients,
125
- products: w.value,
126
- onAdd: c[1] || (c[1] = (r) => {
127
- v.add(e.current.ingredients, r), p();
127
+ products: P.value,
128
+ showPrice: !1,
129
+ onAdd: h[1] || (h[1] = (r) => {
130
+ w.add(e.current.ingredients, r), u();
128
131
  }),
129
132
  onUpdate: (r) => {
130
- v.update(e.current.ingredients, r, o), p();
133
+ w.update(e.current.ingredients, r, i), u();
131
134
  },
132
135
  onDelete: (r) => {
133
- v.delete(e.current.ingredients, r, o), p();
136
+ w.delete(e.current.ingredients, r, i), u();
134
137
  }
135
138
  }, null, 8, ["product", "array", "products", "onUpdate", "onDelete"]))), 128))
136
- ])) : $("", !0)
139
+ ])) : z("", !0)
137
140
  ]),
138
141
  _: 1
139
- }, 8, ["actions"])
142
+ }, 8, ["actions"]),
143
+ a(T, {
144
+ title: "Add ingredient",
145
+ onClosePopup: u,
146
+ isPopupOpen: y.value,
147
+ class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
148
+ }, {
149
+ default: l(() => [
150
+ m("div", Y, [
151
+ a(A, {
152
+ search: {
153
+ class: "bg-white mn-b-thin"
154
+ },
155
+ states: {
156
+ empty: {
157
+ title: "No Products Found",
158
+ description: "Currently, there are no such products available."
159
+ }
160
+ },
161
+ store: {
162
+ read: (t) => c.read(t),
163
+ state: null
164
+ },
165
+ options: {
166
+ organization: p(o).params._id
167
+ },
168
+ class: ""
169
+ }, {
170
+ default: l(({
171
+ items: t
172
+ }) => [
173
+ (n(!0), s(f, null, _(t, (i, r) => (n(), b(M, {
174
+ key: i._id,
175
+ editable: !1,
176
+ product: i,
177
+ onClick: () => {
178
+ let x = { ...i };
179
+ x.quantity = 1, x.type = "pcs", w.add(e.current.ingredients, x), u();
180
+ },
181
+ class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
182
+ }, null, 8, ["product", "onClick"]))), 128))
183
+ ]),
184
+ _: 1
185
+ }, 8, ["store", "options"])
186
+ ])
187
+ ]),
188
+ _: 1
189
+ }, 8, ["isPopupOpen"])
140
190
  ]),
141
191
  a(d, {
142
192
  title: "Categories",
143
193
  actions: [{
144
194
  label: "+",
145
- function: () => g(k).push({
195
+ function: () => p(k).push({
146
196
  name: "Categories Organization",
147
197
  params: {
148
- _id: g(i).params._id
198
+ _id: p(o).params._id
149
199
  }
150
200
  })
151
201
  }]
152
202
  }, {
153
203
  default: l(() => [
154
- (n(!0), s(_, null, h(q.all, (t, o) => (n(), y(S, {
204
+ (n(!0), s(f, null, _(J.all, (t, i) => (n(), b(S, {
155
205
  label: t.name,
156
206
  name: "categories",
157
207
  value: t.url,
@@ -172,25 +222,25 @@ const G = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, H = { class
172
222
  class: "cols-1 gap-thin"
173
223
  }, {
174
224
  default: l(() => [
175
- (n(!0), s(_, null, h(e.current.information, (t, o) => (n(), s("div", {
225
+ (n(!0), s(f, null, _(e.current.information, (t, i) => (n(), s("div", {
176
226
  class: "gap-thin flex-nowrap flex",
177
- key: o
227
+ key: i
178
228
  }, [
179
- a(b, {
229
+ a(v, {
180
230
  field: t.name,
181
231
  "onUpdate:field": (r) => t.name = r,
182
232
  placeholder: "ะะฐะทะฒะฐะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",
183
233
  class: "w-100 bg-white radius-small pd-medium"
184
234
  }, null, 8, ["field", "onUpdate:field"]),
185
- a(b, {
235
+ a(v, {
186
236
  field: t.value,
187
237
  "onUpdate:field": (r) => t.value = r,
188
238
  placeholder: "ะ—ะฝะฐั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",
189
239
  class: "w-100 bg-white radius-small pd-medium"
190
240
  }, null, 8, ["field", "onUpdate:field"]),
191
- f("div", Q, [
192
- a(N, {
193
- onClick: () => e.current.information.splice(o, 1),
241
+ m("div", Z, [
242
+ a(D, {
243
+ onClick: () => e.current.information.splice(i, 1),
194
244
  class: "i-medium"
195
245
  }, null, 8, ["onClick"])
196
246
  ])
@@ -207,53 +257,35 @@ const G = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, H = { class
207
257
  }]
208
258
  }, {
209
259
  default: l(() => [
210
- (n(!0), s(_, null, h(e.current.localization, (t, o) => (n(), s("div", {
260
+ (n(!0), s(f, null, _(e.current.localization, (t, i) => (n(), s("div", {
211
261
  class: "gap-thin mn-b-thin flex-nowrap flex",
212
- key: o
262
+ key: i
213
263
  }, [
214
- a(b, {
264
+ a(v, {
215
265
  field: t.name,
216
266
  "onUpdate:field": (r) => t.name = r,
217
267
  placeholder: "ะะฐะทะฒะฐะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",
218
268
  class: "w-100 bg-white radius-small pd-medium"
219
269
  }, null, 8, ["field", "onUpdate:field"]),
220
- a(b, {
270
+ a(v, {
221
271
  field: t.value,
222
272
  "onUpdate:field": (r) => t.value = r,
223
273
  placeholder: "ะ—ะฝะฐั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",
224
274
  class: "w-100 bg-white radius-small pd-medium"
225
275
  }, null, 8, ["field", "onUpdate:field"]),
226
- f("div", W, [
227
- a(N, {
228
- onClick: () => e.current.localization.splice(o, 1),
276
+ m("div", ee, [
277
+ a(D, {
278
+ onClick: () => e.current.localization.splice(i, 1),
229
279
  class: "i-medium"
230
280
  }, null, 8, ["onClick"])
231
281
  ])
232
282
  ]))), 128))
233
283
  ]),
234
284
  _: 1
235
- }, 8, ["actions"]),
236
- a(T, {
237
- title: "Add ingredient",
238
- onClosePopup: p,
239
- isPopupOpen: x.value,
240
- class: "bg-white pd-big radius-big"
241
- }, {
242
- default: l(() => [
243
- a(D, {
244
- onAdd: c[2] || (c[2] = (t) => v.add(
245
- e.current.ingredients,
246
- t
247
- )),
248
- products: w.value,
249
- class: "flex-column"
250
- }, null, 8, ["products"])
251
- ]),
252
- _: 1
253
- }, 8, ["isPopupOpen"])
285
+ }, 8, ["actions"])
254
286
  ]));
255
287
  }
256
288
  };
257
289
  export {
258
- he as default
290
+ ke as default
259
291
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/store/auth.cjs"),l=require("../../store/products.cjs"),f={class:"pd-thin"},y={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},g=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),q={class:"cols-2-1_3 bg-grey pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=c.useRoute(),n=c.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",y,[g,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",q,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>l.actions.read(o),state:l.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/store/auth.cjs"),l=require("../../store/products.cjs"),f={class:"pd-thin"},y={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},g=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),q={class:"cols-2-1_3 bg-grey pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=c.useRoute(),n=c.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",y,[g,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",q,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>l.actions.read(o),state:l.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as _, watch as f, openBlock as i, createElementBlock as l, unref as t, createElementVNode as n, createCommentVNode as m, createBlock as p, createVNode as c, withCtx as b, Fragment as v, renderList as y } from "vue";
2
2
  import { useRoute as g, useRouter as q } from "vue-router";
3
- import P from "../../../../components/Tab/Tab.vue.js";
3
+ import P from "../../../../components/Tab/Tab.vue2.js";
4
4
  import $ from "../../../../components/Feed/Feed.vue.js";
5
5
  import k from "../sections/FilterProducts.vue.js";
6
6
  import C 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"),c=require("../../../../components/Field/Field.vue.cjs"),L={key:0,class:"mn-b-small w-100"},k={class:"w-100 flex-nowrap flex"},w=["onClick"],E=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),g=[E],N=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),V=["onClick"],B=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),x=[B],C=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),U=["onClick"],y={__name:"EditModifications",props:{product:Object},emits:["add-modification","delete-modification","add-characteristic","delete-characteristic","submit"],setup(u,{emit:m}){const o=m,f=u,{product:r}=e.toRefs(f);function p(){o("add-modification")}function h(l){o("delete-modification",l)}function b(l){o("add-characteristic",l)}function _(l,d){o("delete-characteristic",{modIndex:l,charIndex:d})}function v(){o("submit")}return(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.unref(r).modifications.length==0?(e.openBlock(),e.createElementBlock("p",L,"ะฃ ะฟั€ะพะดัƒะบั‚ะฐ ะตั‰ะต ะฝะต ะทะฐะดะฐะฝั‹ ะผะพะดะธั„ะธะบะฐั†ะธะธ.")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).modifications,(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small flex-column flex-wrap block",key:i},[e.createElementVNode("div",k,[e.createVNode(c.default,{field:n.quantity,"onUpdate:field":t=>n.quantity=t,disabled:!0,placeholder:"ะšะพะปะธั‡ะตัั‚ะฒะพ",class:"mn-b-medium input-text input",type:"number"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:n.name,"onUpdate:field":t=>n.name=t,placeholder:"ะะพะฒะฐั ะผะพะดะธั„ะธะบะฐั†ะธั",class:"mn-b-medium input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:t=>h(i),class:"mn-l-small i-normal pd-regular button-delete button"},g,8,w)]),N,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.characteristics,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-medium w-100 flex-nowrap flex variants-wrapper",key:s},[e.createVNode(c.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"input-text input"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:t.value,"onUpdate:field":a=>t.value=a,placeholder:"ะ—ะฝะฐั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"mn-l-small input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:a=>_(i,s),class:"mn-l-small i-normal pd-regular button-delete button"},x,8,V)]))),128)),C,e.createElementVNode("button",{onClick:t=>b(i),class:"button"},"ะ”ะพะฑะฐะฒะธั‚ัŒ ั…ะฐั€ะฐะบั‚ะตั€ะธัั‚ะธะบัƒ",8,U)]))),128)),e.createElementVNode("div",{class:"mn-b-big t-center flex-center flex block"},[e.createElementVNode("button",{onClick:p,class:"w-100"},"ะ”ะพะฑะฐะฒะธั‚ัŒ ะผะพะดะธั„ะธะบะฐั†ัŽ")]),e.createElementVNode("button",{onClick:d[0]||(d[0]=n=>v()),class:"button"},"ะกะพั…ั€ะฐะฝะธั‚ัŒ ะผะพะดะธั„ะธะบะฐั†ะธะธ")]))}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Field/Field.vue2.cjs"),L={key:0,class:"mn-b-small w-100"},k={class:"w-100 flex-nowrap flex"},w=["onClick"],E=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),g=[E],N=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),V=["onClick"],B=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),x=[B],C=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),U=["onClick"],y={__name:"EditModifications",props:{product:Object},emits:["add-modification","delete-modification","add-characteristic","delete-characteristic","submit"],setup(u,{emit:m}){const o=m,f=u,{product:r}=e.toRefs(f);function p(){o("add-modification")}function h(l){o("delete-modification",l)}function b(l){o("add-characteristic",l)}function _(l,d){o("delete-characteristic",{modIndex:l,charIndex:d})}function v(){o("submit")}return(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.unref(r).modifications.length==0?(e.openBlock(),e.createElementBlock("p",L,"ะฃ ะฟั€ะพะดัƒะบั‚ะฐ ะตั‰ะต ะฝะต ะทะฐะดะฐะฝั‹ ะผะพะดะธั„ะธะบะฐั†ะธะธ.")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).modifications,(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small flex-column flex-wrap block",key:i},[e.createElementVNode("div",k,[e.createVNode(c.default,{field:n.quantity,"onUpdate:field":t=>n.quantity=t,disabled:!0,placeholder:"ะšะพะปะธั‡ะตัั‚ะฒะพ",class:"mn-b-medium input-text input",type:"number"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:n.name,"onUpdate:field":t=>n.name=t,placeholder:"ะะพะฒะฐั ะผะพะดะธั„ะธะบะฐั†ะธั",class:"mn-b-medium input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:t=>h(i),class:"mn-l-small i-normal pd-regular button-delete button"},g,8,w)]),N,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.characteristics,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-medium w-100 flex-nowrap flex variants-wrapper",key:s},[e.createVNode(c.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"input-text input"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:t.value,"onUpdate:field":a=>t.value=a,placeholder:"ะ—ะฝะฐั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะฐ",class:"mn-l-small input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:a=>_(i,s),class:"mn-l-small i-normal pd-regular button-delete button"},x,8,V)]))),128)),C,e.createElementVNode("button",{onClick:t=>b(i),class:"button"},"ะ”ะพะฑะฐะฒะธั‚ัŒ ั…ะฐั€ะฐะบั‚ะตั€ะธัั‚ะธะบัƒ",8,U)]))),128)),e.createElementVNode("div",{class:"mn-b-big t-center flex-center flex block"},[e.createElementVNode("button",{onClick:p,class:"w-100"},"ะ”ะพะฑะฐะฒะธั‚ัŒ ะผะพะดะธั„ะธะบะฐั†ัŽ")]),e.createElementVNode("button",{onClick:d[0]||(d[0]=n=>v()),class:"button"},"ะกะพั…ั€ะฐะฝะธั‚ัŒ ะผะพะดะธั„ะธะบะฐั†ะธะธ")]))}};exports.default=y;
@@ -1,5 +1,5 @@
1
1
  import { toRefs as U, openBlock as i, createElementBlock as o, unref as p, createCommentVNode as y, Fragment as h, renderList as b, createElementVNode as e, createVNode as r } from "vue";
2
- import u from "../../../../components/Field/Field.vue.js";
2
+ import u from "../../../../components/Field/Field.vue2.js";
3
3
  const M = {
4
4
  key: 0,
5
5
  class: "mn-b-small w-100"
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");const r=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/Select/Select.vue.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,t)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":t[0]||(t[0]=l=>e.product.status=l),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":t[1]||(t[1]=l=>e.product.name=l),label:"Name",placeholder:"Enter product name",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":t[3]||(t[3]=l=>e.product.price=l),label:"Price",placeholder:"Enter product price",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":t[2]||(t[2]=l=>e.product.price.currency=l),placeholder:"เธฟ",options:["เธฟ"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":t[4]||(t[4]=l=>e.product.description=l),label:"Description",placeholder:"Enter product description",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const r=require("../../../../components/Field/Field.vue2.cjs"),u=require("../../../../components/Select/Select.vue.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,t)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":t[0]||(t[0]=l=>e.product.status=l),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":t[1]||(t[1]=l=>e.product.name=l),label:"Name",placeholder:"Enter product name",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":t[3]||(t[3]=l=>e.product.price=l),label:"Price",placeholder:"Enter product price",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":t[2]||(t[2]=l=>e.product.price.currency=l),placeholder:"เธฟ",options:["เธฟ"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":t[4]||(t[4]=l=>e.product.description=l),label:"Description",placeholder:"Enter product description",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
@@ -1,7 +1,7 @@
1
1
  import { openBlock as u, createElementBlock as a, Fragment as o, createVNode as d, withCtx as n } from "vue";
2
2
  import "../../../../components/Loader/Loader.vue.js";
3
- import "../../../../components/Button/Button.vue2.js";
4
- import r from "../../../../components/Field/Field.vue.js";
3
+ import "../../../../components/Button/Button.vue.js";
4
+ import r from "../../../../components/Field/Field.vue2.js";
5
5
  import i from "../../../../components/Select/Select.vue.js";
6
6
  const w = {
7
7
  __name: "EditProductInfo",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../../components/Button/Button.vue.cjs"),u=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),g=require("../blocks/Images360.vue.cjs"),h=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const k=require("../elements/Price.vue.cjs"),f=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),p={class:"cols-2-1_2 w-100 gap-big"},y={class:"flex-nowrap flex-column flex pos-relative"},b={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},B=["src"],v={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},V={key:0,class:"t-main t-semi p-big"},N={class:"w-100 h1-product mn-b-thin"},E={key:1,class:"mn-b-semi"},w={key:2,class:"w-100 mn-b-medium t-transp"},C={key:3,class:"w-100 mn-b-medium t-transp"},S={class:"cols-2 w-100 gap-small mn-b-semi"},x={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},q={class:"t-demi"},z={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},D={__name:"SectionProduct",props:{product:{type:Object,required:!0},user:{type:String},recommendation:{type:String}},setup(t){const i=t,a=e.computed(()=>i.product.images),s={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI ะ ะตะบะพะผะตะฝะดัƒะตั‚ ะฒะฐะผ",description:"",addtoorder:"ะ”ะพะฑะฐะฒะธั‚ัŒ ะฒ ะบะพั€ะทะธะฝัƒ",fastorder:"ะ‘ั‹ัั‚ั€ั‹ะน ะทะฐะบะฐะท"}}},{t:c}=f.useI18n(s);function l(o){return!(o.quantity>0)}function d(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,I)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",y,[e.createElementVNode("div",b,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(g.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,B)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(u.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(h.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v,[t.recommendation?(e.openBlock(),e.createElementBlock("h2",V,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",N,e.toDisplayString(t.product.name),1),e.createVNode(k.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",E,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",w,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",S,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("p",q,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",z,[e.createVNode(m.default,{submit:r=>d(t.product),disabled:l(t.product),text:{success:" โœ” Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=D;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs"),u=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),g=require("../blocks/Images360.vue.cjs"),h=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const k=require("../elements/Price.vue.cjs"),f=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),p={class:"cols-2-1_2 w-100 gap-big"},y={class:"flex-nowrap flex-column flex pos-relative"},b={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},B=["src"],v={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},V={key:0,class:"t-main t-semi p-big"},N={class:"w-100 h1-product mn-b-thin"},E={key:1,class:"mn-b-semi"},w={key:2,class:"w-100 mn-b-medium t-transp"},C={key:3,class:"w-100 mn-b-medium t-transp"},S={class:"cols-2 w-100 gap-small mn-b-semi"},x={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},q={class:"t-demi"},z={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},D={__name:"SectionProduct",props:{product:{type:Object,required:!0},user:{type:String},recommendation:{type:String}},setup(t){const i=t,a=e.computed(()=>i.product.images),s={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI ะ ะตะบะพะผะตะฝะดัƒะตั‚ ะฒะฐะผ",description:"",addtoorder:"ะ”ะพะฑะฐะฒะธั‚ัŒ ะฒ ะบะพั€ะทะธะฝัƒ",fastorder:"ะ‘ั‹ัั‚ั€ั‹ะน ะทะฐะบะฐะท"}}},{t:c}=f.useI18n(s);function l(o){return!(o.quantity>0)}function d(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,I)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",y,[e.createElementVNode("div",b,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(g.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,B)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(u.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(h.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v,[t.recommendation?(e.openBlock(),e.createElementBlock("h2",V,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",N,e.toDisplayString(t.product.name),1),e.createVNode(k.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",E,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",w,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",S,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("p",q,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",z,[e.createVNode(m.default,{submit:r=>d(t.product),disabled:l(t.product),text:{success:" โœ” Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=D;
@@ -1,5 +1,5 @@
1
1
  import { computed as y, openBlock as t, createElementBlock as a, createElementVNode as r, createBlock as m, createCommentVNode as o, toDisplayString as s, unref as l, createVNode as g, Fragment as v, renderList as w, withCtx as x, createTextVNode as k } from "vue";
2
- import z from "../../../../components/Button/Button.vue.js";
2
+ import z from "../../../../components/Button/Button.vue2.js";
3
3
  import I from "../../../icons/placeholders/PlaceholderImage.vue.js";
4
4
  import C from "../blocks/Images360.vue.js";
5
5
  import E from "../blocks/ImagesThumbnails.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue.cjs"),d=require("../../../../components/Button/Button.vue.cjs"),m=require("../../../../components/Select/Select.vue.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:o[1]||(o[1]=n=>u())},[e.renderSlot(p.$slots,"default"),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[0]||(o[0]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),m=require("../../../../components/Select/Select.vue.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:o[1]||(o[1]=n=>u())},[e.renderSlot(p.$slots,"default"),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[0]||(o[0]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};exports.default=h;
@@ -1,6 +1,6 @@
1
1
  import { reactive as d, ref as f, openBlock as b, createElementBlock as g, renderSlot as h, createVNode as s, withCtx as l, createTextVNode as y, createElementVNode as a } from "vue";
2
2
  import _ from "../../../../components/Popup/Popup.vue.js";
3
- import v from "../../../../components/Button/Button.vue.js";
3
+ import v from "../../../../components/Button/Button.vue2.js";
4
4
  import w from "../../../../components/Select/Select.vue.js";
5
5
  import { actions as S } from "../../store/reports.js";
6
6
  const k = /* @__PURE__ */ a("h3", { class: "mn-b-small" }, " Report Content ", -1), P = /* @__PURE__ */ a("p", { class: "p-medium mn-b-small" }, " We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ", -1), R = /* @__PURE__ */ a("p", { class: "p-medium mn-b-small" }, "Our moderators will review your report within 24 hours and take action if it violates our policies.", -1), O = {
@@ -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/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");const g=require("../../../../components/Dropdown/Dropdown.vue.cjs"),h=require("../../../../components/Completion/Completion.vue.cjs"),d=require("../../../mobile/components/Menu/Menu.vue2.cjs"),l=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),B=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),E=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const v={key:0,class:"for-transition w-100"},x={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={key:4,class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},O={key:6,class:"mn-t-small mn-b-thin"},L=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),A=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),T={__name:"Profile",setup(H){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{E.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",v,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",x," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(h.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0,text_cta:"Fill Profile",text:"Profile completed at",class:"mn-b-medium"},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(g.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(B.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1})):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(y.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo&&t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(C.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Anonymous"),1),t.state.current.username?(e.openBlock(),e.createElementBlock("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1)):e.createCommentVNode("",!0),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Bio not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:5,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",O," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(N.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(V.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),L]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),j]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),A]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[8]||(r[8]=s=>b())},{default:e.withCtx(()=>[G]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const g=require("../../../../components/Dropdown/Dropdown.vue.cjs"),h=require("../../../../components/Completion/Completion.vue.cjs"),d=require("../../../mobile/components/Menu/Menu.vue.cjs"),l=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),B=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),E=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const v={key:0,class:"for-transition w-100"},x={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={key:4,class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},O={key:6,class:"mn-t-small mn-b-thin"},L=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),A=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),T={__name:"Profile",setup(H){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{E.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",v,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",x," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(h.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0,text_cta:"Fill Profile",text:"Profile completed at",class:"mn-b-medium"},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(g.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(B.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1})):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(y.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo&&t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(C.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Anonymous"),1),t.state.current.username?(e.openBlock(),e.createElementBlock("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1)):e.createCommentVNode("",!0),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Bio not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:5,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",O," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(N.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(V.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),L]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),j]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),A]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[8]||(r[8]=s=>b())},{default:e.withCtx(()=>[G]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=T;
@@ -1,10 +1,10 @@
1
1
  import { ref as U, onMounted as C, openBlock as i, createElementBlock as c, unref as t, createBlock as d, createCommentVNode as m, createElementVNode as l, withCtx as u, createVNode as a, toDisplayString as _, Fragment as E, renderList as S, normalizeClass as P } from "vue";
2
- import "../../../../components/Field/Field.vue2.js";
2
+ import "../../../../components/Field/Field.vue.js";
3
3
  import "../../../../components/Loader/Loader.vue.js";
4
- import "../../../../components/Button/Button.vue2.js";
4
+ import "../../../../components/Button/Button.vue.js";
5
5
  import B from "../../../../components/Dropdown/Dropdown.vue.js";
6
6
  import M from "../../../../components/Completion/Completion.vue.js";
7
- import k from "../../../mobile/components/Menu/Menu.vue2.js";
7
+ import k from "../../../mobile/components/Menu/Menu.vue.js";
8
8
  import f from "../../../mobile/components/Menu/MenuItem.vue.js";
9
9
  import v from "../../../organizations/components/elements/ButtonToggleMembership.vue.js";
10
10
  import R from "../../../reports/components/sections/FormReport.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),i=require("../../../../components/Tab/Tab.vue.cjs"),u=require("../../../community/components/sections/Feed.vue.cjs"),o=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(k){const t=n.useRoute(),c=n.useRouter();let d=t.query.tab?t.query.tab:"posts";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,a=>{c.replace({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[f,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=l=>a.$router.push({name:"Create BlogPost"})),class:"radius-100 t-white t-semi i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(i.default,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=l=>r.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u.default,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u.default,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u.default,{key:3,user:o.state.user._id,following:e.unref(t).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),u=require("../../../community/components/sections/Feed.vue.cjs"),o=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(k){const t=n.useRoute(),c=n.useRouter();let d=t.query.tab?t.query.tab:"posts";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,a=>{c.replace({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[f,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=l=>a.$router.push({name:"Create BlogPost"})),class:"radius-100 t-white t-semi i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(i.default,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=l=>r.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u.default,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u.default,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u.default,{key:3,user:o.state.user._id,following:e.unref(t).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as _, watch as b, openBlock as r, createElementBlock as d, createElementVNode as c, unref as s, createCommentVNode as o, createBlock as l } from "vue";
2
2
  import { useRoute as g, useRouter as v } from "vue-router";
3
- import y from "../../../../components/Tab/Tab.vue.js";
3
+ import y from "../../../../components/Tab/Tab.vue2.js";
4
4
  import i from "../../../community/components/sections/Feed.vue.js";
5
5
  import { state as a } from "../../../auth/store/auth.js";
6
6
  const h = { class: "pd-thin" }, k = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ c("h2", { class: "mn-r-medium" }, "Posts", -1), E = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const i=require("../../../../components/Field/Field.vue.cjs"),m=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),h=require("../sections/ProfileCompletion.vue.cjs"),c=require("vue-router"),r=require("../../../auth/store/auth.cjs"),s=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const N={class:"pd-medium for-transition w-100"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),w={class:"mn-b-semi"},y=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),U={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},_=e.createElementVNode("h4",null,"Upload userpic",-1),k=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),q=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),E=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),P={__name:"ProfileEdit",async setup(S){let n,d;e.ref(null);const f=c.useRoute(),u=c.useRouter();[n,d]=e.withAsyncContext(()=>s.actions.read({_id:r.state.user._id})),await n,d();const l=e.ref(s.state.current);async function p(){await s.actions.update(s.state.current)}async function b(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.state.current.status="removed",await s.actions.update(s.state.current),r.actions.logout())}function v(){u.replace({name:"User Profile",params:{_id:s.state.current._id}})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",N,[e.unref(f).params._id===r.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,user:r.state.user._id,target:l.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),V,e.createVNode(i.default,{field:l.value.username,"onUpdate:field":a[0]||(a[0]=t=>l.value.username=t),label:"@",placeholder:"Not specified",class:"mn-b-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createElementVNode("p",w,"Your username will be used for URL of profile like "+e.toDisplayString(o.API_URL)+"/users/username",1),y,e.createElementVNode("div",U,[e.createVNode(g.default,{photo:l.value.profile.photo,"onUpdate:photo":a[1]||(a[1]=t=>l.value.profile.photo=t),uploadPath:"users/"+l.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),_]),e.createVNode(i.default,{field:l.value.profile.name,"onUpdate:field":a[2]||(a[2]=t=>l.value.profile.name=t),label:"Name",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium radius-small",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.profile.description,"onUpdate:field":a[3]||(a[3]=t=>l.value.profile.description=t),label:"Description",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),k,q,e.createVNode(i.default,{field:l.value.socials.instagram,"onUpdate:field":a[4]||(a[4]=t=>l.value.socials.instagram=t),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.twitter,"onUpdate:field":a[5]||(a[5]=t=>l.value.socials.twitter=t),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.facebook,"onUpdate:field":a[6]||(a[6]=t=>l.value.socials.facebook=t),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.telegram,"onUpdate:field":a[7]||(a[7]=t=>l.value.socials.telegram=t),label:"Telegram",placeholder:"",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["field"]),E,e.createVNode(i.default,{field:l.value.phone,"onUpdate:field":a[8]||(a[8]=t=>l.value.phone=t),label:"Phone",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium mn-b-thin radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.email,"onUpdate:field":a[9]||(a[9]=t=>l.value.email=t),label:"Email",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:!0,validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{submit:p,callback:v,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(m.default,{submit:b,callback:o.a=()=>{e.unref(u).push({name:"Sign In"})},class:"mn-b-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");const i=require("../../../../components/Field/Field.vue2.cjs"),m=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),h=require("../sections/ProfileCompletion.vue.cjs"),c=require("vue-router"),r=require("../../../auth/store/auth.cjs"),s=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const N={class:"pd-medium for-transition w-100"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),w={class:"mn-b-semi"},y=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),U={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},_=e.createElementVNode("h4",null,"Upload userpic",-1),k=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),q=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),E=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),P={__name:"ProfileEdit",async setup(S){let n,d;e.ref(null);const f=c.useRoute(),u=c.useRouter();[n,d]=e.withAsyncContext(()=>s.actions.read({_id:r.state.user._id})),await n,d();const l=e.ref(s.state.current);async function p(){await s.actions.update(s.state.current)}async function b(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.state.current.status="removed",await s.actions.update(s.state.current),r.actions.logout())}function v(){u.replace({name:"User Profile",params:{_id:s.state.current._id}})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",N,[e.unref(f).params._id===r.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,user:r.state.user._id,target:l.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),V,e.createVNode(i.default,{field:l.value.username,"onUpdate:field":a[0]||(a[0]=t=>l.value.username=t),label:"@",placeholder:"Not specified",class:"mn-b-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createElementVNode("p",w,"Your username will be used for URL of profile like "+e.toDisplayString(o.API_URL)+"/users/username",1),y,e.createElementVNode("div",U,[e.createVNode(g.default,{photo:l.value.profile.photo,"onUpdate:photo":a[1]||(a[1]=t=>l.value.profile.photo=t),uploadPath:"users/"+l.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),_]),e.createVNode(i.default,{field:l.value.profile.name,"onUpdate:field":a[2]||(a[2]=t=>l.value.profile.name=t),label:"Name",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium radius-small",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.profile.description,"onUpdate:field":a[3]||(a[3]=t=>l.value.profile.description=t),label:"Description",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),k,q,e.createVNode(i.default,{field:l.value.socials.instagram,"onUpdate:field":a[4]||(a[4]=t=>l.value.socials.instagram=t),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.twitter,"onUpdate:field":a[5]||(a[5]=t=>l.value.socials.twitter=t),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.facebook,"onUpdate:field":a[6]||(a[6]=t=>l.value.socials.facebook=t),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.telegram,"onUpdate:field":a[7]||(a[7]=t=>l.value.socials.telegram=t),label:"Telegram",placeholder:"",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["field"]),E,e.createVNode(i.default,{field:l.value.phone,"onUpdate:field":a[8]||(a[8]=t=>l.value.phone=t),label:"Phone",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium mn-b-thin radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.email,"onUpdate:field":a[9]||(a[9]=t=>l.value.email=t),label:"Email",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:!0,validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{submit:p,callback:v,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(m.default,{submit:b,callback:o.a=()=>{e.unref(u).push({name:"Sign In"})},class:"mn-b-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}};exports.default=P;