@ozdao/prometheus-framework 0.2.126 → 0.2.127

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. package/dist/auth.server.js +61 -2
  2. package/dist/auth.server.mjs +61 -2
  3. package/dist/gallery.server.js +55 -3
  4. package/dist/gallery.server.mjs +55 -3
  5. package/dist/main-CF35oB7q.js +92 -0
  6. package/dist/main-CmL_j3wv.mjs +14223 -0
  7. package/dist/organizations.server.js +112 -184
  8. package/dist/organizations.server.mjs +112 -184
  9. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  11. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -94
  13. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +94 -1
  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/Popup/Popup.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -77
  23. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  43. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/auth/store/auth.js +57 -50
  45. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +68 -62
  47. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  51. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  63. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  67. package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +4 -4
  69. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  75. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  79. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +14 -14
  87. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +116 -94
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  95. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  97. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  99. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  101. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +9 -4
  103. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  119. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  123. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  127. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  129. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  133. package/dist/prometheus-framework.cjs.js +1 -1
  134. package/dist/prometheus-framework.es.js +1 -1
  135. package/dist/style.css +1 -1
  136. package/dist/web-BDaOF322.js +1 -0
  137. package/dist/web-DtWmpLE-.mjs +54 -0
  138. package/package.json +1 -1
  139. package/src/modules/auth/controllers/auth.controller.js +68 -2
  140. package/src/modules/auth/routes/auth.routes.js +8 -1
  141. package/src/modules/auth/store/auth.js +21 -9
  142. package/src/modules/backoffice/components/pages/Dashboard.vue +6 -0
  143. package/src/modules/gallery/gallery.client.js +1 -1
  144. package/src/modules/gallery/routes/gallery.routes.js +7 -3
  145. package/src/modules/globals/mixins/mixins.js +17 -0
  146. package/src/modules/middlewares/server/verifyAccesses.js +100 -23
  147. package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
  148. package/src/modules/organizations/components/pages/DepartmentEdit.vue +24 -2
  149. package/src/modules/organizations/components/pages/Members.vue +1 -1
  150. package/src/modules/organizations/models/department.model.js +42 -2
  151. package/src/modules/organizations/routes/departments.routes.js +1 -8
  152. package/src/modules/organizations/store/departments.js +5 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const _={class:"t-left pd-medium"},y={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",_,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const _={class:"t-left pd-medium"},y={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",_,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
@@ -1,7 +1,7 @@
1
1
  import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as p, toDisplayString as i, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as b, withCtx as P } from "vue";
2
2
  import "../../../../components/Tab/Tab.vue.js";
3
- import c from "../../../../components/Field/Field.vue.js";
4
- import k from "../../../../components/Button/Button.vue.js";
3
+ import c from "../../../../components/Field/Field.vue2.js";
4
+ import k from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as q, useRouter as v } from "vue-router";
6
6
  import { useI18n as E } from "vue-i18n";
