@ozdao/prometheus-framework 0.2.137 → 0.2.139

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. package/dist/auth.server.js +29 -14
  2. package/dist/auth.server.mjs +29 -14
  3. package/dist/community.server.js +3 -3
  4. package/dist/community.server.mjs +3 -3
  5. package/dist/events.server.js +3 -3
  6. package/dist/events.server.mjs +3 -3
  7. package/dist/files.server.js +3 -3
  8. package/dist/files.server.mjs +3 -3
  9. package/dist/gallery.server.js +4 -4
  10. package/dist/gallery.server.mjs +4 -4
  11. package/dist/index-DNI4aUP2.js +259 -0
  12. package/dist/index-Tcyehi73.mjs +260 -0
  13. package/dist/main-DTHFR7H_.mjs +14510 -0
  14. package/dist/main-wXdocsbd.js +92 -0
  15. package/dist/main.css +1 -1
  16. package/dist/orders.server.js +9 -8
  17. package/dist/orders.server.mjs +9 -8
  18. package/dist/organizations.server.js +32 -17
  19. package/dist/organizations.server.mjs +32 -17
  20. package/dist/products.server.js +37 -5
  21. package/dist/products.server.mjs +37 -5
  22. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  24. package/dist/prometheus-framework/src/components/Completion/Completion.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Completion/Completion.vue.js +19 -19
  26. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  28. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Map/Map.vue.js +3 -2
  30. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +32 -31
  32. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/store/auth.js +50 -47
  34. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  38. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  40. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +1 -1
  44. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +12 -12
  46. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  48. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +41 -38
  50. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +123 -114
  52. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +51 -52
  54. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +16 -15
  58. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +120 -60
  60. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +25 -24
  64. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +7 -7
  66. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
  68. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +65 -66
  70. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +81 -76
  72. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/spots/router/spots.js +1 -1
  74. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  76. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +78 -74
  78. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  80. package/dist/prometheus-framework.cjs.js +1 -1
  81. package/dist/prometheus-framework.es.js +1 -1
  82. package/dist/reports.server.js +0 -3
  83. package/dist/reports.server.mjs +0 -3
  84. package/dist/spots.server.js +3 -3
  85. package/dist/spots.server.mjs +3 -3
  86. package/dist/style.css +1 -1
  87. package/dist/wallet.server.js +5 -5
  88. package/dist/wallet.server.mjs +8 -8
  89. package/dist/web-Dh669DqQ.mjs +54 -0
  90. package/dist/web-Dt2RCU54.js +1 -0
  91. package/package.json +1 -1
  92. package/src/components/Completion/Completion.vue +29 -30
  93. package/src/components/Map/Map.vue +2 -2
  94. package/src/modules/auth/components/pages/Invite.vue +4 -2
  95. package/src/modules/auth/controllers/auth.controller.js +30 -12
  96. package/src/modules/auth/middlewares/authJwt.js +80 -0
  97. package/src/modules/{middlewares/server → auth/middlewares}/index.js +1 -3
  98. package/src/modules/{middlewares/server → auth/middlewares}/verifyAccesses.js +1 -1
  99. package/src/modules/auth/routes/auth.routes.js +2 -2
  100. package/src/modules/auth/routes/twofa.routes.js +1 -1
  101. package/src/modules/auth/store/auth.js +9 -0
  102. package/src/modules/chats/routes/chats.routes.js +1 -1
  103. package/src/modules/community/routes/blog.routes.js +2 -2
  104. package/src/modules/events/routes/events.routes.js +2 -2
  105. package/src/modules/files/routes/files.routes.js +2 -2
  106. package/src/modules/gallery/routes/gallery.routes.js +4 -5
  107. package/src/modules/globals/services/globals.crud.js +2 -2
  108. package/src/modules/marketplace/store/marketplace.js +1 -1
  109. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
  110. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  111. package/src/modules/orders/controllers/orders.controller.js +1 -0
  112. package/src/modules/orders/routes/applications.routes.js +2 -2
  113. package/src/modules/orders/routes/orders.routes.js +2 -2
  114. package/src/modules/organizations/components/blocks/CardOrganization.vue +9 -7
  115. package/src/modules/organizations/components/pages/Members.vue +26 -15
  116. package/src/modules/organizations/components/pages/Organization.vue +3 -3
  117. package/src/modules/organizations/components/sections/DetailsTab.vue +1 -1
  118. package/src/modules/organizations/components/sections/MembersAdd.vue +101 -43
  119. package/src/modules/organizations/controllers/invites.controller.js +18 -13
  120. package/src/modules/organizations/controllers/memberships.controller.js +18 -11
  121. package/src/modules/organizations/controllers/organizations.controller.js +3 -4
  122. package/src/modules/organizations/models/membership.model.js +2 -0
  123. package/src/modules/organizations/models/organization.model.js +4 -0
  124. package/src/modules/organizations/routes/invites.routes.js +2 -2
  125. package/src/modules/organizations/store/invites.js +2 -1
  126. package/src/modules/products/controllers/leftovers.controller.js +1 -1
  127. package/src/modules/products/middlewares/index.js +11 -0
  128. package/src/modules/products/routes/categories.routes.js +2 -2
  129. package/src/modules/reports/routes/reports.routes.js +2 -2
  130. package/src/modules/spots/components/blocks/CardSpot.vue +0 -1
  131. package/src/modules/spots/components/layouts/Spots.vue +2 -2
  132. package/src/modules/spots/components/pages/Map.vue +79 -78
  133. package/src/modules/spots/components/pages/SpotEdit.vue +8 -5
  134. package/src/modules/spots/controllers/spots.controller.js +1 -5
  135. package/src/modules/spots/router/spots.js +1 -1
  136. package/src/modules/users/components/pages/ProfileEdit.vue +37 -22
  137. package/src/modules/wallet/controllers/routes/payments.routes.js +2 -2
  138. package/src/modules/wallet/controllers/routes/rewards.routes.js +2 -2
  139. package/src/modules/middlewares/server/authJwt.js +0 -68
  140. /package/src/modules/{middlewares/server → auth/middlewares}/authSecret.js +0 -0
  141. /package/src/modules/{middlewares/server → auth/middlewares}/verifyInvites.js +0 -0
  142. /package/src/modules/{middlewares/server → auth/middlewares}/verifySignUp.js +0 -0
  143. /package/src/modules/{middlewares/server → auth/middlewares}/verifyUser.js +0 -0
  144. /package/src/modules/globals/services/{globals.cashe.js → globals.cache.js} +0 -0
  145. /package/src/modules/{middlewares/server → products/middlewares}/verifyCategory.js +0 -0
