PageSourceSearch

https://teamily.netlify.app/static/js/4.aa5c509e.chunk.js

js teamily.netlify.app collected 2026-10-03 11:29:18 UTC 9,088 bytes, 2 lines download raw bytes

1(this["webpackJsonpteam-work"]=this["webpackJsonpteam-work"]||[]).push([[4],{444:function(e,t,a){},452:function(e,t,a){},500:function(e,t,a){},507:function(e,t,a){"use strict";a.r(t);var i=a(10),n=a(1),r=a(0),s=a(132);function c(e,t){if(null==e)return{};var a,i,n=function(e,t){if(null==e)return{};var a,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)a=r[i],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)a=r[i],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=a(15),l=a.n(o),d=a(23),u=a(16),m=a(404),j=a(418),g=a(509),p=a(510),b=a(409),h=a(511),O=a(512),x=a(62),y=a(34),f=a(68);a(444);function v(e){var t=e.name,a=e.label,i=e.accepter,r=c(e,["name","label","accepter"]);return Object(n.jsxs)(m.a,{children:[Object(n.jsxs)(j.a,{children:[a," "]}),Object(n.jsx)(g.a,Object(s.a)({name:t,accepter:i},r))]})}var w=function(e){var t=p.a.Types.StringType,a=p.a.Model({password:t().isRequired("Password is required.").minLength(4,"Password Length should more than 4 characters long"),email:e.email?null:t().isEmail("Please enter a valid email address.").isRequired("This field is required.")}),s=Object(y.c)(),c=Object(i.a)(s,1)[0],o=Object(r.useState)(!1),m=Object(i.a)(o,2),j=m[0],g=m[1],w=Object(r.useState)({email:"",password:""}),S=Object(i.a)(w,2),_=S[0],k=S[1],L=Object(f.a)(),N=L.get("organizationID"),q=L.get("org"),E=L.get("inviteKey");return Object(n.jsxs)("div",{className:"login_form_container",children:[Object(n.jsx)(d.a,{children:Object(n.jsx)("title",{children:"Login || Teamily"})}),Object(n.jsx)("div",{style:{textAlign:"center",fontSize:"40px"},children:"Login"}),Object(n.jsxs)(h.a,{onSubmit:function(t){t&&(g(!0),l.a.post("/login",_).then((function(t){g(!1),200===t.data.code&&(b.a.success({title:"Login Success",description:"You have successfully Logged In"}),c.setLoginDetails({is_current_user_logged_in:!0}),c.setUserDetails(t.data.user),window.localStorage.setItem("auth-token",JSON.stringify(t.data.token)),l.a.defaults.headers.common.Authorization="Bearer ".concat(t.data.token),setTimeout((function(){e.props.history.push("".concat(e.redirect_to))}),3e3))})).catch((function(e){g(!1),-1!==e.message.indexOf("403")?b.a.error({title:"Login Error",description:"Incorrect Username Or Password"}):-1!==e.message.indexOf("Network Error")?b.a.warning({title:"Network Error",description:"Looks Like you are not connected to the internet"}):b.a.warning({title:"Server Error",description:"Something went wrong"})})))},onChange:function(t){return k({email:e.email?e.email:t.email,password:t.password})},model:a,children:[Object(n.jsx)(v,{name:"email",type:"email",readOnly:!!e.email,value:e.email,label:"Email"}),Object(n.jsx)(v,{name:"password",type:"password",label:"Password"}),Object(n.jsx)(O.a,{style:{display:"flex",justifyContent:"center"},children:Object(n.jsx)(x.a,{loading:j,style:{width:"300px",background:" #160e1a"},appearance:"primary",type:"submit",children:"Submit"})})]}),Object(n.jsxs)("div",{className:"auth_link",children:[Object(n.jsx)("h5",{children:"Dont have an account?"}),Object(n.jsx)(u.b,{to:e.email?"/auth/signup?entrypoint=invite&email=".concat(e.email,"&organizationID=").concat(N,"&org=").concat(q,"&inviteKey=").concat(E):"/auth/signup",children:"create an account"})]})]})},S=a(47),_=a(506),k=a(419),L=(a(452),p.a.Types.StringType);function N(e){var t=e.name,a=e.label,i=e.accepter,r=c(e,["name","label","accepter"]);return Object(n.jsxs)(m.a,{children:[Object(n.jsxs)(j.a,{children:[a," "]}),Object(n.jsx)(g.a,Object(s.a)({name:t,accepter:i},r))]})}var q=function(e){var t=p.a.Model({password:L().isRequired("Password is required.").minLength(4,"Password Length should more than 4 characters long"),email:e.email?null:L().isEmail("Please enter a valid email address.").isRequired("Email is required."),firstname:L().isRequired("Firstname is required."),username:L().isRequired("Username is required."),lastname:L().isRequired("Lastname is required."),address:L().isRequired("Address is required.")}),a=Object(y.c)(),c=Object(i.a)(a,1)[0],o=Object(r.useState)(!1),g=Object(i.a)(o,2),v=g[0],w=g[1],S=Object(r.useState)(!1),q=Object(i.a)(S,2),E=q[0],z=q[1],D=Object(r.useState)({email:"",username:"",firstname:"",lastname:"",address:"",gender:"",password:""}),I=Object(i.a)(D,2),R=I[0],T=I[1],P=Object(f.a)(),A=P.get("organizationID"),K=P.get("org"),C=P.get("inviteKey");return Object(n.jsxs)("div",{className:"signup_form_container",children:[Object(n.jsx)(d.a,{children:Object(n.jsx)("title",{children:"signup || Teamily"})}),Object(n.jsx)("div",{className:"header_signup_text",style:{textAlign:"center",fontSize:"40px"},children:"Create An Account"}),Object(n.jsxs)(h.a,{onChange:function(t){return T(Object(s.a)({email:e.email?e.email:t.email,gender:R.gender},t))},onSubmit:function(t){if(!R.gender)return w(!0);t&&(w(!1),z(!0),l.a.post("/signup",R).then((function(t){z(!1),"user created successfully"===t.data.message&&(b.a.success({title:"Signup Success",description:"You have successfully Signed Up"}
1),c.setLoginDetails({is_current_user_logged_in:!0}),c.setUserDetails(t.data.user),window.localStorage.setItem("auth-token",JSON.stringify(t.data.token)),setTimeout((function(){e.props.history.push("".concat(e.redirect_to))}),3e3))})).catch((function(e){return z(!1),e.response&&"email already taken"===e.response.data.message?b.a.error({title:"Sigup Error",description:"Email already taken"}):e.response&&"username already taken"===e.response.data.message?b.a.error({title:"Sigup Error",description:"username already taken"}):-1!==e.message.indexOf("Network Error")?b.a.warning({title:"Network Error",description:"Looks Like you are not connected to the internet"}):b.a.warning({title:"Server Error",description:"Something went wrong"})})))},model:t,children:[Object(n.jsx)(N,{type:"text",name:"username",label:"username"}),Object(n.jsx)(N,{name:"email",type:"email",readOnly:!!e.email,value:e.email&&e.email,label:"Email"}),Object(n.jsx)(N,{name:"firstname",label:"Firstname"}),Object(n.jsx)(N,{name:"lastname",label:"Lastname"}),Object(n.jsx)(N,{name:"address",label:"Address"}),Object(n.jsx)(N,{name:"password",type:"password",label:"Password"}),Object(n.jsxs)(m.a,{children:[Object(n.jsx)(j.a,{children:"Gender"}),Object(n.jsx)(_.a,{onSelect:function(e){return T(Object(s.a)(Object(s.a)({},R),{},{gender:e}))},name:"gender",data:[{value:"male",label:"male",groupBy:"gender"},{value:"female",label:"female",groupBy:"gender"}],style:{width:"100%"}}),v&&Object(n.jsx)(k.a,{style:{color:"red"},children:"Gender is Required"})]}),Object(n.jsx)(O.a,{style:{display:"flex",justifyContent:"center"},children:Object(n.jsx)(x.a,{loading:E,style:{borderTopLeftRadius:"20px",borderBottomLeftRadius:"20px",borderTopRightRadius:"20px",width:"300px",background:" #160e1a"},appearance:"primary",type:"submit",children:"Submit"})})]}),Object(n.jsxs)("div",{classNamke:"auth_link",children:[Object(n.jsx)("h5",{children:"Already have an account?"}),Object(n.jsx)(u.b,{to:e.email?"/auth/login?entrypoint=invite&email=".concat(e.email,"&organizationID=").concat(A,"&org=").concat(K,"&inviteKey=").concat(C):"/auth/login",children:"login"})]})]})},E=a.p+"static/media/samji_illustrator.38333619.jpeg";a(500);t.default=function(e){var t=Object(r.useState)("login"),a=Object(i.a)(t,2),s=a[0],c=a[1],o=Object(f.a)();return Object(r.useEffect)((function(){e.match.params&&"login"===e.match.params.type?c("login"):e.match.params&&"signup"===e.match.params.type?c("signup"):e.history.push("/auth/login")}),[e.match.params.type]),Object(n.jsx)("div",{className:"auth_container",children:"invite"===o.get("entrypoint")&&o.get("email")&&o.get("inviteKey")&&o.get("org")?Object(n.jsxs)("div",{children:[Object(n.jsx)("div",{className:"auth_nav",children:Object(n.jsx)(S.a,{})}),Object(n.jsxs)("h4",{style:{textAlign:"center",fontSize:"33px"},children:[s.toUpperCase()," To Join ",o.get("org")]}),"login"===s?Object(n.jsx)("div",{children:Object(n.jsx)(w,{props:e,email:o.get("email"),redirect_to:"/accept/invite?email=".concat(o.get("email"),"&organizationID=").concat(o.get("organizationID"),"&org=").concat(o.get("org"),"&inviteKey=").concat(o.get("inviteKey"))})}):Object(n.jsx)("div",{children:Object(n.jsx)(q,{props:e,email:o.get("email"),redirect_to:"/accept/invite?email=".concat(o.get("email"),"&organizationID=").concat(o.get("organizationID"),"&org=").concat(o.get("org"),"&inviteKey=").concat(o.get("inviteKey"))})})]}):Object(n.jsxs)("div",{className:"second_design",children:[Object(n.jsxs)("div",{className:"first_section",children:[Object(n.jsx)("div",{className:"auth_nav",children:Object(n.jsx)(S.a,{})}),"login"===s?Object(n.jsx)("div",{children:Object(n.jsx)(w,{props:e,redirect_to:"/user/organization"})}):Object(n.jsx)("div",{className:"signup_form_scroll",children:Object(n.jsx)(q,{props:e,redirect_to:"/user/organization"})})]}),Object(n.jsx)("div",{className:"second_section",children:Object(n.jsx)("img",{width:"800px",height:"100%",src:E,alt:""})})]})})}}}]);
2//# sourceMappingURL=4.aa5c509e.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.