This commit is contained in:
Linksehat Staging Server
2023-08-14 16:56:18 +07:00
parent 0c673a4cfb
commit 9057e5d00f
130 changed files with 13999 additions and 18848 deletions

View File

@@ -0,0 +1 @@
import{n as d,p as u,s as C,P as p,r as f,q as m,_ as x,t as n,f as v,v as w,w as y}from"./index.665133e4.js";function h(s){return d("MuiCard",s)}u("MuiCard",["root"]);const M=["className","raised"],P=s=>{const{classes:e}=s;return y({root:["root"]},h,e)},R=C(p,{name:"MuiCard",slot:"Root",overridesResolver:(s,e)=>e.root})(()=>({overflow:"hidden"})),U=f.exports.forwardRef(function(e,o){const t=m({props:e,name:"MuiCard"}),{className:l,raised:r=!1}=t,c=x(t,M),a=n({},t,{raised:r}),i=P(a);return v(R,n({className:w(i.root,l),elevation:r?8:void 0,ref:o,ownerState:a},c))}),g=U;export{g as C};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{b as I,a as k,r as u,c as B,e as F,f as e,F as A,j as d,S as R,A as C,T as t,R as f,I as p,g,h as c,i as K,y as T,o as N,G as L,z as _,C as j,B as w,D as z,E as H,s as E}from"./index.665133e4.js";import{P as M}from"./paths.3971dbe6.js";import{P as W}from"./Page.385732f9.js";function D({token:s}){const o=I(),r=k(),[n,S]=u.exports.useState(!1),[i,y]=u.exports.useState(!1),P=B().shape({}),l=F({resolver:N(P)}),{handleSubmit:x,setError:b,formState:{errors:m,isSubmitting:v}}=l;return e(A,{methods:l,onSubmit:x(async h=>{try{await T.post("/forget-password",{...h,token:s}),console.log(h),await new Promise(a=>setTimeout(a,500)),o.current&&r("/auth/login",{replace:!0})}catch(a){console.log(a.response.data),o.current&&b("afterSubmit",{...a,message:a.response.data.message})}}),children:d(R,{spacing:3,children:[!!m.afterSubmit&&e(C,{severity:"error",children:m.afterSubmit.message}),e(t,{children:"Kata Sandi Baru"}),e(f,{name:"new_password",label:"Kata Sandi Baru",type:n?"text":"password",InputProps:{endAdornment:e(p,{position:"end",children:e(g,{onClick:()=>S(!n),edge:"end",children:e(c,{icon:n?"eva:eye-fill":"eva:eye-off-fill"})})})}}),e(t,{children:"Konfirmasi Kata Sandi "}),e(f,{name:"confirm_new_password",label:"Konfirmasi Kata Sandi",type:i?"text":"password",InputProps:{endAdornment:e(p,{position:"end",children:e(g,{onClick:()=>y(!i),edge:"end",children:e(c,{icon:i?"eva:eye-fill":"eva:eye-off-fill"})})})}}),e(K,{fullWidth:!0,size:"large",type:"submit",variant:"contained",loading:v,children:"Reset Password"})]})})}const G=E("div")(({theme:s})=>({display:"flex",height:"100%",alignItems:"center",padding:s.spacing(12,0)}));function J(){const[s,o]=L(),r=s.get("token");return e(W,{title:"Verify",sx:{height:1},children:d(G,{children:[e(_,{}),e(j,{children:d(w,{sx:{maxWidth:480,mx:"auto"},children:[e(z,{size:"small",component:H,to:M.login,startIcon:e(c,{icon:"eva:arrow-ios-back-fill",width:20,height:20}),sx:{mb:3},children:"Back"}),e(t,{variant:"h3",paragraph:!0}),e(t,{sx:{color:"text.secondary"},children:"Please enter your new password."}),e(w,{sx:{mt:5,mb:3},children:e(D,{token:r})})]})})]})})}export{J as default};

View File