@@ -2,9 +2,9 @@ import { ref as U, onMounted as C, openBlock as i, createElementBlock as c, unre
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  /* empty css */
5
- import B from "../../../../components/Dropdown/Dropdown.vue.js";
5
+ import B from "../../../../components/Dropdown/Dropdown.vue2.js";
6
6
  import M from "../../../../components/Completion/Completion.vue.js";
7
- import k from "../../../../components/Menu/Menu.vue.js";
7
+ import k from "../../../../components/Menu/Menu.vue2.js";
8
8
  import _ from "../../../../components/Menu/MenuItem.vue.js";
9
9
  import w 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");;/* empty css */const i=require("../../../../components/Field/Field.vue2.cjs"),u=require("../../../../components/Button/Button.vue2.cjs"),b=require("../../../../components/UploadImage/UploadImage.vue.cjs"),h=require("../sections/ProfileCompletion.vue.cjs"),m=require("vue-router"),n=require("../../../auth/store/auth.cjs"),s=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const v={class:"pd-medium for-transition w-100"},g=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),N={class:"mn-b-semi"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),w={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},U=e.createElementVNode("h4",null,"Upload userpic",-1),k=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),_=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),q=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),y={__name:"ProfileEdit",setup(E){e.ref(null);const d=m.useRoute(),r=m.useRouter(),l=e.ref(s.state.current);e.onMounted(async()=>{await s.actions.read({_id:d.params._id})});async function c(){await s.actions.update(s.state.current)}async function f(){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),n.actions.logout())}function p(){r.replace({name:"User Profile",params:{_id:s.state.current._id}})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",v,[e.unref(d).params._id===n.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,user:n.state.user._id,target:l.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),g,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-light pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createElementVNode("p",N,"Your username will be used for URL of profile like "+e.toDisplayString(o.API_URL)+"/users/username",1),V,e.createElementVNode("div",w,[e.createVNode(b.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"]),U]),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-light 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-light pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),k,_,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-light 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-light 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-light 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-light pd-medium radius-small"},null,8,["field"]),q,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-light 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-light pd-medium radius-small",disabled:!0,validation:o.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{submit:c,callback:p,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(u.default,{submit:f,callback:o.a=()=>{e.unref(r).push({name:"Sign In"})},class:"mn-b-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const i=require("../../../../components/Field/Field.vue2.cjs"),u=require("../../../../components/Button/Button.vue2.cjs"),b=require("../../../../components/UploadImage/UploadImage.vue.cjs"),h=require("../sections/ProfileCompletion.vue.cjs"),c=require("vue-router"),s=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const g={key:0,class:"pd-medium for-transition w-100"},N=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),w={class:"mn-b-semi"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),v={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},U=e.createElementVNode("h4",null,"Upload userpic",-1),k=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),_=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),y=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),q={__name:"ProfileEdit",setup(E){e.ref(null);const o=c.useRoute(),n=c.useRouter();e.ref(null);const d=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:o.params._id,user:s.state.user._id}),d.value=!0});async function m(){await t.actions.update(t.state.current)}async function f(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(t.state.current.status="removed",await t.actions.update(t.state.current),s.actions.logout())}function p(){n.replace({name:"User Profile",params:{_id:t.state.current._id}})}return(r,a)=>d.value?(e.openBlock(),e.createElementBlock("div",g,[e.unref(o).params._id===s.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,user:s.state.user._id,target:t.state.current,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),N,e.createVNode(i.default,{field:t.state.current.username,"onUpdate:field":a[0]||(a[0]=l=>t.state.current.username=l),label:"@",placeholder:"Not specified",class:"mn-b-thin w-100 bg-light pd-medium radius-small",disabled:"true",validation:r.organizationName},null,8,["field","validation"]),e.createElementVNode("p",w,"Your username will be used for URL of profile like "+e.toDisplayString(r.API_URL)+"/users/username",1),V,e.createElementVNode("div",v,[e.createVNode(b.default,{photo:t.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=l=>t.state.current.profile.photo=l),uploadPath:"users/"+t.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),U]),e.createVNode(i.default,{field:t.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=l=>t.state.current.profile.name=l),label:"Name",placeholder:"Not specified",class:"mn-b-thin bg-light pd-medium radius-small",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:t.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=l=>t.state.current.profile.description=l),label:"Description",placeholder:"Not specified",class:"mn-b-semi bg-light pd-medium radius-small",validation:r.organizationName},null,8,["field","validation"]),k,_,e.createVNode(i.default,{field:t.state.current.socials.instagram,"onUpdate:field":a[4]||(a[4]=l=>t.state.current.socials.instagram=l),label:"Instagram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:t.state.current.socials.twitter,"onUpdate:field":a[5]||(a[5]=l=>t.state.current.socials.twitter=l),label:"Twitter",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:t.state.current.socials.facebook,"onUpdate:field":a[6]||(a[6]=l=>t.state.current.socials.facebook=l),label:"Facebook",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:t.state.current.socials.telegram,"onUpdate:field":a[7]||(a[7]=l=>t.state.current.socials.telegram=l),label:"Telegram",placeholder:"",class:"mn-b-semi bg-light pd-medium radius-small"},null,8,["field"]),y,e.createVNode(i.default,{field:t.state.current.phone,"onUpdate:field":a[8]||(a[8]=l=>t.state.current.phone=l),label:"Phone",placeholder:"Not specified",class:"mn-b-thin bg-light pd-medium mn-b-thin radius-small",disabled:"true",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:t.state.current.email,"onUpdate:field":a[9]||(a[9]=l=>t.state.current.email=l),label:"Email",placeholder:"Not specified",class:"mn-b-semi bg-light pd-medium radius-small",disabled:!0,validation:r.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{submit:m,callback:p,class:"mn-b-thin bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1}),e.createVNode(u.default,{submit:f,callback:r.a=()=>{e.unref(n).push({name:"Sign In"})},class:"mn-b-thin w-100 bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Delete Account ")]),_:1},8,["callback"])])):e.createCommentVNode("",!0)}};exports.default=q;
