PageSourceSearch

https://web.staffexpress.jp/web-lite/assets/index-3265761d.js

js staffexpress.jp collected 2026-09-24 11:45:34 UTC 2,921 bytes, 1 lines download raw bytes

1import{n as w,o as P,a as S,p as y,r as p,f as L,g as F,i as E,k as I,e as R,j as e,B as n,q as T,T as g,t as b,h as j,I as k,S as v,K as A,G as C,F as N,m as W}from"./index-2aed874b.js";import{P as B}from"./index-f70a4ee8.js";import{b as M}from"./forget-password-faaae667.js";const z=({onSuccess:s,onError:r})=>({mutation:w({mutationFn:a=>P.resetPassword(a),onSuccess:s,onError:r})}),G=()=>{const s=S(y),r=new URLSearchParams(window.location.search).get("token"),[a,o]=p.useState(null),t=L({defaultValues:{password:""},mode:"all",shouldFocusError:!1,resolver:F(M)}),{handleSubmit:l}=t,{mutation:d}=z({onSuccess:()=>{o(null)},onError:i=>{var c,m,h,u,x;(m=(c=i.response)==null?void 0:c.data)!=null&&m.message&&o("パスワードの再設定に失敗しました。URLの有効期限をご確認ください。"),(u=(h=i.response)==null?void 0:h.data)!=null&&u.errors&&E((x=i.response)==null?void 0:x.data,t.setError)}}),f=p.useCallback(async i=>{i.preventDefault(),await l(c=>{d.mutate({...c,webUsername:s??"",token:r??""})})()},[l,d,s,r]);return{form:t,handleSubmit:f,mutation:d,errorMessage:a}},O=()=>{const s=I(),{form:r,handleSubmit:a,mutation:o,errorMessage:t}=G();return R("パスワード再設定"),e.jsxs(n,{component:"form",onSubmit:l=>{a(l)},maxWidth:588,mx:"auto",children:[e.jsx(B,{children:"パスワード再設定"}),o.isPending&&e.jsx(n,{mb:2,display:"flex",justifyContent:"center",children:e.jsx(T,{})}),o.isSuccess?e.jsxs(e.Fragment,{children:[e.jsx(g,{mb:{sm:5,xs:4},textAlign:"center",fontSize:"14px",color:s.colorNew.normalLight,fontWeight:400,children:"パスワードの再設定が完了しました。新しいパスワードでログインしてください。"}),e.jsx(n,{textAlign:"center",children:e.jsx(b,{to:j.LOGIN,variant:"contained",sx:{height:40},endIcon:e.jsx(k,{size:v.SMALL,color:"inherit",children:e.jsx(A,{})}),children:"ログイン画面へ"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{mb:3,textAlign:"center",fontSize:"14px",color:s.colorNew.normalLight,fontWeight:400,children:"新しいパスワードを入力してください。"}),t&&e.jsx(n,{mb:2,children:e.jsx(C,{error:!0,children:t})}),e.jsx(n,{mb:{sm:2,xs:1},children:e.jsx(N,{name:"password",label:"新しいパスワード",errors:r.formState.errors,control:r.control,type:"password",maxLength:256,sx:{mb:3},placeholder:"********"})}),e.jsxs(n,{display:"flex",justifyContent:"center",gap:s.spacing(2),children:[e.jsx(b,{to:j.LOGIN,variant:"outlined",color:"inherit",disabled:o.isPending,sx:{minWidth:{sm:102,xs:120},height:40,borderRadius:"40px",borderColor:s.border.lightPrimary,color:s.colorNew.normalLight,"&:hover":{backgroundColor:"white"}},children:"キャンセル"}),e.jsx(W,{variant:"contained",type:"submit",disabled:o.isPending,sx:{minWidth:{sm:110,xs:177},height:40,borderRadius:"40px",backgroundColor:s.colorNew.colorPrimaryBg},children:"パスワードを再設定"})]})]})]})};export{O as default};

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.