@@ -0,0 +1 @@
import{r as o,L as f,u as x,a as F,b as R,c as k,d as m,e as A,j as s,F as B,S as r,f as e,A as u,R as p,I as q,g as D,h as H,i as T,o as W,k as g,C as E,l as z,B as M,T as h,s as i}from"./index.665133e4.js";import{P as G}from"./Page.385732f9.js";import{C as N}from"./Card.f64842fe.js";function V(){const{localeData:t}=o.exports.useContext(f),{login:y}=x(),b=F(),w=R(),[n,S]=o.exports.useState(!1),v=k().shape({email:m().email("Format email tidak valid").required("Email harus diisi"),password:m().required("Password harus diisi")}),C={email:"hospitaladmin@gmail.com",password:"password",remember:!0},d=A({resolver:W(v),defaultValues:C}),{reset:L,setError:I,handleSubmit:P,formState:{errors:l,isSubmitting:j}}=d;return s(B,{methods:d,onSubmit:P(async c=>{try{const a=await y(c.email,c.password);b("/dashboard")}catch(a){console.error(a),L(),w.current&&I("afterSubmit",{...a,message:a.data.message})}}),children:[s(r,{spacing:3,children:[e(u,{severity:"info",children:t.infoLogin}),!!l.afterSubmit&&e(u,{severity:"error",children:l.afterSubmit.data.meta.message}),e(p,{name:"email",label:"Email",required:!0}),e(p,{name:"password",label:"Password",type:n?"text":"password",InputProps:{endAdornment:e(q,{position:"end",children:e(D,{onClick:()=>S(!n),edge:"end",children:e(H,{icon:n?"eva:eye-fill":"eva:eye-off-fill"})})})},required:!0})]}),e(r,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{my:2}}),e(T,{fullWidth:!0,size:"large",type:"submit",variant:"contained",loading:j,sx:{marginTop:2},children:"Login"})]})}const $=i("div")(({theme:t})=>({[t.breakpoints.up("md")]:{display:"flex"}})),J=i("header")(({theme:t})=>({top:0,zIndex:9,lineHeight:0,width:"100%",display:"flex",alignItems:"center",position:"absolute",padding:t.spacing(3),justifyContent:"space-between",[t.breakpoints.up("md")]:{alignItems:"flex-start",padding:t.spacing(7,5,0,7)}}));i(N)(({theme:t})=>({width:"100%",maxWidth:464,display:"flex",flexDirection:"column",justifyContent:"center",margin:t.spacing(2,0,2,2)}));const K=i("div")(({theme:t})=>({maxWidth:480,margin:"auto",display:"flex",minHeight:"100vh",flexDirection:"column",justifyContent:"center",padding:t.spacing(12,0)}));function Y(){const{localeData:t}=o.exports.useContext(f);return x(),g("up","sm"),g("up","md"),e(G,{title:"Login",children:s($,{children:[e(J,{}),e(E,{maxWidth:"sm",children:s(K,{children:[s(r,{direction:"row",alignItems:"center",sx:{mb:5},children:[e(z,{sx:{width:90,height:90}}),s(M,{sx:{flexGrow:1},children:[e(h,{variant:"h4",gutterBottom:!0,children:t.txtLogin1}),e(h,{variant:"body1",sx:{color:"text.secondary"},children:t.txtLogin2})]})]}),e(V,{})]})})]})})}export{Y as default};

View File

@@ -0,0 +1 @@
import{r as c,j as a,m as i,W as x,f as e,B as d}from"./index.665133e4.js";const f=c.exports.forwardRef(({children:r,title:s="",meta:t,...o},n)=>a(i,{children:[a(x,{children:[e("title",{children:`${s} | LinkSehat`}),t]}),e(d,{ref:n,...o,children:r})]})),l=f;export{l as P};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
function r(t,o){return`${t}${o}`}const e="/auth",n={root:e,login:r(e,"/login"),register:r(e,"/register"),loginUnprotected:r(e,"/login-unprotected"),registerUnprotected:r(e,"/register-unprotected"),verify:r(e,"/verify"),resetPassword:r(e,"/reset-password")};export{n as P};