@@ -1,148 +1,152 @@
1
- import { ref as u, onMounted as N, openBlock as p, createElementBlock as U, unref as f, createBlock as k, createCommentVNode as y, createVNode as a, createElementVNode as s, toDisplayString as P, withCtx as c, createTextVNode as b } from "vue";
1
+ import { ref as n, onMounted as U, openBlock as p, createElementBlock as k, unref as f, createBlock as y, createCommentVNode as b, createVNode as t, createElementVNode as o, toDisplayString as P, withCtx as h, createTextVNode as g } from "vue";
2
2
  /* empty css */
3
- import t from "../../../../components/Field/Field.vue2.js";
4
- import h from "../../../../components/Button/Button.vue2.js";
3
+ import a from "../../../../components/Field/Field.vue2.js";
4
+ import w from "../../../../components/Button/Button.vue2.js";
5
5
  import S from "../../../../components/UploadImage/UploadImage.vue.js";
6
6
  import $ from "../sections/ProfileCompletion.vue.js";
7
7
  import { useRoute as z, useRouter as R } from "vue-router";
8
- import { state as g, actions as A } from "../../../auth/store/auth.js";
9
- import { state as n, actions as r } from "../../store/users.js";
8
+ import { state as s, actions as A } from "../../../auth/store/auth.js";
9
+ import { actions as d, state as e } from "../../store/users.js";
10
10
  import "../../../middlewares/client/inputs.validation.js";
11
11
  import "./ProfileEdit.vue2.js";
