import{u as x,a as I,s as y}from"./index.ab3d776b.js";/* empty css               */import"./App.4008d6a0.js";/* empty css               */import{C as N}from"./Cover.fc91526c.js";import{i as k,r as l,j as e,d as o,F as b}from"./react.6693569e.js";import{B as A,R as D,am as u,ak as f}from"./antd.e57bc55d.js";const T="_complementApproval_fsg4z_1",z="_board_fsg4z_8",w="_board__title_fsg4z_23",L="_backToLoin_fsg4z_34",S="_board__content__result_fsg4z_37",U="_title_fsg4z_37",G="_subTitle_fsg4z_41",j="_board__descriptions_fsg4z_45",R="_board__refill_fsg4z_50",a={complementApproval:T,board:z,board__title:w,backToLoin:L,board__content__result:S,title:U,subTitle:G,board__descriptions:j,board__refill:R};const O=()=>{const{T:d}=x(),_=k(),[c,h]=l.exports.useState({}),[r,C]=l.exports.useState(),[n,F]=l.exports.useState(),[i,g]=l.exports.useState(),[E,B]=l.exports.useState(""),[p,v]=l.exports.useState(!0);return l.exports.useEffect(()=>{(async()=>{const s=await I.currentUserApi.getCheckComplementInfo();if(s.waiting_approvals&&s.waiting_approvals.length?(s.waiting_approvals.map(t=>{t.status!="1"&&t.data.group&&t.data.group.type.key=="lab"&&F(t)}),s.waiting_approvals.map(t=>{t.status!="1"&&t.data.group&&t.data.group.type.key=="organization"&&C(t)}),s.waiting_approvals.map(t=>{t.status!="1"&&t.type=="create_group"&&g(t)})):(y.authStore.setCheckComplementInfo(!1),_.replace("/layout-chooser")),s.identities&&s.identities.length){const t=s.identities.find(m=>m.type=="database");t&&B(t.identity)}h(s)})()},[]),l.exports.useEffect(()=>{const s=r&&r.status==="2",t=n&&n.status==="2",m=i&&i.status==="2";v(!(s||t||m))},[r,n,i]),e(N,{children:e("div",{className:a.complementApproval,children:o("div",{className:a.board,children:[e("div",{className:a.board__title,children:e(A,{className:a.backToLoin,type:"link",onClick:()=>_.push("/logout"),children:d("complementApproval.logout")})}),e("div",{className:a.board__content,children:e("div",{className:a.board__content__result,children:e(D,{status:p?"success":"error",title:e("div",{className:a.title,children:p?"\u8865\u5168\u4FE1\u606F\u63D0\u4EA4\u6210\u529F":"\u8865\u586B\u4FE1\u606F\u672A\u901A\u8FC7"}),subTitle:e("div",{className:a.subTitle,children:p?"\u60A8\u63D0\u4EA4\u7684\u8865\u5168\u4FE1\u606F\u8FD8\u5728\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\u6216\u8005\u8054\u7CFB\u5BF9\u5E94\u7684\u7BA1\u7406\u5458":"\u60A8\u63D0\u4EA4\u7684\u5EFA\u7EC4/\u5165\u7EC4\u7533\u8BF7\u7ECF\u5BA1\u6279\u672A\u901A\u8FC7\uFF0C\u60A8\u53EF\u4EE5\u91CD\u65B0\u63D0\u4EA4\u7533\u8BF7\uFF0C\u5982\u679C\u6709\u95EE\u9898\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002"})})})}),o("div",{className:a.board__descriptions,children:[o(u,{title:d("complementApproval.baseInfo.title"),children:[e(u.Item,{label:"\u7528\u6237\u540D",children:E||""}),e(u.Item,{label:"\u59D3\u540D",children:c.name||""}),e(u.Item,{label:"\u90AE\u7BB1",children:c.email||""}),e(u.Item,{label:"\u5B66\u5DE5\u53F7",children:c.ref_no||""}),e(u.Item,{label:"\u4EBA\u5458\u7C7B\u578B",children:c.roles&&c.roles.length?c.roles[0].name:""})]}),o(u,{title:d("complementApproval.groupInfo.title"),children:[r&&o(b,{children:[o(u.Item,{label:"\u7EC4\u7EC7\u673A\u6784",children:[r.data.group.name||"","\xA0\xA0",r.status=="2"?e(f,{color:"#ff4d4f",children:"\u672A\u901A\u8FC7"}):""]}),r.status=="2"&&r.note&&e(u.Item,{span:2,label:"\u5907\u6CE8",children:r.note})]}),n&&o(b,{children:[o(u.Item,{label:"\u8BFE\u9898\u7EC4",children:[n.data.group.name||"","\xA0\xA0",n.status=="2"?e(f,{color:"#ff4d4f",children:"\u672A\u901A\u8FC7"}):""]}),n.status=="2"&&n.note&&e(u.Item,{span:2,label:"\u5907\u6CE8",children:n.note})]}),i&&o(b,{children:[o(u.Item,{label:"\u521B\u5EFA\u5206\u7EC4",children:[i.data.name||"","\xA0\xA0",i.status=="2"?e(f,{color:"#ff4d4f",children:"\u672A\u901A\u8FC7"}):""]}),i.status=="2"&&i.note&&e(u.Item,{span:2,label:"\u5907\u6CE8",children:i.note})]})]})]}),!p&&e("div",{className:a.board__refill,children:e(A,{type:"primary",onClick:()=>_.replace(`/complement-info?redirect_uri=${encodeURIComponent(window.location.href)}&stand=true`),children:d("complementApproval.refill")})})]})})})};export{O as default};
