import{u as x,a as A,s as I}from"./index.b5b1089a.js";/* empty css               */import"./App.b28509be.js";/* empty css               */import{C as N}from"./Cover.fc91526c.js";import{i as T,r,j as e,d as o}from"./react.6693569e.js";import{B as f,R as k,ap as s,an as b}from"./antd.ef9542dc.js";const D="_complementApproval_1nlsb_1",w="_board_1nlsb_8",S="_board__title_1nlsb_23",U="_backToLoin_1nlsb_34",L="_board__content__result_1nlsb_37",j="_title_1nlsb_37",G="_subTitle_1nlsb_41",R="_board__descriptions_1nlsb_45",z="_board__refill_1nlsb_50",a={complementApproval:D,board:w,board__title:S,backToLoin:U,board__content__result:L,title:j,subTitle:G,board__descriptions:R,board__refill:z};const O=()=>{const{T:l}=x(),d=T(),[n,h]=r.exports.useState({}),[p,F]=r.exports.useState(),[_,C]=r.exports.useState(),[m,E]=r.exports.useState(),[g,B]=r.exports.useState(""),[i,y]=r.exports.useState({});r.exports.useEffect(()=>{(async()=>{const u=await A.currentUserApi.getCheckComplementInfo(),v=await A.parametersApi.getUserTypes();u.waiting_approvals&&u.waiting_approvals.length?(u.waiting_approvals.map(t=>{t.status!="1"&&t.data.group&&t.data.group.type.key=="lab"&&C(t)}),u.waiting_approvals.map(t=>{t.status!="1"&&t.data.group&&t.data.group.type.key=="organization"&&F(t)}),u.waiting_approvals.map(t=>{t.status!="1"&&t.type=="create_group"&&E(t)})):(I.authStore.setCheckComplementInfo(!1),d.replace("/layout-chooser")),u.identities&&u.identities.length&&B(u.identities.find(t=>t.type=="database").identity),h(u),y(v)})()},[]);const c=()=>!!(n.waiting_approvals&&n.waiting_approvals.findIndex(u=>u.status=="0")!=-1);return e(N,{children:e("div",{className:a.complementApproval,children:o("div",{className:a.board,children:[e("div",{className:a.board__title,children:e(f,{className:a.backToLoin,type:"link",onClick:()=>d.push("/logout"),children:l("complementApproval.logout")})}),e("div",{className:a.board__content,children:e("div",{className:a.board__content__result,children:e(k,{status:c()?"success":"error",title:e("div",{className:a.title,children:c()?"\u8865\u5168\u4FE1\u606F\u63D0\u4EA4\u6210\u529F":"\u8865\u586B\u4FE1\u606F\u672A\u901A\u8FC7"}),subTitle:e("div",{className:a.subTitle,children:c()?"\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(s,{title:l("complementApproval.baseInfo.title"),children:[e(s.Item,{label:"\u7528\u6237\u540D",children:g||""}),e(s.Item,{label:"\u59D3\u540D",children:n.name||""}),e(s.Item,{label:"\u90AE\u7BB1",children:n.email||""}),e(s.Item,{label:"\u5B66\u5DE5\u53F7",children:n.ref_no||""}),e(s.Item,{label:"\u4EBA\u5458\u7C7B\u578B",children:i!=null&&i.length?i.filter(u=>u.key==n.type)[0].name:""})]}),o(s,{title:l("complementApproval.groupInfo.title"),children:[p&&o(s.Item,{label:"\u7EC4\u7EC7\u673A\u6784",children:[p.data.group.name||"","\xA0\xA0",p.status=="2"?e(b,{color:"#ff4d4f",children:"\u672A\u901A\u8FC7"}):""]}),_&&o(s.Item,{label:"\u8BFE\u9898\u7EC4",children:[_.data.group.name||"","\xA0\xA0",_.status=="2"?e(b,{color:"#ff4d4f",children:"\u672A\u901A\u8FC7"}):""]}),m&&o(s.Item,{label:"\u521B\u5EFA\u5206\u7EC4",children:[m.data.name||"","\xA0\xA0",m.status=="2"?e(b,{color:"#ff4d4f",children:"\u672A\u901A\u8FC7"}):""]})]})]}),!c()&&e("div",{className:a.board__refill,children:e(f,{type:"primary",onClick:()=>d.replace(`/complement-info?redirect_uri=${encodeURIComponent(window.location.href)}&stand=true`),children:l("complementApproval.refill")})})]})})})};export{O as default};