7
7
  import { state as s, actions as h } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../../../components/Field/Field.vue.cjs"),h=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),t=require("../../store/auth.cjs"),w=require("../../../organizations/store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const f={class:"t-left pd-medium"},v=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),b=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),q={class:"mn-b-semi radius-small o-hidden"},y=e.createElementVNode("span",null,"Join",-1),g={__name:"Invite",async setup(V){let i,n;const l=e.ref(null),a=u.useRoute(),p=u.useRouter();[i,n]=e.withAsyncContext(()=>w.actions.readOne(a.query.inviteCode)),await i,n();async function m(){try{await c.validateInputs(l,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function _(){p.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[v,b,e.createElementVNode("div",q,[e.createVNode(d.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:l.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(d.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(h.default,{submit:m,callback:_,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[y]),_:1})]))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../../../components/Field/Field.vue2.cjs"),h=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),t=require("../../store/auth.cjs"),w=require("../../../organizations/store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const f={class:"t-left pd-medium"},v=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),b=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),q={class:"mn-b-semi radius-small o-hidden"},y=e.createElementVNode("span",null,"Join",-1),g={__name:"Invite",async setup(V){let i,n;const l=e.ref(null),a=u.useRoute(),p=u.useRouter();[i,n]=e.withAsyncContext(()=>w.actions.readOne(a.query.inviteCode)),await i,n();async function m(){try{await c.validateInputs(l,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function _(){p.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[v,b,e.createElementVNode("div",q,[e.createVNode(d.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:l.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(d.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(h.default,{submit:m,callback:_,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[y]),_:1})]))}};exports.default=g;
@@ -1,7 +1,7 @@
1
1
  import { ref as f, withAsyncContext as _, openBlock as w, createElementBlock as h, createElementVNode as s, createVNode as i, withCtx as b } from "vue";
2
2
  import "../../../../components/Tab/Tab.vue.js";
3
- import p from "../../../../components/Field/Field.vue.js";
4
- import v from "../../../../components/Button/Button.vue.js";
3
+ import p from "../../../../components/Field/Field.vue2.js";
4
+ import v from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as y, useRouter as g } from "vue-router";
6
6
  import { state as e, actions as P } from "../../store/auth.js";
7
7
  import { actions as R } from "../../../organizations/store/invites.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),b=require("vue-i18n"),g=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const w={class:"t-left pd-medium"},V={class:"mn-b-small"},N={class:"mn-b-small t-transp"},q={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},y={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},S={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...g.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",V,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{onChange:o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),b=require("vue-i18n"),g=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const w={class:"t-left pd-medium"},V={class:"mn-b-small"},N={class:"mn-b-small t-transp"},q={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},y={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},S={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...g.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",V,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{onChange:o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
@@ -1,8 +1,8 @@
1
1
  import { ref as m, openBlock as u, createElementBlock as p, createElementVNode as a, toDisplayString as r, unref as t, createVNode as l, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as C } from "vue";
2
2
  import P from "../../../../components/Tab/Tab.vue2.js";
3
- import E from "../../../../components/Field/Field.vue.js";
3
+ import E from "../../../../components/Field/Field.vue2.js";
4
4
  import I from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import V from "../../../../components/Button/Button.vue.js";
5
+ import V from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as k, useRouter as x } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import S from "../../localization/ResetPassword.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Field/Field.vue.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),s=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const S={class:""},q=e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,-1),E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},T={class:"pos-relative"},I={class:"mn-b-thin radius-small"},U={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},O={__name:"SignIn",setup(j){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((a,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=a,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,s.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}const o={...s.state.user};await s.actions.login(o,n.value)}function g(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:s.state.user._id},query:{afterAuth:"true"}})}return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[q,e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":a[0]||(a[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(w.default,{onChange:a[1]||(a[1]=t=>s.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validCharactersOnly:!0,validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder"),type:"tel"},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(m.default,{field:s.state.user.email,"onUpdate:field":a[2]||(a[2]=t=>s.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:s.state.user.password,"onUpdate:field":a[3]||(a[3]=t=>s.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-light pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:g,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),s=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const S={class:""},q=e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,-1),E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},T={class:"pos-relative"},I={class:"mn-b-thin radius-small"},U={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},O={__name:"SignIn",setup(j){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((a,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=a,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,s.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}const o={...s.state.user};await s.actions.login(o,n.value)}function g(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:s.state.user._id},query:{afterAuth:"true"}})}return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[q,e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":a[0]||(a[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(w.default,{onChange:a[1]||(a[1]=t=>s.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validCharactersOnly:!0,validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder"),type:"tel"},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(m.default,{field:s.state.user.email,"onUpdate:field":a[2]||(a[2]=t=>s.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:s.state.user.password,"onUpdate:field":a[3]||(a[3]=t=>s.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-light pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:g,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=O;
@@ -1,8 +1,8 @@
1
1
  import { ref as m, onMounted as k, resolveComponent as E, openBlock as V, createElementBlock as I, createElementVNode as s, createTextVNode as c, toDisplayString as r, unref as a, createVNode as o, withCtx as d, Transition as b, withDirectives as g, vShow as w } from "vue";
2
2
  import q from "../../../../components/Tab/Tab.vue2.js";
3
- import y from "../../../../components/Field/Field.vue.js";
3
+ import y from "../../../../components/Field/Field.vue2.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import O from "../../../../components/Button/Button.vue.js";
5
+ import O from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as j, useRouter as A } from "vue-router";
7
7
  import { useI18n as F } from "vue-i18n";
8
8
  import N from "../../localization/SignIn.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const V={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},y={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),s=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await i.validateInputs(s,i.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await i.validateInputs(r,i.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{onChange:n[1]||(n[1]=o=>l.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:s.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",T,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const V={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},y={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),s=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await i.validateInputs(s,i.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await i.validateInputs(r,i.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{onChange:n[1]||(n[1]=o=>l.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:s.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",T,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
@@ -1,8 +1,8 @@
1
1
  import { ref as d, resolveComponent as E, openBlock as S, createElementBlock as x, createElementVNode as o, toDisplayString as r, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as f, vShow as _, createTextVNode as v } from "vue";
2
2
  import N from "../../../../components/Tab/Tab.vue2.js";
3
- import V from "../../../../components/Field/Field.vue.js";
3
+ import V from "../../../../components/Field/Field.vue2.js";
4
4
  import y from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import D from "../../../../components/Button/Button.vue.js";
5
+ import D from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as I, useRouter as P } from "vue-router";
7
7
  import { useI18n as F } from "vue-i18n";
8
8
  import O from "../../localization/SignUp.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../../node_modules/axios/lib/axios.cjs"),d=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),w=require("vue"),c=require("../../globals/store/globals.cjs"),g=require("./twofa.cjs"),i=f.default.create({baseURL:process.env.API_URL,withCredentials:!0}),o=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function O(){const e=await P("user");if(e){const{_id:t,email:s,phone:n,roles:a,accessToken:r}=e;Object.assign(o.user,{_id:t,email:s,phone:n}),Object.assign(o.access,{token:r,roles:a,status:!!r}),i.interceptors.request.use(u=>(r&&(u.headers["x-access-token"]=r),u),u=>Promise.reject(u))}}O();const k={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return p("user",s.data),Object.assign(o.user,{...s.data}),Object.assign(o.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(o.access,{token:null,status:!1,roles:null}),c.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:n,passwordRepeat:a}=o.user;if(console.log(n),console.log(a),n!==a){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(r),new Error(r.response.status)}try{const r=await i.post("/api/auth/signup",{...e,type:t,inviteCode:s});return console.log(r),r.data.accessToken&&p("user",r.data),Object.assign(o.user,{...r.data}),Object.assign(o.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw c.setError(r),console.log("Sign up falied"),r}},logout(){j("user"),Object.assign(o.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(o.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await i.post("/api/auth/reset-password",{email:e.email,phone:e.phone,type:t});return Object.assign(g.state.code,{...s.data,isSended:!0}),s.data}catch(s){return c.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:n}=o.user;if(s!==n){const a={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(a),new Error(a.response.status)}try{const a=await i.post("/api/auth/update-password",{email:e.email,phone:e.phone,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return a.data.accessToken&&p("user",a.data),Object.assign(o.user,{...a.data}),Object.assign(o.access,{token:a.data.accessToken,status:!0}),a.data}catch(a){return c.setError(a),Promise.reject(a)}}},h={development:{secure:!1,expires:7,sameSite:"Lax"},production:{expires:7,path:"/",domain:process.env.API_URL,sameSite:"none",secure:!0}};async function P(e){if(process.env.MOBILE_APP){const{value:t}=await l.Preferences.get({key:e});return t?JSON.parse(t):null}else{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.DOMAIN_URL){process.env.MOBILE_APP?l.Preferences.set({key:e,value:JSON.stringify(t)}):d.default.set(e,JSON.stringify(t),h[s])}function j(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)l.Preferences.remove({key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};d.default.remove(e,s)}}w.watch(o,(e,t)=>{});exports.actions=k;exports.state=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../node_modules/axios/lib/axios.cjs"),l=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),w=require("../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),f=require("vue"),c=require("../../globals/store/globals.cjs"),h=require("./twofa.cjs"),u=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=f.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1},accesses:[]});async function k(){try{const e=await m("user");if(e){const{_id:t,email:s,phone:n,roles:o,accessToken:r}=e;d.default.interceptors.request.use(i=>(i.headers["x-access-token"]=r,i),i=>Promise.reject(i));const O=(await d.default.get("/api/auth/check-accesses")).data;Object.assign(a.user,{_id:t,email:s,phone:n}),Object.assign(a.access,{token:r,roles:o,status:!!r}),a.accesses=O}}catch(e){console.error("Error initializing app:",e),g("user"),a.accesses=[]}}k();const P={async login(e,t){try{const s=await u.post("/api/auth/signin",{...e,type:t});return p("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),c.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:n,passwordRepeat:o}=a.user;if(console.log(n),console.log(o),n!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(r),new Error(r.response.status)}try{const r=await u.post("/api/auth/signup",{...e,type:t,inviteCode:s});return console.log(r),r.data.accessToken&&p("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw c.setError(r),console.log("Sign up falied"),r}},logout(){g("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await u.post("/api/auth/reset-password",{email:e.email,phone:e.phone,type:t});return Object.assign(h.state.code,{...s.data,isSended:!0}),s.data}catch(s){return c.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:n}=a.user;if(s!==n){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(o),new Error(o.response.status)}try{const o=await u.post("/api/auth/update-password",{email:e.email,phone:e.phone,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return c.setError(o),Promise.reject(o)}}},j={development:{secure:!1,expires:7,sameSite:"Lax"},production:{expires:7,path:"/",domain:process.env.API_URL,sameSite:"none",secure:!0}};async function m(e){if(process.env.MOBILE_APP){const{value:t}=await w.Preferences.get({key:e});return t?JSON.parse(t):null}else{const t=l.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.DOMAIN_URL){process.env.MOBILE_APP?w.Preferences.set({key:e,value:JSON.stringify(t)}):l.default.set(e,JSON.stringify(t),j[s])}function g(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)w.Preferences.remove({key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};l.default.remove(e,s)}}f.watch(a,(e,t)=>{});exports.actions=P;exports.state=a;
@@ -1,10 +1,10 @@
1
- import w from "../../../../node_modules/axios/lib/axios.js";
2
- import d from "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
- import { Preferences as l } from "../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
4
- import { reactive as m, watch as f } from "vue";
1
+ import d from "../../../../node_modules/axios/lib/axios.js";
2
+ import l from "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
+ import { Preferences as w } from "../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
4
+ import { reactive as f, watch as O } from "vue";
5
5
  import { setError as c } from "../../globals/store/globals.js";
6
- import { state as O } from "./twofa.js";
7
- const i = w.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m({
6
+ import { state as h } from "./twofa.js";
7
+ const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = f({
8
8
  user: {
9
9
  _id: void 0,
10
10
  username: "",
@@ -17,32 +17,39 @@ const i = w.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m
17
17
  roles: null,
18
18
  token: null,
19
19
  status: !1
20
- }
20
+ },
21
+ accesses: []
21
22
  });
22
- async function g() {
23
- const e = await k("user");
24
- if (e) {
25
- const { _id: t, email: s, phone: n, roles: o, accessToken: a } = e;
26
- Object.assign(r.user, { _id: t, email: s, phone: n }), Object.assign(r.access, { token: a, roles: o, status: !!a }), i.interceptors.request.use((p) => (a && (p.headers["x-access-token"] = a), p), (p) => Promise.reject(p));
23
+ async function k() {
24
+ try {
25
+ const e = await j("user");
26
+ if (e) {
27
+ const { _id: t, email: s, phone: n, roles: r, accessToken: a } = e;
28
+ d.interceptors.request.use((i) => (i.headers["x-access-token"] = a, i), (i) => Promise.reject(i));
29
+ const g = (await d.get("/api/auth/check-accesses")).data;
30
+ Object.assign(o.user, { _id: t, email: s, phone: n }), Object.assign(o.access, { token: a, roles: r, status: !!a }), o.accesses = g;
31
+ }
32
+ } catch (e) {
33
+ console.error("Error initializing app:", e), m("user"), o.accesses = [];
27
34
  }
28
35
  }
29
- g();
30
- const R = {
36
+ k();
37
+ const C = {
31
38
  async login(e, t) {
32
39
  try {
33
- const s = await i.post("/api/auth/signin", {
40
+ const s = await p.post("/api/auth/signin", {
34
41
  ...e,
35
42
  type: t
36
43
  });
37
- return u("user", s.data), Object.assign(r.user, {
44
+ return u("user", s.data), Object.assign(o.user, {
38
45
  ...s.data
39
- }), Object.assign(r.access, {
46
+ }), Object.assign(o.access, {
40
47
  token: s.data.accessToken,
41
48
  status: !0,
42
49
  roles: s.data.roles
43
50
  }), s.data;
44
51
  } catch (s) {
45
- return Object.assign(r.access, {
52
+ return Object.assign(o.access, {
46
53
  token: null,
47
54
  status: !1,
48
55
  roles: null
@@ -50,8 +57,8 @@ const R = {
50
57
  }
51
58
  },
52
59
  async signup(e, t, s) {
53
- const { password: n, passwordRepeat: o } = r.user;
54
- if (console.log(n), console.log(o), n !== o) {
60
+ const { password: n, passwordRepeat: r } = o.user;
61
+ if (console.log(n), console.log(r), n !== r) {
55
62
  const a = {
56
63
  response: {
57
64
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
@@ -60,14 +67,14 @@ const R = {
60
67
  throw c(a), new Error(a.response.status);
61
68
  }
62
69
  try {
63
- const a = await i.post("/api/auth/signup", {
70
+ const a = await p.post("/api/auth/signup", {
64
71
  ...e,
65
72
  type: t,
66
73
  inviteCode: s
67
74
  });
68
- return console.log(a), a.data.accessToken && u("user", a.data), Object.assign(r.user, {
75
+ return console.log(a), a.data.accessToken && u("user", a.data), Object.assign(o.user, {
69
76
  ...a.data
70
- }), Object.assign(r.access, {
77
+ }), Object.assign(o.access, {
71
78
  token: a.data.accessToken,
72
79
  status: !0,
73
80
  roles: a.data.roles
@@ -77,24 +84,24 @@ const R = {
77
84
  }
78
85
  },
79
86
  logout() {
80
- P("user"), Object.assign(r.user, {
87
+ m("user"), Object.assign(o.user, {
81
88
  email: "",
82
89
  phone: "",
83
90
  password: "",
84
91
  passwordRepeat: ""
85
- }), Object.assign(r.access, {
92
+ }), Object.assign(o.access, {
86
93
  token: null,
87
94
  status: !1
88
95
  });
89
96
  },
90
97
  async resetPassword(e, t) {
91
98
  try {
92
- const s = await i.post("/api/auth/reset-password", {
99
+ const s = await p.post("/api/auth/reset-password", {
93
100
  email: e.email,
94
101
  phone: e.phone,
95
102
  type: t
96
103
  });
97
- return Object.assign(O.code, {
104
+ return Object.assign(h.code, {
98
105
  ...s.data,
99
106
  isSended: !0
100
107
  }), s.data;
@@ -103,63 +110,63 @@ const R = {
103
110
  }
104
111
  },
105
112
  async updatePassword(e, t) {
106
- const { password: s, passwordRepeat: n } = r.user;
113
+ const { password: s, passwordRepeat: n } = o.user;
107
114
  if (s !== n) {
108
- const o = {
115
+ const r = {
109
116
  response: {
110
117
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
111
118
  }
112
119
  };
113
- throw c(o), new Error(o.response.status);
120
+ throw c(r), new Error(r.response.status);
114
121
  }
115
122
  try {
116
- const o = await i.post("/api/auth/update-password", {
123
+ const r = await p.post("/api/auth/update-password", {
117
124
  email: e.email,
118
125
  phone: e.phone,
119
126
  password: e.password,
120
127
  passwordRepeat: e.passwordRepeat,
121
128
  type: t
122
129
  });
123
- return o.data.accessToken && u("user", o.data), Object.assign(r.user, {
124
- ...o.data
125
- }), Object.assign(r.access, {
126
- token: o.data.accessToken,
130
+ return r.data.accessToken && u("user", r.data), Object.assign(o.user, {
131
+ ...r.data
132
+ }), Object.assign(o.access, {
133
+ token: r.data.accessToken,
127
134
  status: !0
128
- }), o.data;
129
- } catch (o) {
130
- return c(o), Promise.reject(o);
135
+ }), r.data;
136
+ } catch (r) {
137
+ return c(r), Promise.reject(r);
131
138
  }
132
139
  }
133
- }, h = {
140
+ }, P = {
134
141
  development: { secure: !1, expires: 7, sameSite: "Lax" },
135
142
  production: { expires: 7, path: "/", domain: process.env.API_URL, sameSite: "none", secure: !0 }
136
143
  };
137
- async function k(e) {
144
+ async function j(e) {
138
145
  if (process.env.MOBILE_APP) {
139
- const { value: t } = await l.get({ key: e });
146
+ const { value: t } = await w.get({ key: e });
140
147
  return t ? JSON.parse(t) : null;
141
148
  } else {
142
- const t = d.get(e);
149
+ const t = l.get(e);
143
150
  return t ? JSON.parse(t) : null;
144
151
  }
145
152
  }
146
153
  function u(e, t, s = process.env.DOMAIN_URL) {
147
- process.env.MOBILE_APP ? l.set({
154
+ process.env.MOBILE_APP ? w.set({
148
155
  key: e,
149
156
  value: JSON.stringify(t)
150
- }) : d.set(e, JSON.stringify(t), h[s]);
157
+ }) : l.set(e, JSON.stringify(t), P[s]);
151
158
  }
152
- function P(e, t = process.env.NODE_ENV) {
159
+ function m(e, t = process.env.NODE_ENV) {
153
160
  if (process.env.MOBILE_APP)
154
- l.remove({ key: e });
161
+ w.remove({ key: e });
155
162
  else {
156
163
  const s = t === "production" ? { domain: process.env.API_URL } : {};
157
- d.remove(e, s);
164
+ l.remove(e, s);
158
165
  }
159
166
  }
160
- f(r, (e, t) => {
167
+ O(o, (e, t) => {
161
168
  });
162
169
  export {
163
- R as actions,
164
- r as state
170
+ C as actions,
171
+ o as state
165
172
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../mobile/components/Menu/Menu.vue.cjs"),o=require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const u=require("../../../icons/entities/IconProducts.vue.cjs"),l=require("../../../icons/entities/IconEvents.vue.cjs"),c=require("../../../icons/entities/IconGroups.vue.cjs"),d=require("../../../icons/entities/IconGallery.vue.cjs"),f=require("../../../icons/entities/IconOrders.vue.cjs"),m=require("../../../icons/entities/IconLeftovers.vue.cjs"),n=require("vue-router");require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const p={class:""},_=e.createElementVNode("h1",{class:"pd-medium radius-medium bg-light mn-b-small"},"Welcome to Backoffice",-1),v=e.createElementVNode("span",null," Members ",-1),h=e.createElementVNode("span",null," Products ",-1),N=e.createElementVNode("span",null," Leftovers ",-1),V=e.createElementVNode("span",null," Orders ",-1),b=e.createElementVNode("span",null," Gallery ",-1),g=e.createElementVNode("span",null," Events ",-1),q={__name:"Dashboard",props:{favorites:Array},setup(w){const t=n.useRoute(),s=n.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),(C,r)=>(e.openBlock(),e.createElementBlock("div",p,[_,e.createVNode(i.default,{class:"bg-light mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(o.default,{onClick:r[0]||(r[0]=a=>e.unref(s).push({name:"Organization Members",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(c.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),v]),_:1}),e.createVNode(o.default,{onClick:r[1]||(r[1]=a=>e.unref(s).push({name:"Products",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(u.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),h]),_:1}),e.createVNode(o.default,{onClick:r[2]||(r[2]=a=>e.unref(s).push({name:"Leftovers",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(m.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),N]),_:1}),e.createVNode(o.default,{onClick:r[3]||(r[3]=a=>e.unref(s).push({name:"Backoffice Orders",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),V]),_:1}),e.createVNode(o.default,{onClick:r[4]||(r[4]=a=>e.unref(s).push({name:"Backoffice Gallery",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(d.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),b]),_:1}),e.createVNode(o.default,{onClick:r[5]||(r[5]=a=>e.unref(s).push({name:"Backoffice Events",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(l.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),g]),_:1})]),_:1})]))}};exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../mobile/components/Menu/Menu.vue.cjs"),o=require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const i=require("../../../icons/entities/IconProducts.vue.cjs"),d=require("../../../icons/entities/IconEvents.vue.cjs"),m=require("../../../icons/entities/IconGroups.vue.cjs"),f=require("../../../icons/entities/IconGallery.vue.cjs"),p=require("../../../icons/entities/IconOrders.vue.cjs"),_=require("../../../icons/entities/IconLeftovers.vue.cjs"),u=require("vue-router"),n=require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const k={class:""},h=e.createElementVNode("h1",{class:"pd-medium radius-medium bg-light mn-b-small"},"Welcome to Backoffice",-1),v=e.createElementVNode("span",null," Members ",-1),N=e.createElementVNode("span",null," Products ",-1),V=e.createElementVNode("span",null," Leftovers ",-1),C=e.createElementVNode("span",null," Orders ",-1),B=e.createElementVNode("span",null," Gallery ",-1),b=e.createElementVNode("span",null," Events ",-1),g={__name:"Dashboard",props:{favorites:Array},setup(q){const r=u.useRoute(),t=u.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),(a,s)=>(e.openBlock(),e.createElementBlock("div",k,[h,e.createVNode(l.default,{class:"bg-light mn-b-semi"},{default:e.withCtx(()=>[a.hasAccess(e.unref(r).params._id,"members","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:0,onClick:s[0]||(s[0]=c=>e.unref(t).push({name:"Organization Members",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(m.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),v]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"products","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:1,onClick:s[1]||(s[1]=c=>e.unref(t).push({name:"Products",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(i.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),N]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"leftovers","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:2,onClick:s[2]||(s[2]=c=>e.unref(t).push({name:"Leftovers",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(_.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),V]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"orders","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:3,onClick:s[3]||(s[3]=c=>e.unref(t).push({name:"Backoffice Orders",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(p.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),C]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"gallery","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:4,onClick:s[4]||(s[4]=c=>e.unref(t).push({name:"Backoffice Gallery",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),B]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"events","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:5,onClick:s[5]||(s[5]=c=>e.unref(t).push({name:"Backoffice Events",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(d.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),b]),_:1})):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=g;