12
- const D = { class: "pd-medium for-transition w-100" }, E = /* @__PURE__ */ s("h3", { class: "mn-b-small" }, "Username", -1), T = { class: "mn-b-semi" }, V = /* @__PURE__ */ s("h3", { class: "mn-b-small" }, "Profile", -1), B = { class: "mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex" }, I = /* @__PURE__ */ s("h4", null, "Upload userpic", -1), x = /* @__PURE__ */ s("h3", { class: "mn-b-small" }, "Socials", -1), C = /* @__PURE__ */ s("p", { class: "mn-b-thin" }, "Please provide only the username for social media profiles, without full links.", -1), L = /* @__PURE__ */ s("h3", { class: "mn-b-small" }, "Account", -1), X = {
12
+ const D = {
13
+ key: 0,
14
+ class: "pd-medium for-transition w-100"
15
+ }, E = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Username", -1), T = { class: "mn-b-semi" }, V = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Profile", -1), B = { class: "mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex" }, I = /* @__PURE__ */ o("h4", null, "Upload userpic", -1), x = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Socials", -1), C = /* @__PURE__ */ o("p", { class: "mn-b-thin" }, "Please provide only the username for social media profiles, without full links.", -1), L = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Account", -1), X = {
13
16
  __name: "ProfileEdit",
14
17
  setup(F) {
15
- u(null);
16
- const d = z(), m = R(), e = u(n.current);
17
- N(async () => {
18
- await r.read({ _id: d.params._id });
18
+ n(null);
19
+ const m = z(), u = R();
20
+ n(null);
21
+ const c = n(!1);
22
+ U(async () => {
23
+ await d.read({ _id: m.params._id, user: s.user._id }), c.value = !0;
19
24
  });
20
- async function v() {
21
- await r.update(n.current);
25
+ async function _() {
26
+ await d.update(e.current);
22
27
  }
23
- async function w() {
24
- window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.") && (n.current.status = "removed", await r.update(n.current), A.logout());
28
+ async function v() {
29
+ window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.") && (e.current.status = "removed", await d.update(e.current), A.logout());
25
30
  }
26
- function _() {
27
- m.replace({ name: "User Profile", params: { _id: n.current._id } });
31
+ function N() {
32
+ u.replace({ name: "User Profile", params: { _id: e.current._id } });
28
33
  }
29
- return (o, l) => (p(), U("div", D, [
30
- f(d).params._id === g.user._id ? (p(), k($, {
34
+ return (r, i) => c.value ? (p(), k("div", D, [
35
+ f(m).params._id === s.user._id ? (p(), y($, {
31
36
  key: 0,
32
- user: g.user._id,
33
- target: e.value,
37
+ user: s.user._id,
38
+ target: e.current,
34
39
  cta: !1
35
- }, null, 8, ["user", "target"])) : y("", !0),
40
+ }, null, 8, ["user", "target"])) : b("", !0),
36
41
  E,
37
- a(t, {
38
- field: e.value.username,
39
- "onUpdate:field": l[0] || (l[0] = (i) => e.value.username = i),
42
+ t(a, {
43
+ field: e.current.username,
44
+ "onUpdate:field": i[0] || (i[0] = (l) => e.current.username = l),
40
45
  label: "@",
41
46
  placeholder: "Not specified",
42
47
  class: "mn-b-thin w-100 bg-light pd-medium radius-small",
43
48
  disabled: "true",
44
- validation: o.organizationName
49
+ validation: r.organizationName
45
50
  }, null, 8, ["field", "validation"]),
46
- s("p", T, "Your username will be used for URL of profile like " + P(o.API_URL) + "/users/username", 1),
51
+ o("p", T, "Your username will be used for URL of profile like " + P(r.API_URL) + "/users/username", 1),
47
52
  V,
48
- s("div", B, [
49
- a(S, {
50
- photo: e.value.profile.photo,
51
- "onUpdate:photo": l[1] || (l[1] = (i) => e.value.profile.photo = i),
52
- uploadPath: "users/" + e.value._id + "/avatars",
53
+ o("div", B, [
54
+ t(S, {
55
+ photo: e.current.profile.photo,
56
+ "onUpdate:photo": i[1] || (i[1] = (l) => e.current.profile.photo = l),
57
+ uploadPath: "users/" + e.current._id + "/avatars",
53
58
  class: "h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"
54
59
  }, null, 8, ["photo", "uploadPath"]),
55
60
  I
56
61
  ]),
57
- a(t, {
58
- field: e.value.profile.name,
59
- "onUpdate:field": l[2] || (l[2] = (i) => e.value.profile.name = i),
62
+ t(a, {
63
+ field: e.current.profile.name,
64
+ "onUpdate:field": i[2] || (i[2] = (l) => e.current.profile.name = l),
60
65
  label: "Name",
61
66
  placeholder: "Not specified",
62
67
  class: "mn-b-thin bg-light pd-medium radius-small",
63
- validation: o.organizationName
68
+ validation: r.organizationName
64
69
  }, null, 8, ["field", "validation"]),
65
- a(t, {
66
- field: e.value.profile.description,
67
- "onUpdate:field": l[3] || (l[3] = (i) => e.value.profile.description = i),
70
+ t(a, {
71
+ field: e.current.profile.description,
72
+ "onUpdate:field": i[3] || (i[3] = (l) => e.current.profile.description = l),
68
73
  label: "Description",
69
74
  placeholder: "Not specified",
70
75
  class: "mn-b-semi bg-light pd-medium radius-small",
71
- disabled: "true",
72
- validation: o.organizationName
76
+ validation: r.organizationName
73
77
  }, null, 8, ["field", "validation"]),
74
78
  x,
75
79
  C,
76
- a(t, {
77
- field: e.value.socials.instagram,
78
- "onUpdate:field": l[4] || (l[4] = (i) => e.value.socials.instagram = i),
80
+ t(a, {
81
+ field: e.current.socials.instagram,
82
+ "onUpdate:field": i[4] || (i[4] = (l) => e.current.socials.instagram = l),
79
83
  label: "Instagram",
80
84
  placeholder: "",
81
85
  class: "mn-b-thin bg-light pd-medium radius-small"
82
86
  }, null, 8, ["field"]),
83
- a(t, {
84
- field: e.value.socials.twitter,
85
- "onUpdate:field": l[5] || (l[5] = (i) => e.value.socials.twitter = i),
87
+ t(a, {
88
+ field: e.current.socials.twitter,
89
+ "onUpdate:field": i[5] || (i[5] = (l) => e.current.socials.twitter = l),
86
90
  label: "Twitter",
87
91
  placeholder: "",
88
92
  class: "mn-b-thin bg-light pd-medium radius-small"
89
93
  }, null, 8, ["field"]),
90
- a(t, {
91
- field: e.value.socials.facebook,
92
- "onUpdate:field": l[6] || (l[6] = (i) => e.value.socials.facebook = i),
94
+ t(a, {
95
+ field: e.current.socials.facebook,
96
+ "onUpdate:field": i[6] || (i[6] = (l) => e.current.socials.facebook = l),
93
97
  label: "Facebook",
94
98
  placeholder: "",
95
99
  class: "mn-b-thin bg-light pd-medium radius-small"
96
100
  }, null, 8, ["field"]),
97
- a(t, {
98
- field: e.value.socials.telegram,
99
- "onUpdate:field": l[7] || (l[7] = (i) => e.value.socials.telegram = i),
101
+ t(a, {
102
+ field: e.current.socials.telegram,
103
+ "onUpdate:field": i[7] || (i[7] = (l) => e.current.socials.telegram = l),
100
104
  label: "Telegram",
101
105
  placeholder: "",
102
106
  class: "mn-b-semi bg-light pd-medium radius-small"
103
107
  }, null, 8, ["field"]),
104
108
  L,
105
- a(t, {
106
- field: e.value.phone,
107
- "onUpdate:field": l[8] || (l[8] = (i) => e.value.phone = i),
109
+ t(a, {
110
+ field: e.current.phone,
111
+ "onUpdate:field": i[8] || (i[8] = (l) => e.current.phone = l),
108
112
  label: "Phone",
109
113
  placeholder: "Not specified",
110
114
  class: "mn-b-thin bg-light pd-medium mn-b-thin radius-small",
111
115
  disabled: "true",
112
- validation: o.organizationName
116
+ validation: r.organizationName
113
117
  }, null, 8, ["field", "validation"]),
114
- a(t, {
115
- field: e.value.email,
116
- "onUpdate:field": l[9] || (l[9] = (i) => e.value.email = i),
118
+ t(a, {
119
+ field: e.current.email,
120
+ "onUpdate:field": i[9] || (i[9] = (l) => e.current.email = l),
117
121
  label: "Email",
118
122
  placeholder: "Not specified",
119
123
  class: "mn-b-semi bg-light pd-medium radius-small",
120
124
  disabled: !0,
121
- validation: o.organizationName
125
+ validation: r.organizationName
122
126
  }, null, 8, ["field", "validation"]),
123
- a(h, {
124
- submit: v,
125
- callback: _,
126
- class: "mn-b-thin"
127
+ t(w, {
128
+ submit: _,
129
+ callback: N,
130
+ class: "mn-b-thin bg-main w-100"
127
131
  }, {
128
- default: c(() => [
129
- b("Save")
132
+ default: h(() => [
133
+ g(" Save ")
130
134
  ]),
131
135
  _: 1
132
136
  }),
133
- a(h, {
134
- submit: w,
135
- callback: o.a = () => {
136
- f(m).push({ name: "Sign In" });
137
+ t(w, {
138
+ submit: v,
139
+ callback: r.a = () => {
140
+ f(u).push({ name: "Sign In" });
137
141
  },
138
- class: "mn-b-thin bg-red t-white"
142
+ class: "mn-b-thin w-100 bg-red t-white"
139
143
  }, {
140
- default: c(() => [
141
- b("Delete Account")
144
+ default: h(() => [
145
+ g(" Delete Account ")
142
146
  ]),
143
147
  _: 1
144
148
  }, 8, ["callback"])
145
- ]));
149
+ ])) : b("", !0);
146
150
  }
147
151
  };
148
152
  export {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-i18n"),m=require("web3"),t=require("../../store/wallet.store.cjs"),p=require("../../localization/wallet.json.cjs"),b=require("../../../../../components/Popup/Popup.vue.cjs"),k=require("../../../../../components/Button/Button.vue2.cjs");require("vue-router");;/* empty css */require("../../../../reports/store/reports.cjs");;/* empty css */;/* empty css */require("../../../../auth/store/auth.cjs");require("../../../../organizations/store/memberships.cjs");require("../../../../community/store/reactions.cjs");;/* empty css */const h=require("../elements/ConnectMetamask.vue.cjs"),f=require("../blocks/CashDeposit.vue.cjs"),_=require("../blocks/CardDeposit.vue.cjs"),g=require("../blocks/CryptoDeposit.vue.cjs"),w=require("../blocks/CardBalanceReplenished.vue.cjs"),N=require("../blocks/CryptoDepositProcessing.vue.cjs"),V={class:"pd-thin"},E={class:"bg-black t-white mn-b-thin radius-big pd-big"},B={class:"mn-b-medium"},v={class:"mn-b-semi t-transp p-big"},y={key:0,class:"gap-thin mn-b-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"},C={class:"flex-v-center flex-nowrap flex mn-r-auto"},x={key:1,class:"w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"},S=e.createElementVNode("p",{class:"t-transp t-medium mn-b-thin"},"You own:",-1),q={class:"h1 mn-b-small"},D=e.createElementVNode("p",{class:"t-white p-big t-medium mn-b-semi"},"of all shares",-1),M={class:"flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra"},W={key:0,class:"t-transp t-medium"},P=e.createElementVNode("span",{class:"uppercase p-small t-medium t-transp"},"Connected Metamask",-1),R=e.createElementVNode("br",null,null,-1),T={key:0,class:"mn-b-semi cols-2 gap-thin"},$=e.createElementVNode("div",{class:"w-100 pd-medium radius-medium t-center bg-light"},[e.createElementVNode("h3",{class:"mn-b-small"},"Make first order and start earning Weeder Token"),e.createElementVNode("button",{class:"mn-l-auto mn-r-auto bg-main button"},"Explore marketplace")],-1),G={class:"w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light"},O={key:0,class:"mn-b-small"},A={key:1,class:"mn-b-small"},L={class:"cols-3 gap-thin"},F={class:"radius-medium bg-light"},I={class:"flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium"},Y={class:"t-semi mn-r-auto"},j={class:"pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small"},H={class:"pd-medium"},z={class:"t-regular mn-b-thin"},J={key:2,class:"mn-b-small"},K={class:"cols-3 gap-thin"},Q={class:"radius-medium bg-grey"},U={class:"flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium"},X={class:"t-semi mn-r-auto"},Z={class:"pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small"},ee={class:"pd-medium"},te={class:"t-regular mn-b-thin"},ne={key:0},oe=e.createElementVNode("h2",{class:"mn-b-small t-center t-bold"},"Choose the way of deposit",-1),se={__name:"Wallet",setup(le){const{t:r}=u.useI18n({useScope:"global",...p.default});window.ethereum.on("accountsChanged",a=>{a.length<1&&(t.state.account=null)}),t.state.web3=new m(window.ethereum||"http://localhost:8080"),e.onMounted(()=>{t.actions.listRewards(),t.actions.tryReconnectWallet()});const c=e.ref(!1),l=e.ref(0);function s(a){l.value=a}function d(){c.value=!0}function i(){c.value=!1,l.value=0,t.actions.stopTimer(),t.actions.disconnectWebSocket()}return(a,o)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("section",E,[e.createElementVNode("h1",B,e.toDisplayString(e.unref(r)("wallet.title")),1),e.createElementVNode("p",v,e.toDisplayString(e.unref(r)("wallet.subtitle")),1),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",C,[e.createElementVNode("h2",null,e.toDisplayString(e.unref(t.state).tokenBalance)+" "+e.toDisplayString(e.unref(r)("wallet.token")),1)]),e.createElementVNode("button",{onClick:d,class:"t-nowrap w-max bg-main t-medium button"},"Get More"),e.createVNode(k.default,{submit:e.unref(t.actions).collectRewards,class:"w-max bg-white t-black t-medium button"},{default:e.withCtx(()=>[e.createTextVNode(" Withdraw ")]),_:1},8,["submit"])])):e.createCommentVNode("",!0),e.createVNode(h.default,{class:"mn-b-thin radius-extra br-solid br-white-transp-10 br-1px w-100"}),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",x,[S,e.createElementVNode("p",q,e.toDisplayString(e.unref(t.state).share)+"%",1),D,e.createElementVNode("div",M,[e.unref(t.state).account?(e.openBlock(),e.createElementBlock("p",W,[P,R,e.createElementVNode("span",null,e.toDisplayString(e.unref(t.state).account),1)])):e.createCommentVNode("",!0),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[0]||(o[0]=(...n)=>e.unref(t.actions).disconnectWallet&&e.unref(t.actions).disconnectWallet(...n)),class:"mn-l-auto bg-red button"}," Disconnect Wallet ")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",T,[$,e.createElementVNode("div",G,[e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h3",O," Connect Metamask to withdrawal your earnings. ")),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[1]||(o[1]=(...n)=>e.unref(t.actions).connectWallet&&e.unref(t.actions).connectWallet(...n)),class:"br-solid br-2px br-black-transp-10 t-black button"}," Connect Wallet "))])])),e.unref(t.state).rewards.length>0?(e.openBlock(),e.createElementBlock("h2",A,"Latest Rewards ")):e.createCommentVNode("",!0),e.createElementVNode("section",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,n=>(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("div",I,[e.createElementVNode("p",Y,e.toDisplayString(n.amount)+" WDT",1),e.createElementVNode("span",j,e.toDisplayString(n.type==="blogpost"?"Community Reward":n.type),1)]),e.createElementVNode("div",H,[e.createElementVNode("h4",z,e.toDisplayString(n.name),1)])]))),256))]),e.unref(t.state).rewards.length>0?(e.openBlock(),e.createElementBlock("h2",J,"Activity")):e.createCommentVNode("",!0),e.createElementVNode("section",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,n=>(e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("div",U,[e.createElementVNode("p",X,e.toDisplayString(n.amount)+" WDT",1),e.createElementVNode("span",Z,e.toDisplayString(n.type==="blogpost"?"Community Reward":n.type),1)]),e.createElementVNode("div",ee,[e.createElementVNode("h4",te,e.toDisplayString(n.name),1)])]))),256))]),e.createVNode(b.default,{onClosePopup:i,isPopupOpen:c.value,class:"w-m-50r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[l.value===0?(e.openBlock(),e.createElementBlock("div",ne,[oe,e.createElementVNode("button",{class:"w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",onClick:o[2]||(o[2]=n=>s(1))}," CASH "),e.createElementVNode("button",{class:"w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",onClick:o[3]||(o[3]=n=>s(2))}," CARD "),e.createElementVNode("button",{class:"w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",onClick:o[4]||(o[4]=n=>s(4))}," CRYPTO ")])):e.createCommentVNode("",!0),l.value===1?(e.openBlock(),e.createBlock(f.default,{key:1,onBackSelection:o[5]||(o[5]=n=>s(0))})):e.createCommentVNode("",!0),l.value===2?(e.openBlock(),e.createBlock(_.default,{key:2,onBackSelection:o[6]||(o[6]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0),l.value===3?(e.openBlock(),e.createBlock(w.default,{key:3,onClose:i})):e.createCommentVNode("",!0),l.value===4?(e.openBlock(),e.createBlock(g.default,{key:4,onBackSelection:o[7]||(o[7]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0),l.value===5?(e.openBlock(),e.createBlock(N.default,{key:5,onBackSelection:o[8]||(o[8]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0)]),_:1},8,["isPopupOpen"])]))}};exports.default=se;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-i18n"),m=require("web3"),t=require("../../store/wallet.store.cjs"),p=require("../../localization/wallet.json.cjs"),b=require("../../../../../components/Popup/Popup.vue.cjs"),k=require("../../../../../components/Button/Button.vue2.cjs");require("vue-router");;/* empty css */require("../../../../reports/store/reports.cjs");;/* empty css */;/* empty css */require("../../../../auth/store/auth.cjs");require("../../../../organizations/store/memberships.cjs");require("../../../../community/store/reactions.cjs");;/* empty css */const h=require("../elements/ConnectMetamask.vue.cjs"),f=require("../blocks/CashDeposit.vue.cjs"),_=require("../blocks/CardDeposit.vue.cjs"),g=require("../blocks/CryptoDeposit.vue.cjs"),w=require("../blocks/CardBalanceReplenished.vue.cjs"),N=require("../blocks/CryptoDepositProcessing.vue.cjs"),V={class:"pd-thin"},E={class:"bg-black t-white mn-b-thin radius-big pd-big"},B={class:"mn-b-medium"},v={class:"mn-b-semi t-transp p-big"},y={key:0,class:"gap-thin mn-b-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"},C={class:"flex-v-center flex-nowrap flex mn-r-auto"},x={key:1,class:"w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"},S=e.createElementVNode("p",{class:"t-transp t-medium mn-b-thin"},"You own:",-1),q={class:"h1 mn-b-small"},D=e.createElementVNode("p",{class:"t-white p-big t-medium mn-b-semi"},"of all shares",-1),M={class:"flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra"},W={key:0,class:"t-transp t-medium"},P=e.createElementVNode("span",{class:"uppercase p-small t-medium t-transp"},"Connected Metamask",-1),R=e.createElementVNode("br",null,null,-1),T={key:0,class:"mn-b-semi cols-2 gap-thin"},$=e.createElementVNode("div",{class:"w-100 pd-medium radius-medium t-center bg-light"},[e.createElementVNode("h3",{class:"mn-b-small"},"Make first order and start earning Weeder Token"),e.createElementVNode("button",{class:"mn-l-auto mn-r-auto bg-main button"},"Explore marketplace")],-1),G={class:"w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light"},O={key:0,class:"mn-b-small"},A={key:1,class:"mn-b-small"},L={class:"cols-3 gap-thin"},F={class:"radius-medium bg-light"},I={class:"flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium"},Y={class:"t-semi mn-r-auto"},j={class:"pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small"},H={class:"pd-medium"},z={class:"t-regular mn-b-thin"},J={key:2,class:"mn-b-small"},K={class:"cols-3 gap-thin"},Q={class:"radius-medium bg-grey"},U={class:"flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium"},X={class:"t-semi mn-r-auto"},Z={class:"pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small"},ee={class:"pd-medium"},te={class:"t-regular mn-b-thin"},ne={key:0},oe=e.createElementVNode("h2",{class:"mn-b-small t-center t-bold"},"Choose the way of deposit",-1),se={__name:"Wallet",setup(le){const{t:r}=u.useI18n({useScope:"global",...p.default});window.ethereum.on("accountsChanged",a=>{a.length<1&&(t.state.account=null)}),t.state.web3=new m(window.ethereum||"http://localhost:8080"),e.onMounted(()=>{t.actions.listRewards(),t.actions.tryReconnectWallet()});const c=e.ref(!1),l=e.ref(0);function s(a){l.value=a}function d(){c.value=!0}function i(){c.value=!1,l.value=0,t.actions.stopTimer(),t.actions.disconnectWebSocket()}return(a,o)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("section",E,[e.createElementVNode("h1",B,e.toDisplayString(e.unref(r)("wallet.title")),1),e.createElementVNode("p",v,e.toDisplayString(e.unref(r)("wallet.subtitle")),1),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",C,[e.createElementVNode("h2",null,e.toDisplayString(e.unref(t.state).tokenBalance)+" "+e.toDisplayString(e.unref(r)("wallet.token")),1)]),e.createElementVNode("button",{onClick:d,class:"t-nowrap w-max bg-main t-medium button"},"Get More"),e.createVNode(k.default,{submit:e.unref(t.actions).collectRewards,class:"w-max bg-white t-black t-medium button"},{default:e.withCtx(()=>[e.createTextVNode(" Withdraw ")]),_:1},8,["submit"])])):e.createCommentVNode("",!0),e.createVNode(h.default,{class:"mn-b-thin radius-extra br-solid br-white-transp-10 br-1px w-100"}),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",x,[S,e.createElementVNode("p",q,e.toDisplayString(e.unref(t.state).share)+"%",1),D,e.createElementVNode("div",M,[e.unref(t.state).account?(e.openBlock(),e.createElementBlock("p",W,[P,R,e.createElementVNode("span",null,e.toDisplayString(e.unref(t.state).account),1)])):e.createCommentVNode("",!0),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[0]||(o[0]=(...n)=>e.unref(t.actions).disconnectWallet&&e.unref(t.actions).disconnectWallet(...n)),class:"mn-l-auto bg-red button"}," Disconnect Wallet ")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",T,[$,e.createElementVNode("div",G,[e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h3",O," Connect Metamask to withdrawal your earnings. ")),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[1]||(o[1]=(...n)=>e.unref(t.actions).connectWallet&&e.unref(t.actions).connectWallet(...n)),class:"br-solid br-2px br-black-transp-10 t-black button"}," Connect Wallet "))])])),e.unref(t.state).rewards.length>0?(e.openBlock(),e.createElementBlock("h2",A,"Latest Rewards ")):e.createCommentVNode("",!0),e.createElementVNode("section",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,n=>(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("div",I,[e.createElementVNode("p",Y,e.toDisplayString(n.amount)+" WDT",1),e.createElementVNode("span",j,e.toDisplayString(n.type==="blogpost"?"Community Reward":n.type),1)]),e.createElementVNode("div",H,[e.createElementVNode("h4",z,e.toDisplayString(n.name),1)])]))),256))]),e.unref(t.state).rewards.length>0?(e.openBlock(),e.createElementBlock("h2",J,"Activity")):e.createCommentVNode("",!0),e.createElementVNode("section",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,n=>(e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("div",U,[e.createElementVNode("p",X,e.toDisplayString(n.amount)+" WDT",1),e.createElementVNode("span",Z,e.toDisplayString(n.type==="blogpost"?"Community Reward":n.type),1)]),e.createElementVNode("div",ee,[e.createElementVNode("h4",te,e.toDisplayString(n.name),1)])]))),256))]),e.createVNode(b.default,{onClosePopup:i,isPopupOpen:c.value,class:"w-m-50r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[l.value===0?(e.openBlock(),e.createElementBlock("div",ne,[oe,e.createElementVNode("button",{class:"w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",onClick:o[2]||(o[2]=n=>s(1))}," CASH "),e.createElementVNode("button",{class:"w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",onClick:o[3]||(o[3]=n=>s(2))}," CARD "),e.createElementVNode("button",{class:"w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",onClick:o[4]||(o[4]=n=>s(4))}," CRYPTO ")])):e.createCommentVNode("",!0),l.value===1?(e.openBlock(),e.createBlock(f.default,{key:1,onBackSelection:o[5]||(o[5]=n=>s(0))})):e.createCommentVNode("",!0),l.value===2?(e.openBlock(),e.createBlock(_.default,{key:2,onBackSelection:o[6]||(o[6]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0),l.value===3?(e.openBlock(),e.createBlock(w.default,{key:3,onClose:i})):e.createCommentVNode("",!0),l.value===4?(e.openBlock(),e.createBlock(g.default,{key:4,onBackSelection:o[7]||(o[7]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0),l.value===5?(e.openBlock(),e.createBlock(N.default,{key:5,onBackSelection:o[8]||(o[8]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0)]),_:1},8,["isPopupOpen"])]))}};exports.default=se;
@@ -8,8 +8,8 @@ import P from "../../../../../components/Button/Button.vue2.js";
8
8
  import "vue-router";
9
9
  /* empty css */
10
10
  import "../../../../reports/store/reports.js";
11
- /* empty css */
12
- /* empty css */
11
+ /* empty css */
12
+ /* empty css */
13
13
  import "../../../../auth/store/auth.js";
14
14
  import "../../../../organizations/store/memberships.js";
15
15
  import "../../../../community/store/reactions.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("./main-5IrI2IOV.js");exports.Address=_._sfc_main;exports.Breadcrumbs=_._sfc_main$16;exports.Button=_._sfc_main$1;exports.Checkbox=_._sfc_main$2;exports.Chips=_._sfc_main$17;exports.Countdown=_._sfc_main$18;exports.DatePicker=_._sfc_main$19;exports.Dropdown=_._sfc_main$3;exports.EmptyState=_._sfc_main$20;exports.Error=_._sfc_main$4;exports.Feed=_._sfc_main$21;exports.Field=_._sfc_main$5;exports.FieldBig=_._sfc_main$22;exports.FieldPhone=_._sfc_main$6;exports.FieldTags=_.FieldTags;exports.Loader=_.Loader;exports.LocationMarker=_._sfc_main$7;exports.Map=_.Map;exports.Marquee=_._sfc_main$27;exports.Popup=_._sfc_main$8;exports.Radio=_._sfc_main$9;exports.Select=_.Select;exports.SelectMulti=_.SelectMulti;exports.Shader=_._sfc_main$23;exports.Sidebar=_._sfc_main$24;exports.Slider=_._sfc_main$25;exports.Spoiler=_._sfc_main$10;exports.Status=_._sfc_main$26;exports.Tab=_._sfc_main$11;exports.Text=_._sfc_main$13;exports.Tooltip=_._sfc_main$12;exports.Upload=_.Upload;exports.UploadImage=_._sfc_main$14;exports.UploadImageMultiple=_._sfc_main$15;exports.default=_.main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("./main-wXdocsbd.js");exports.Address=_._sfc_main;exports.Breadcrumbs=_._sfc_main$16;exports.Button=_._sfc_main$1;exports.Checkbox=_._sfc_main$2;exports.Chips=_._sfc_main$17;exports.Countdown=_._sfc_main$18;exports.DatePicker=_._sfc_main$19;exports.Dropdown=_._sfc_main$3;exports.EmptyState=_._sfc_main$20;exports.Error=_._sfc_main$4;exports.Feed=_._sfc_main$21;exports.Field=_._sfc_main$5;exports.FieldBig=_._sfc_main$22;exports.FieldPhone=_._sfc_main$6;exports.FieldTags=_.FieldTags;exports.Loader=_.Loader;exports.LocationMarker=_._sfc_main$7;exports.Map=_.Map;exports.Marquee=_._sfc_main$27;exports.Popup=_._sfc_main$8;exports.Radio=_._sfc_main$9;exports.Select=_.Select;exports.SelectMulti=_.SelectMulti;exports.Shader=_._sfc_main$23;exports.Sidebar=_._sfc_main$24;exports.Slider=_._sfc_main$25;exports.Spoiler=_._sfc_main$10;exports.Status=_._sfc_main$26;exports.Tab=_._sfc_main$11;exports.Text=_._sfc_main$13;exports.Tooltip=_._sfc_main$12;exports.Upload=_.Upload;exports.UploadImage=_._sfc_main$14;exports.UploadImageMultiple=_._sfc_main$15;exports.default=_.main;
@@ -1,4 +1,4 @@
1
- import { _ as e, r as o, a as d, b as r, s as t, t as l, u as i, c as p, v as u, d as S, w as c, e as n, x as m, f as F, F as M, L as b, g, M as h, C as k, h as x, i as B, S as C, j as T, y as U, z as f, A as w, k as L, B as P, l as q, o as y, n as A, U as D, p as E, q as I, m as j } from "./main-BY2OvGB9.mjs";
1
+ import { _ as e, r as o, a as d, b as r, s as t, t as l, u as i, c as p, v as u, d as S, w as c, e as n, x as m, f as F, F as M, L as b, g, M as h, C as k, h as x, i as B, S as C, j as T, y as U, z as f, A as w, k as L, B as P, l as q, o as y, n as A, U as D, p as E, q as I, m as j } from "./main-DTHFR7H_.mjs";
2
2
  export {
3
3
  e as Address,
4
4
  o as Breadcrumbs,
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
3
- const index = require("./index-CDbtWkBj.js");
4
3
  const controllerFactory$1 = (db) => {
5
4
  const Report = db.report;
6
5
  const read = async (req, res) => {
@@ -57,10 +56,8 @@ const controllerFactory$1 = (db) => {
57
56
  };
58
57
  var reports_controller = controllerFactory$1;
59
58
  const controllerFactory = reports_controller;
60
- const middlewareFactoryGlobal = index.server;
61
59
  var reports_routes = function(app, db, origins) {
62
60
  const controller = controllerFactory(db);
63
- middlewareFactoryGlobal(db);
64
61
  app.get(
65
62
  "/reports",
66
63
  controller.read
@@ -1,5 +1,4 @@
1
1
  import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
2
- import { s as server } from "./index-C-8xOJnM.mjs";
3
2
  const controllerFactory$1 = (db) => {
4
3
  const Report = db.report;
5
4
  const read = async (req, res) => {
@@ -56,10 +55,8 @@ const controllerFactory$1 = (db) => {
56
55
  };
57
56
  var reports_controller = controllerFactory$1;
58
57
  const controllerFactory = reports_controller;
59
- const middlewareFactoryGlobal = server;
60
58
  var reports_routes = function(app, db, origins) {
61
59
  const controller = controllerFactory(db);
62
- middlewareFactoryGlobal(db);
63
60
  app.get(
64
61
  "/reports",
65
62
  controller.read
@@ -74,7 +74,7 @@ var spot_model = (db) => {
74
74
  const controllerFactory$1 = (db) => {
75
75
  const Spot = db.spot;
76
76
  const readOne = (req, res) => {
77
- Spot.findOne({ _id: req.params._id }).populate("members.user").populate("subspots").then((spot) => {
77
+ Spot.findOne({ _id: req.params._id }).then((spot) => {
78
78
  if (!spot) {
79
79
  return res.status(404).send({ message: "Отдел не найден" });
80
80
  }
@@ -84,7 +84,7 @@ const controllerFactory$1 = (db) => {
84
84
  });
85
85
  };
86
86
  const read = (req, res) => {
87
- Spot.find({ organization: req.params._id }).populate("members.user").populate("subspots").then((spots) => {
87
+ Spot.find({ organization: req.params._id }).then((spots) => {
88
88
  if (!spots) {
89
89
  return res.status(404).send({ message: "Spots not found" });
90
90
  }
@@ -117,7 +117,7 @@ const controllerFactory$1 = (db) => {
117
117
  });
118
118
  };
119
119
  const deleteSpot = (req, res) => {
120
- Spot.findOneAndRemove({ _id: req.body._id, organization: req.params._id }).then((spot) => {
120
+ Spot.findOneAndDelete({ _id: req.body._id, organization: req.params._id }).then((spot) => {
121
121
  if (!spot) {
122
122
  return res.status(404).send({ message: "Spot not found" });
123
123
  }
@@ -73,7 +73,7 @@ var spot_model = (db) => {
73
73
  const controllerFactory$1 = (db) => {
74
74
  const Spot = db.spot;
75
75
  const readOne = (req, res) => {
76
- Spot.findOne({ _id: req.params._id }).populate("members.user").populate("subspots").then((spot) => {
76
+ Spot.findOne({ _id: req.params._id }).then((spot) => {
77
77
  if (!spot) {
78
78
  return res.status(404).send({ message: "Отдел не найден" });
79
79
  }
@@ -83,7 +83,7 @@ const controllerFactory$1 = (db) => {
83
83
  });
84
84
  };
85
85
  const read = (req, res) => {
86
- Spot.find({ organization: req.params._id }).populate("members.user").populate("subspots").then((spots) => {
86
+ Spot.find({ organization: req.params._id }).then((spots) => {
87
87
  if (!spots) {
88
88
  return res.status(404).send({ message: "Spots not found" });
89
89
  }
@@ -116,7 +116,7 @@ const controllerFactory$1 = (db) => {
116
116
  });
117
117
  };
118
118
  const deleteSpot = (req, res) => {
119
- Spot.findOneAndRemove({ _id: req.body._id, organization: req.params._id }).then((spot) => {
119
+ Spot.findOneAndDelete({ _id: req.body._id, organization: req.params._id }).then((spot) => {
120
120
  if (!spot) {
121
121
  return res.status(404).send({ message: "Spot not found" });
122
122
  }