PageSourceSearch

https://metabuilding.com/static/js/536.e1df6b69.chunk.js

js metabuilding.com collected 2026-10-03 19:40:54 UTC 71,441 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkclusterly_ng_frontend=self.webpackChunkclusterly_ng_frontend||[]).push([[536],{8314:(e,s,i)=>{i.d(s,{HU:()=>c,IQ:()=>v,S1:()=>m,YU:()=>p,jf:()=>u,mZ:()=>o,pT:()=>d,xC:()=>r});var t=i(1387),a=i(2599),l=i(5590),n=i(6417);function o(e){var s=document.createElement("a");s.target="_blank",s.href=e.documentURL,s.setAttribute("download",e.documentName),s.click()}const r=e=>{switch(e){case"Aluminum, Steel & Iron":return"/assets/img/sidebaricon/1.png";case"Batteries":return"/assets/img/sidebaricon/2.png";case"Chemicals":return"/assets/img/sidebaricon/3.png";case"Construction":return"/assets/img/sidebaricon/4.png";case"Detergents":return"/assets/img/sidebaricon/5.png";case"Digital Industry":case"Digital industry":return"/assets/img/sidebaricon/6.png";case"Electrical and electronic equipment":return"/assets/img/sidebaricon/7.png";case"Footwear":return"/assets/img/sidebaricon/8.png";case"Furniture":return"/assets/img/sidebaricon/9.png";case"Manufacturing":return"/assets/img/sidebaricon/10.png";case"Paints & lubricants":return"/assets/img/sidebaricon/11.png";case"Personal care products":return"/assets/img/sidebaricon/12.png";case"Plastics & Composites":return"/assets/img/sidebaricon/13.png";case"Safety/Security/Surveillance":return"/assets/img/sidebaricon/14.png";case"Textiles":return"/assets/img/sidebaricon/17.png";case"Toys":return"/assets/img/sidebaricon/15.png";case"Tyres":return"/assets/img/sidebaricon/16.png";case"Packaging":return"/assets/img/sidebaricon/18.png"}},d=["bold","color","font","italic","link","size","strike","underline","header","indent","list","align","direction"],c=()=>(0,n.jsx)(t.Ix,{autoClose:3e3,position:t.Am.POSITION.TOP_CENTER,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,theme:"colored",pauseOnFocusLoss:!0,draggable:!1,pauseOnHover:!0}),u=e=>{if(void 0!==e&&null!==e){const s=new Date(e);return(0,a.WU)(s,"dd/MM/yyyy")}},m=e=>{if(void 0!==e&&null!==e){const s=new Date(e);return(0,a.WU)(s,"dd/MM/yyyy HH:mm")}},v=(e,s,i)=>{const a=document.createElement("div");a.innerHTML=e;const o=a.textContent||a.innerText||"";if(o.length>s){switch(i){case"offerDesc":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryOfferDesc"}));break;case"desc":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryDesc"}));break;case"orgPostContent":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryPostDesc"}));break;case"clusterCallDesc":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryCallDesc"}));break;case"ecosystemDesc":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryEcosystemDesc"}));break;case"clusterNewsContent":case"ecosystemNewsContent":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryNewsDesc"}));break;case"orgDesc":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryOrganisationAboutDesc"}));break;case"orgVision":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryOrgVision"}));break;case"orgExpertise":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryOrgExpertise"}));break;case"postContent":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryContentSize"}));break;case"WorkingGroupDesc":t.Am.warning((0,n.jsx)(l.cC,{i18nKey:"warnMandatoryDescv1000"}))}return null}return o},p=(e,s)=>{if(-1!=e.findIndex((e=>"Other"==e[s]))){const i=e[e.findIndex((e=>"Other"==e[s]))];e.splice(e.findIndex((e=>"Other"==e[s])),1),e.push(i)}return e}},536:(e,s,i)=>{i.d(s,{Z:()=>W});var t=i(7313),a=i(5590),l=i(9116),n=i(2135),o=i(2395),r=i(8352),d=i(7114),c=i.n(d),u=i(6814),m=i(9383),v=i(1465),p=i(801),g=i(6417);const h=(0,a.Zh)()((e=>{let{data:s,t:i}=e;const[a,l]=(0,m.iP)(),n=(0,t.useRef)(),[o,r]=(0,t.useState)([]),[d,c]=(0,t.useState)(null);(0,t.useEffect)((()=>{n.current.d3Force("charge").strength(-40),n.current.d3Force("link").distance(50)}),[]);const u=(0,t.useMemo)((()=>{var e,i,t;const a=Object.fromEntries(null===s||void 0===s||null===(e=s.nodes)||void 0===e?void 0:e.map((e=>[null===e||void 0===e?void 0:e.id,e])));return null===s||void 0===s||null===(i=s.nodes)||void 0===i||i.forEach((e=>{e.collapsed="0"!==e.id,e.childLinks=[]})),null===s||void 0===s||null===(t=s.links)||void 0===t||t.forEach((e=>{var s;return null===(s=a[e.source])||void 0===s?void 0:s.childLinks.push(e)})),a}),[]),h=(0,t.useCallback)((()=>{const e=[],s=[],i=function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;t&&!a.has(t.id)&&(a.add(t.id),e.push(t),t.childLinks&&(t.collapsed||(s.push(...t.childLinks),t.childLinks.forEach((e=>{const s="object"===typeof e.target?e.target.id:e.target,t=u[s];i(t,a)})))))};return i(u[0]),{nodes:e,links:s}}),[u]),[x,j]=(0,t.useState)(h()),b=(0,t.useCallback)((e=>{if("0"!==(null===e||void 0===e?void 0:e.id)){if(e.isClusteredNode)if(null!==e&&void 0!==e&&e.collapsed)o.push(e),e.color="#507f7f";else{const s=null===o||void 0===o?void 0:o.indexOf(e);s>-1&&o.splice(s,1),e.color="#89a4a4"}e.collapsed=!e.collapsed,j(h())}else{if("cluster"===(null===e||void 0===e?void 0:e.type))if(null!==e&&void 0!==e&&e.collapsed)o.push(e),e.color="#507f7f";else{const s=o.indexOf(e);s>-1&&o.splice(s,1),e.color="#89a4a4"}e.collapsed=!e.collapsed,j(h())}}),[h]),y=(0,t.useCallback)(((e,s,i)=>{let t=10;12===e.val?t=9.5:10===e.val?t=8.5:8===e.val?t=7.5:3===e.val&&(t=4.5),s.beginPath(),s.arc(e.x,e.y,1.3*t,0,2*Math.PI,!1);let a=12/i;3===e.val&&(a=8/i),"clusterly"===e.type?(e.initialColor="#5F9FD2",s.fillStyle="#5F9FD2"):"ecosystem"===e.type?(e.initialColor="#89A4A4",s.fillStyle="#89A4A4"):"cluster"===e.type?"N"===e.clusterType?(e.initialColor="#ABA041",s.fillStyle="#ABA041"):"M"===e.clusterType?(e.initialColor="#F8D25A",s.fillStyle="#F8D25A"):"C"===e.clusterType&&(e.initialColor="#D0973C",s.fillStyle="#D0973C"):"organisation"===e.type&&(e.initialColor="#A3C084",s.fillStyle="#A3C084"),s.fill();const l=e.name;s.font="".concat(a,"px Sans-Serif"),s.textAlign="center",s.textBaseline="middle",s.fillStyle="black",s.fillText(l,e.x,e.y)}),[]);return(0,g.jsx)(g.Fragment,{children:s&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"flex",children:[(0,g.jsx)("div",{children:(0,g.jsx)(p.Z,{width:a/100*80,height:l,backgroundColor:"#FFFFFF",ref:n,onNodeClick:b,onNodeHover:(e,s
1)=>{null!==e&&(c(e),e.color="#507f7f"),null!==s&&(o.includes(s)||(s.color="#a6cee3"))},graphData:x,autoPauseRedraw:!1,nodeAutoColorBy:"group",nodeCanvasObjectMode:()=>"after",minZoom:1,maxZoom:10,nodeCanvasObject:y})}),(0,g.jsx)(v.i,{layout:"vertical"}),(0,g.jsxs)("div",{children:[(0,g.jsx)("div",{className:"mb-1 text-xl graph-title",children:i("networkGraph")}),d&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"mb-4 text-xl",children:(0,g.jsx)("i",{className:"pi pi-circle-fill",style:{fontSize:"1.9em",color:null===d||void 0===d?void 0:d.initialColor}})}),(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-tags platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("type"),":"]}),d&&"cluster"===(null===d||void 0===d?void 0:d.type)&&"M"===(null===d||void 0===d?void 0:d.clusterType)&&(0,g.jsx)("div",{className:"mb-4 font-bold text-xl",children:i("metacluster")}),d&&"cluster"===(null===d||void 0===d?void 0:d.type)&&"N"===(null===d||void 0===d?void 0:d.clusterType)&&(0,g.jsx)("div",{className:"mb-4 font-bold text-xl",children:i("cluster")}),d&&"cluster"===(null===d||void 0===d?void 0:d.type)&&"C"===(null===d||void 0===d?void 0:d.clusterType)&&(0,g.jsx)("div",{className:"mb-4 font-bold text-xl",children:i("countrycluster")}),d&&"cluster"!==(null===d||void 0===d?void 0:d.type)&&(0,g.jsx)("div",{className:"mb-4 font-bold text-xl",children:i(null===d||void 0===d?void 0:d.type)}),(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-info-circle platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("name"),":"]}),(0,g.jsx)("div",{className:"mb-4 font-bold text-xl",children:null===d||void 0===d?void 0:d.name}),"cluster"===(null===d||void 0===d?void 0:d.type)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-flag platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("country"),":"]}),(0,g.jsx)("div",{className:"mb-4 font-bold text-xl",children:null===d||void 0===d?void 0:d.country})]}),"organisation"===(null===d||void 0===d?void 0:d.type)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-flag platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("country"),":"]}),(0,g.jsx)("div",{className:"mb-4 font-bold text-xl",children:null===d||void 0===d?void 0:d.country}),(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-flag platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("organisationType"),":"]}),(0,g.jsx)("div",{className:"mb-4 font-bold text-xl",children:i("orgType"+(null===d||void 0===d?void 0:d.orgType))})]}),"clusterly"===(null===d||void 0===d?void 0:d.type)&&(null===d||void 0===d?void 0:d.totalEcosystem)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-sitemap platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("totalEcosystem"),":"]}),(0,g.jsx)("div",{className:"mb-4 font-bold text-2xl",children:null===d||void 0===d?void 0:d.totalEcosystem})]}),("clusterly"===(null===d||void 0===d?void 0:d.type)||"ecosystem"===(null===d||void 0===d?void 0:d.type))&&null!==(null===d||void 0===d?void 0:d.totalCluster)&&!(null!==d&&void 0!==d&&d.control)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-share-alt platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("totalCluster"),":"]}),(0,g.jsx)("div",{className:"mb-4 font-bold text-2xl",children:d.totalCluster})]}),("clusterly"===(null===d||void 0===d?void 0:d.type)||"ecosystem"===(null===d||void 0===d?void 0:d.type)||"cluster"===(null===d||void 0===d?void 0:d.type))&&null!==(null===d||void 0===d?void 0:d.totalOrganisation)&&!(null!==d&&void 0!==d&&d.control)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-building platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("totalOrganisation"),":"]}),(0,g.jsx)("div",{className:"mb-4 font-bold text-2xl",children:null===d||void 0===d?void 0:d.totalOrganisation})]}),null!==(null===d||void 0===d?void 0:d.totalUser)&&!(null!==d&&void 0!==d&&d.control)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsx)("i",{className:"pi pi-user platformColor",style:{fontSize:"1.25em",paddingRight:"5px"}})," ",i("totalUser"),":"]}),(0,g.jsx)("div",{className:"mb-4 font-bold text-2xl",children:null===d||void 0===d?void 0:d.totalUser})]})]})]})]})})})}));var x=i(9513),j=i(5861),b=i(3479),y=i(8314),f=i(3499),N=i(1812),k=i(9523),C=i(390),w=i(1387),S=i(1742),L=i(4892),T=i(9794),A=i(159),F=i(8649),U=i(5537);const O=(0,a.Zh)()((e=>{let{t:s,position:l,visible:n,onHide:d,onReload:u,sideBarData:m,cardType:v,wgType:p}=e;const[h,x]=(0,t.useState)([]),[j,b]=(0,t.useState)([]),[y,O]=(0,t.useState)([]),[P,M]=(0,t.useState)([]),[B,E]=(0,t.useState)([]),[z,D]=(0,t.useState)([]),[R,I]=(0,t.useState)(null),[Z,G]=(0,t.useState)(!1),[V,W]=(0,t.useState)(!1),[q,H]=(0,t.useState)(null),[J,K]=(0,t.useState)(!1),[_,Q]=(0,t.useState)(!1),[Y,X]=(0,t.useState)(!1),[$,ee]=(0,t.useState)(null),[se,ie]=(0,t.useState)(""),te=(0,U.v9)((e=>e.auth.user)),ae=[{value:1,icon:"pi pi-lock-open"},{value:2,icon:"pi pi-lock"}],le=[{value:1,icon:"pi pi-arrow-up-right"}],ne=()=>{X(!0),G(!1),x([]),I(null),r.Z.getOrganisationUsers(null===m||void 0===m?void 0:m.id).then((e=>{x(e.data.userList),X(!1)}),(e=>{const i=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1),c().fire({title:s(i),icon:"error",timer:2e3,showConfirmButton:!1})})),ce()},oe=()=>{X(!0),G(!1),b([]),O([]),D([]),I(null),H(null),r.Z.getClusterUsers(null===m||void 0===m?void 0:m.id).then((e=>{b(e.data.adminUserList),O(e.data.userList),r.Z.getAllOrganisationUsersInEcosystemForClusterAdmin(m.id).then((e=>{D(e.data.adminUserList),X(!1)}),(e=>{const i=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1),c().fire({title:s(i),icon:"error",timer:2e3,showConfirmButton:!1})}))}),(e=>{const i=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1),c().fire({title:s(i),icon:"error",timer:2e3,showConfirmButton:!1})})),ce()},re=()=>{X(!0),G(!1),M([]),E([]),D([]),I(null),H(null),r.Z.getWorkingGroupUsers(null===m||void 0===m?void 0:m.id).then((e=>{M(e.data.userList),r.Z.getAllUsersInWorkingGroupForWGAdmin(m.id).then((e=>{D(e.data.adminUserList),X(!1)}),(e=>{e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1)}))}),(e=>{e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1)})),ce()},de=()=>{X(!0),G(!1),E([]),r.Z.getWorkingGroupJoinedUsers(null===m||void 0===m?void 0:m.id).then((e=>{E(e.data.userList)}),(e=>{X(!1);const i=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1),c().fire({title:s(i),icon:"error",timer:2e3,showConfirmButton:!1})}))},ce=()=>{ee(i.g={value:null,matchMode:S.a6.CONTAINS}),ie("")},ue=e=>{let s=[...h];const i=h.indexOf(e);if(i>-1&&(s.splice(i,1),x(s),G(!0)),"workingGroup"===v){let s=[...B];const i=B.indexOf(e);i>-1&&(s.splice(i,1),E(s),G(!0))}},me=e=>{let s=[...j];const i=j.indexOf(e);if(i>-1&&(s.splice(i,1),b(s),G(!0)),"workingGroup"===v){let s=[...P];const i=P.indexOf(e);i>-1&&(s.splice(i,1),M(s),G(!0))}},ve=()=>{if(null!=R){let e=[...j],s=-1;for(let i=0;i<e.length;i++)if(e[i].id==R.id){s=0;break}if(s<0&&(e.push(R),b(e),G(!0),H(null),I(null)),"workingGroup"===v){let e=[...P],s=-1;for(let i=0;i<e.length;i++)if(e[i].id===R.id){s=0;break}s<0&&(e.push(R),M(e),G(!0),H(null),I(null))}}}
1,pe=e=>{setTimeout((()=>{let s;s=e.query.trim().length?z.filter((s=>s.firstName.toLowerCase().concat(" ",s.lastName.toLowerCase()).startsWith(e.query.toLowerCase()))):[...z],H(s)}),250)},ge=()=>{X(!0),K(!1),r.Z.updateClusterUsers(j,null===m||void 0===m?void 0:m.id.toString()).then((e=>{X(!1),oe()}),(e=>{const i=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1),c().fire({title:s(i),icon:"error",timer:2e3,showConfirmButton:!1})}))},he=()=>{Z||d()},xe=()=>{for(let e=0;e<h.length;e++)if(null==h[e].traUserTypeStatus||""===h[e].traUserTypeStatus||0===h[e].traUserTypeStatus)return X(!1),void w.Am.warning((0,g.jsx)(a.cC,{i18nKey:"warnMandatoryUser"}));X(!0),W(!1),r.Z.updateOrganisationUsers(h,m.id.toString()).then((e=>{ne(),X(!1),c().fire({title:s("User list updated"),icon:"success",timer:2e3,showConfirmButton:!1})}),(e=>{const i=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1),c().fire({title:s(i),icon:"error",timer:2e3,showConfirmButton:!1})}))},je=()=>{},be=()=>{X(!0),Q(!1),r.Z.updateWorkingGroupUsers(P,m.id.toString()).then((e=>{P.forEach((e=>{e.username===te.username&&re()})),X(!1),d(),u()}),(e=>{const i=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1),d(),c().fire({title:s(i),icon:"error",timer:2e3,showConfirmButton:!1})}))},ye=()=>{X(!0),Q(!1),r.Z.updateWorkingGroupJoinedUsers(B,m.id.toString()).then((e=>{de(),X(!1)}),(e=>{const i=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();X(!1),c().fire({title:s(i),icon:"error",timer:2e3,showConfirmButton:!1})}))};(0,t.useEffect)((()=>{null!==m&&void 0!==m&&m.id&&("organisation"===v&&ne(),"cluster"===v&&oe(),"workingGroup"===v&&("wgUsers"===p?de():re()))}),[m]);const fe=e=>(0,g.jsxs)(g.Fragment,{children:[e.firstName," ",e.lastName," - ",e.username]}),Ne=e=>(0,g.jsx)("div",{className:"w-full",children:((0,C.u6)()||(0,C.NU)()&&1!==e.traUserApprovalStatus)&&(0,g.jsxs)("div",{className:"item-wrapper",children:[(0,g.jsx)("div",{className:"logo-container",children:(0,g.jsx)(A.q,{image:""!==e.avatarLink?e.avatarLink:"/assets/img/cameraIcon.png",size:"xlarge",shape:"circle"})}),(0,g.jsx)("div",{className:"content-container",children:(0,g.jsxs)("div",{className:"flex flex-column align-items-start gap-3",children:[(0,g.jsxs)("div",{className:"font-bold",children:[e.firstName," ",e.lastName]}),(0,g.jsx)("div",{children:e.username}),(0,g.jsxs)("div",{className:"flex align-items-center gap-3",children:[(0,g.jsx)("label",{children:(0,g.jsx)("i",{children:1===e.traUserApprovalStatus?"Waiting approval":"Approved"})}),1===e.traUserApprovalStatus&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(T.x,{value:e.traUserApprovalStatus,options:le,onChange:s=>((e,s)=>{let i=[...h];const t=h.indexOf(e);t>-1&&(i[t].traUserApprovalStatus=2,x(i),G(!0))})(e,s.value),optionValue:"value"}),e.traUserApprovalStatus&&"Approve"]})]}),(0,g.jsxs)("div",{className:"flex align-items-center gap-3",children:[(0,g.jsx)(f.z,{icon:"pi pi-trash icon-red",tooltip:s("removeFromList"),onClick:s=>{ue(e)},className:"p-button-rounded p-button-text zindex10",style:{width:"20px",height:"20px"},"aria-label":"Link",id:"buttonFontWeight"}),"|"," ",(0,g.jsx)(T.x,{value:e.traUserTypeStatus,options:ae,onChange:s=>((e,s)=>{let i=[...h];const t=h.indexOf(e);t>-1&&(i[t].traUserTypeStatus=s,x(i),G(!0))})(e,s.value),optionValue:"value"}),e.traUserTypeStatus&&(0,g.jsx)("label",{children:1===e.traUserTypeStatus?"Normal user":"Admin user"})]})]})})]})}),ke=e=>(0,g.jsx)("div",{className:"col-12",children:(0,g.jsxs)("div",{className:"flex flex-column xl:flex-row xl:align-items-start p-2 gap-4",children:[(0,g.jsx)(A.q,{image:""!==e.avatarLink?e.avatarLink:"/assets/img/cameraIcon.png",size:"xlarge",shape:"circle",style:{width:"90px",height:"90px"}}),(0,g.jsx)("div",{className:"flex flex-column sm:flex-row justify-content-between align-items-center xl:align-items-start flex-1 gap-4",children:(0,g.jsxs)("div",{className:"flex flex-column align-items-center sm:align-items-start gap-3",children:[(0,g.jsxs)("div",{className:"font-bold",children:[e.firstName," ",e.lastName]}),(0,g.jsx)("div",{children:e.username}),(0,g.jsx)("div",{className:"flex align-items-center gap-3",children:(0,g.jsx)(f.z,{icon:"pi pi-trash icon-red",tooltip:s("removeFromAdminList"),onClick:s=>{me(e)}
1,className:"p-button-rounded p-button-text zindex10",style:{width:"20px",height:"20px"},"aria-label":"Link",id:"buttonFontWeight"})})]})})]})}),Ce=e=>(0,g.jsx)("div",{className:"col-12",children:(0,g.jsxs)("div",{className:"flex flex-column xl:flex-row xl:align-items-start p-2 gap-4",children:[(0,g.jsx)(A.q,{image:""!==e.avatarLink?e.avatarLink:"/assets/img/cameraIcon.png",size:"xlarge",shape:"circle",style:{width:"90px",height:"90px"}}),(0,g.jsx)("div",{className:"flex flex-column sm:flex-row justify-content-between align-items-center xl:align-items-start flex-1 gap-4",children:(0,g.jsxs)("div",{className:"flex flex-column align-items-center sm:align-items-start gap-3",children:[(0,g.jsxs)("div",{className:"font-bold",children:[e.firstName," ",e.lastName]}),(0,g.jsx)("div",{children:e.username}),(0,g.jsx)("div",{className:"flex align-items-center gap-3",children:(0,g.jsx)(f.z,{icon:"pi pi-trash icon-red",tooltip:s("removeFromAdminList"),onClick:s=>{me(e)},className:"p-button-rounded p-button-text zindex10",style:{width:"20px",height:"20px"},"aria-label":"Link",disabled:(null===P||void 0===P?void 0:P.length)<2})})]})})]})}),we=e=>(0,g.jsx)("div",{className:"col-12",children:(0,g.jsxs)("div",{className:"flex flex-column xl:flex-row xl:align-items-start p-2 gap-4",children:[(0,g.jsx)(A.q,{image:""!==e.avatarLink?e.avatarLink:"/assets/img/cameraIcon.png",size:"xlarge",shape:"circle",style:{width:"90px",height:"90px"}}),(0,g.jsx)("div",{className:"flex flex-column sm:flex-row justify-content-between align-items-center xl:align-items-start flex-1 gap-4",children:(0,g.jsxs)("div",{className:"flex flex-column align-items-center sm:align-items-start gap-3",children:[(0,g.jsxs)("div",{className:"font-bold",children:[e.firstName," ",e.lastName]}),(0,g.jsx)("div",{children:e.username}),(0,g.jsx)("div",{className:"flex align-items-center gap-3",children:(0,g.jsx)(f.z,{icon:"pi pi-trash icon-red",tooltip:s("removeFromList"),onClick:s=>{ue(e)},className:"p-button-rounded p-button-text zindex10",style:{width:"20px",height:"20px"},"aria-label":"Link"})})]})})]})});return(()=>{switch(v){case"organisation":return(0,g.jsx)(k.Y,{position:l,visible:n,onHide:he,children:(0,g.jsxs)(o.th,{children:[(0,g.jsx)("div",{className:"card mb-3",children:(0,g.jsx)(L.VO,{header:m.name+" - "+s("organisationUsers"),value:h,itemTemplate:Ne,loading:Y,paginator:!0,emptyMessage:s("noUsersFound"),rows:2})}),(0,g.jsxs)("div",{children:[(0,g.jsx)(f.z,{label:s("cancel"),className:"p-button-sm p-button-warning",onClick:()=>{ne(),d()}}),"\xa0",(0,g.jsx)(f.z,{disabled:!Z,onClick:()=>W(!0),label:s("save"),className:"p-button-sm p-button-mb"})]}),(0,g.jsx)(N.Q,{visible:V,onHide:()=>W(!1),message:s("confirmMessage"),accept:xe,reject:je,acceptLabel:s("yes"),rejectLabel:s("no")})]})});case"cluster":return(0,g.jsx)(k.Y,{position:l,visible:n,onHide:he,children:(0,g.jsxs)(o.th,{children:[(0,g.jsx)("div",{className:"card mb-3",children:(0,g.jsx)(L.VO,{header:m.name+" - "+s("clusterAdmins"),value:j,itemTemplate:ke,paginator:!0,emptyMessage:s("noUsersFound"),rows:2})}),(0,g.jsxs)("div",{className:"col-12 mb-4",children:[(0,g.jsxs)("div",{className:"mb-3",children:[s("clusterUserTxt"),":"]}),(0,g.jsxs)("div",{className:"grid",children:[(0,g.jsx)("div",{style:{paddingRight:"15px"},children:(0,g.jsx)(F.Q,{value:R,forceSelection:!0,minLength:3,suggestions:q,completeMethod:pe,itemTemplate:fe,field:"username",onChange:e=>I(e.value),"aria-label":s("users"),dropdownAriaLabel:s("selectUser")})}),(0,g.jsx)(f.z,{onClick:()=>{ve()},label:s("userAddAsAdmin"),className:"p-button-sm p-button-mb",id:"buttonFontWeight"})]})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)(f.z,{label:s("cancel"),className:"p-button-sm p-button-mb",onClick:()=>{oe(),d()},id:"buttonFontWeight"}),"\xa0",(0,g.jsx)(f.z,{disabled:!Z,onClick:()=>K(!0),label:s("save"),className:"p-button-sm p-button-warning",id:"buttonFontWeight"})]}),(0,g.jsx)(N.Q,{visible:J,onHide:()=>K(!1),message:s("confirmMessage"),accept:ge,reject:je,acceptLabel:s("yes"),rejectLabel:s("no")})]})});case"workingGroup":return"wgUsers"===p?(0,g.jsx)(k.Y,{position:l,visible:n,onHide:he,children:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"card mb-3",children:(0,g.jsx)(L.VO,{header:m.name+" - "+s("workingGroupUsers"),value:B,itemTemplate:we,paginator:!0,emptyMessage:s("noUsersFound"),rows:2})}),(0,g.jsxs)("div",{children:[(0,g.jsx)(f.z,{label:s("cancel"),className:"p-button-sm p-button-warning",onClick:()=>{de(),d()},id:"buttonFontWeight"}),"\xa0",(0,g.jsx)(f.z,{disabled:!Z,onClick:()=>Q(!0),label:s("save"),className:"p-button-sm p-button-mb",id:"buttonFontWeight"})]}),(0,g.jsx)(N.Q,{visible:_,onHide:()=>Q(!1),message:s("confirmMessage"),accept:ye,reject:je,acceptLabel:s("yes"),rejectLabel:s("no")})]})}):(0,g.jsx)(k.Y,{position:l,visible:n,onHide:he,children:(0,g.jsxs)(o.th,{children:[(0,g.jsx)("div",{className:"card mb-3",children:(0,g.jsx)(L.VO,{header:m.name+" - "+s("workingGroupAdmins"),value:P,itemTemplate:Ce,paginator:!0,emptyMessage:s("noUsersFound"),rows:2})}),(0,g.jsxs)("div",{className:"col-12 mb-4",children:[(0,g.jsxs)("div",{className:"mb-3",children:[s("clusterUserTxt"),":"]}),(0,g.jsxs)("div",{className:"grid",children:[(0,g.jsx)("div",{style:{paddingRight:"15px"},children:(0,g.jsx)(F.Q,{value:R,forceSelection:!0,minLength:3,suggestions:q,completeMethod:pe,itemTemplate:fe,field:"username",onChange:e=>I(e.value),"aria-label":s("users"),dropdownAriaLabel:s("selectUser")})}),(0,g.jsx)(f.z,{onClick:()=>{ve()},label:s("userAddAsAdmin"),className:"p-button-sm p-button-mb",id:"buttonFontWeight"})]})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)(f.z,{label:s("cancel"),className:"p-button-sm p-button-warning",onClick:()=>{re(),d()},id:"buttonFontWeight"}),"\xa0",(0,g.jsx)(f.z,{disabled:!Z,onClick:()=>Q(!0),label:s("save"),className:"p-button-sm p-button-mb",id:"buttonFontWeight"})]}),(0,g.jsx)(N.Q,{visible:_,onHide:()=>Q(!1),message:s("confirmMessage"),accept:be,reject:je,acceptLabel:s("yes"),rejectLabel:s("no")})]})})}})()}));var P=i(3346),M=i(1127),B=i(7220),E=i(9094),z=i(2371),D=i(7922),R=i(1237),I=i.n(R),Z=i(9267),G=i(3140);const V=(0,a.Zh)()((e=>
1{var s,i,a,l,n,d,c,u,m,v,p,h,y,f,N,k,C;let{t:w,eid:S,ecosystemName:L}=e;const T=(0,t.useMemo)((()=>{const e=new Date,s=new Date(e.getFullYear(),0,1),i=e=>e.toLocaleDateString("tr-TR");return"".concat(i(s)," - ").concat(i(e))}),[]),[A,F]=(0,t.useState)(0),[U,O]=(0,t.useState)(0),[P,M]=(0,t.useState)(0),[B,E]=(0,t.useState)(!1),[R,V]=(0,t.useState)(null),[W,q]=(0,t.useState)([]),[H,J]=(0,t.useState)(null),[K,_]=(0,t.useState)(null),[Q,Y]=(0,t.useState)({country:!1,type:!1,status:!1,info:!1,clusterType:!1,interaction:!1}),X={0:"country",1:"type",2:"status",3:"info",4:"interaction"},$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ee=e=>""===e.key?w("undefined"):w("orgType"+e.key),se=e=>""===e.key?w("undefined"):w("orgInfo"+e.key),ie=e=>""===e.key?w("undefined"):w("clusterType"+e.key),te={labels:$,datasets:[{label:"Users",backgroundColor:"#3DB7E7",data:null===H||void 0===H||null===(s=H.monthlyUsers)||void 0===s?void 0:s.map((e=>e))}]},ae={labels:$,datasets:[{label:"Organisations",backgroundColor:"#3DB7E7",data:null===H||void 0===H||null===(i=H.monthlyOrganisation)||void 0===i?void 0:i.map((e=>e))}]},le={labels:$,datasets:[{label:"Clusters",backgroundColor:"#3DB7E7",data:null===H||void 0===H||null===(a=H.monthlyCluster)||void 0===a?void 0:a.map((e=>e))}]},ne={labels:null===W||void 0===W||null===(l=W.countryList)||void 0===l?void 0:l.map((e=>null===e||void 0===e?void 0:e.key)),datasets:[{label:"Countries",backgroundColor:"#3DB7E7",data:null===W||void 0===W||null===(n=W.countryList)||void 0===n?void 0:n.map((e=>null===e||void 0===e?void 0:e.numVal))}]},oe={labels:null===W||void 0===W||null===(d=W.orgTypeList)||void 0===d?void 0:d.map((e=>ee(e))),datasets:[{label:"Types",backgroundColor:"#3DB7E7",data:null===W||void 0===W||null===(c=W.orgTypeList)||void 0===c?void 0:c.map((e=>null===e||void 0===e?void 0:e.numVal))}]},re={labels:null===W||void 0===W||null===(u=W.orgStatusList)||void 0===u?void 0:u.map((e=>ee(e))),datasets:[{label:"Status",backgroundColor:"#3DB7E7",data:null===W||void 0===W||null===(m=W.orgStatusList)||void 0===m?void 0:m.map((e=>null===e||void 0===e?void 0:e.numVal))}]},de={labels:null===W||void 0===W||null===(v=W.orgInfoList)||void 0===v?void 0:v.map((e=>se(e))),datasets:[{label:"Ownership",backgroundColor:"#3DB7E7",data:null===W||void 0===W||null===(p=W.orgInfoList)||void 0===p?void 0:p.map((e=>null===e||void 0===e?void 0:e.numVal))}]},ce={labels:null===W||void 0===W||null===(h=W.clusterTypeList)||void 0===h?void 0:h.map((e=>ie(e))),datasets:[{label:"Types",backgroundColor:"#3DB7E7",data:null===W||void 0===W||null===(y=W.clusterTypeList)||void 0===y?void 0:y.map((e=>null===e||void 0===e?void 0:e.numVal))}]},ue={labels:null===W||void 0===W||null===(f=W.messagesSentToOrganisations)||void 0===f?void 0:f.map((e=>(e=>""===e.key?w("undefined"):e.key)(e))),datasets:[{label:"Service Processes",backgroundColor:"#3DB7E7",data:null===W||void 0===W||null===(N=W.messagesSentToOrganisations)||void 0===N?void 0:N.map((e=>null===e||void 0===e?void 0:e.numVal))}]},me=["#C8838E","#7C9BBE","#E1CDAF","#F4A259","#8E7DBE"],ve={};null===W||void 0===W||null===(k=W.testProcessByRequestType)||void 0===k||k.forEach((e=>{const s=((null===e||void 0===e?void 0:e.key)||"Unknown").toUpperCase();ve[s]||(ve[s]=0),ve[s]+=(null===e||void 0===e?void 0:e.numVal)||0}));const pe=Object.entries(ve).map((e=>{let[s,i]=e;return{key:s,numVal:i}})),ge={I:"DPP",C:"Coaching",S:"Test Service",B:"Pilot"},he=null===Array||void 0===Array?void 0:Array.from({length:null===W||void 0===W||null===(C=W.testProcessByRequestType)||void 0===C?void 0:C.length},((e,s)=>me[s%me.length])),xe={labels:pe.map((e=>ge[e.key]||e.key)),datasets:[{data:pe.map((e=>e.numVal)),backgroundColor:he,hoverBackgroundColor:he.map((e=>e+"CC"))}]},{basicOptions:je}={basicOptions:{maintainAspectRatio:!1,aspectRatio:.9,plugins:{legend:{display:!1,labels:{generateLabels:()=>[]}}},scales:{x:{ticks:{color:"#495057"},grid:{display:!1}},y:{ticks:{color:"#495057"},grid:{display:"#e0e0e0"}}},datasets:{bar:{categoryPercentage:.4,barPercentage:1,maxBarThickness:100,minBarLength:2}}}};(0,t.useEffect)((()=>{be(0),ye()}),[]);const be=e=>{E(!0),setTimeout((()=>{F(e);let s="O";1===e?s="O":2===e?s="C":3===e&&(s="T"),r.Z.getStatsData(s,S).then((e=>{E(!1),q(e.data)}),(e=>{V(e),E(!1)})),E(!1)}),500)},ye=()=>{E(!0),r.Z.getStatisticsData(S).then((e=>{E(!1),J(e.data)}),(e=>{V(e),E(!1)}))},fe=e=>{E(!0);const s={startDate:null!==K&&void 0!==K&&K[0]?K[0].toISOString():null,endD
1ate:null!==K&&void 0!==K&&K[1]?K[1].toISOString():null};r.Z.exportStatisticsCsv(s,S,e).then((s=>{E(!1);const i=new Blob([s.data],{type:"text/csv;charset=utf-8"}),t=window.URL.createObjectURL(i),a=document.createElement("a");a.href=t,a.download="export_".concat(e,".csv"),document.body.appendChild(a),a.click(),a.remove(),window.URL.revokeObjectURL(t)}),(e=>{V(e),E(!1)}))},Ne=e=>{const s=Q[e];Y({...Q,[e]:!s})},ke=!K||!K[0]||!K[1];return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(o.YS,{children:(0,g.jsxs)(z.f,{activeIndex:A,onTabChange:e=>be(e.index),children:[(0,g.jsx)(z.x,{header:w("users"),children:(0,g.jsxs)("div",{className:"chart-wrapper",children:[(0,g.jsxs)("div",{className:"filter-section",children:[(0,g.jsx)(G.f,{id:"range",value:K,onChange:e=>_(e.value),selectionMode:"range",readOnlyInput:!0,appendTo:"self",placeholder:T}),(0,g.jsxs)("div",{className:"export-button ".concat(ke?"disabled":""),onClick:()=>{ke||fe("U")},children:[(0,g.jsx)("i",{className:"pi pi-upload",style:{fontSize:"0.8em"}}),(0,g.jsx)("label",{className:"cursor-pointer",children:w("export")})]})]}),(0,g.jsxs)("div",{className:"numbers-container",children:[(0,g.jsxs)("div",{className:"number",children:[(0,g.jsx)("h2",{children:null===H||void 0===H?void 0:H.totalUsers}),(0,g.jsxs)("p",{children:[(0,g.jsx)("div",{children:w("users")}),(0,g.jsx)("div",{className:"subtitle",children:w("currentTotal")})]})]}),(0,g.jsxs)("div",{className:"number",children:[(0,g.jsxs)("h2",{children:[(null===H||void 0===H?void 0:H.usersLastMonth)>0&&"+",null===H||void 0===H?void 0:H.usersLastMonth]}),(0,g.jsxs)("p",{children:[(0,g.jsx)("div",{children:w("newUsers")}),(0,g.jsx)("div",{className:"subtitle",children:w("thisMonth")})]})]}),(0,g.jsxs)("div",{className:"number",children:[(0,g.jsxs)("h2",{children:[(null===H||void 0===H?void 0:H.activeUsersLast3Months)>0&&"+",null===H||void 0===H?void 0:H.activeUsersLast3Months]}),(0,g.jsxs)("p",{children:[(0,g.jsxs)("div",{className:"flex align-items-center gap-1",children:[w("usersWithRecentActivity"),(0,g.jsx)("i",{className:"pi pi-info-circle",title:w("activeUsersDescription")})]}),(0,g.jsx)("div",{className:"subtitle",children:w("last3Months")})]})]})]}),(0,g.jsx)("div",{className:"chart-container",children:(0,g.jsx)(D.k,{type:"bar",data:te,options:je})})]})}),(0,g.jsx)(z.x,{header:w("organisations"),children:(0,g.jsxs)("div",{className:"chart-wrapper",children:[(0,g.jsxs)("div",{className:"filter-section",children:[(0,g.jsx)(G.f,{id:"range",value:K,onChange:e=>_(e.value),selectionMode:"range",readOnlyInput:!0,appendTo:"self",placeholder:T}),(0,g.jsxs)("div",{className:"export-button ".concat(ke?"disabled":""),onClick:()=>{ke||fe("O")},children:[(0,g.jsx)("i",{className:"pi pi-upload",style:{fontSize:"0.8em"}}),(0,g.jsx)("label",{className:"cursor-pointer",children:w("export")})]})]}),(0,g.jsxs)("div",{className:"numbers-container",children:[(0,g.jsxs)("div",{className:"number",children:[(0,g.jsx)("h2",{children:null===H||void 0===H?void 0:H.totalOrganisation}),(0,g.jsxs)("p",{children:[(0,g.jsx)("div",{children:w("organisations")}),(0,g.jsx)("div",{className:"subtitle",children:w("currentTotal")})]})]}),(0,g.jsxs)("div",{className:"number",children:[(0,g.jsxs)("h2",{children:[(null===H||void 0===H?void 0:H.organisationLastMonth)>0&&"+",null===H||void 0===H?void 0:H.organisationLastMonth]}),(0,g.jsxs)("p",{children:[(0,g.jsx)("div",{children:w("newOrganisations")}),(0,g.jsx)("div",{className:"subtitle",children:w("thisMonth")})]})]})]}),(0,g.jsx)("div",{className:"chart-container",children:(0,g.jsx)(D.k,{type:"bar",data:ae,options:je})}),(0,g.jsxs)("div",{className:"table-container",children:[(0,g.jsxs)("div",{className:"custom-card",children:[(0,g.jsx)("div",{className:"header-row",children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"title",children:w("mostVisitedOrganisations")}),(0,g.jsx)("p",{className:"subtitle",children:"Total visit (first 50)"})]})}),(0,g.jsxs)(j.w,{value:null===W||void 0===W?void 0:W.mostVisitedOrganisationList,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{field:"
1key",header:""}),(0,g.jsx)(b.s,{field:"numVal",header:"",style:{textAlign:"right"}})]})]}),(0,g.jsxs)("div",{className:"custom-card",children:[(0,g.jsxs)("div",{className:"header-row",children:[(0,g.jsx)("div",{children:(0,g.jsx)("h3",{className:"title",children:w("organisationBy")})}),(0,g.jsx)("span",{className:"view-chart",onClick:()=>Ne(X[U]),children:w("viewOnChart")})]}),(0,g.jsxs)(z.f,{activeIndex:U,onTabChange:e=>O(e.index),children:[(0,g.jsx)(z.x,{header:w("country"),children:(0,g.jsxs)(I(),{isFlipped:Q.country,flipDirection:"horizontal",children:[(0,g.jsxs)(j.w,{value:W.countryList,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{field:"key",header:"Organisations by Country"}),(0,g.jsx)(b.s,{field:"numVal",header:"Total",style:{textAlign:"right"}})]}),(0,g.jsx)(D.k,{type:"bar",data:ne,options:je})]})}),(0,g.jsx)(z.x,{header:w("type"),children:(0,g.jsxs)(I(),{isFlipped:Q.type,flipDirection:"horizontal",children:[(0,g.jsxs)(j.w,{value:null===W||void 0===W?void 0:W.orgTypeList,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{body:ee,header:"Organisations by Type"}),(0,g.jsx)(b.s,{field:"numVal",header:"Total",style:{textAlign:"right"}})]}),(0,g.jsx)(D.k,{type:"bar",data:oe,options:je})]})}),(0,g.jsx)(z.x,{header:w("businessModel"),children:(0,g.jsxs)(I(),{isFlipped:Q.status,flipDirection:"horizontal",children:[(0,g.jsxs)(j.w,{value:null===W||void 0===W?void 0:W.orgStatusList,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{body:e=>""===e.key?w("undefined"):w("orgStatus"+e.key),header:"Organisations by Status"}),(0,g.jsx)(b.s,{field:"numVal",header:"Total",style:{textAlign:"right"}})]}),(0,g.jsx)(D.k,{type:"bar",data:re,options:je})]})}),(0,g.jsx)(z.x,{header:w("ownership"),children:(0,g.jsxs)(I(),{isFlipped:Q.info,flipDirection:"horizontal",children:[(0,g.jsxs)(j.w,{value:null===W||void 0===W?void 0:W.orgInfoList,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{body:se,header:"Organisations by Status"}),(0,g.jsx)(b.s,{field:"numVal",header:"Total",style:{textAlign:"right"}})]}),(0,g.jsx)(D.k,{type:"bar",data:de,options:je})]})})]})]})]})]})}),(0,g.jsx)(z.x,{header:w("clusters"),children:(0,g.jsxs)("div",{className:"chart-wrapper",children:[(0,g.jsxs)("div",{className:"filter-section",children:[(0,g.jsx)(G.f,{id:"range",value:K,onChange:e=>_(e.value),selectionMode:"range",readOnlyInput:!0,appendTo:"self",placeholder:T}),(0,g.jsxs)("div",{className:"export-button ".concat(ke?"disabled":""),onClick:()=>{ke||fe("C")},children:[(0,g.jsx)("i",{className:"pi pi-upload",style:{fontSize:"0.8em"}}),(0,g.jsx)("label",{className:"cursor-pointer",children:w("export")})]})]}),(0,g.jsxs)("div",{className:"numbers-container",children:[(0,g.jsxs)("div",{className:"number",children:[(0,g.jsx)("h2",{children:null===H||void 0===H?void 0:H.totalCluster}),(0,g.jsxs)("p",{children:[(0,g.jsx)("div",{children:w("clusters")}),(0,g.jsx)("div",{className:"subtitle",children:w("currentTotal")})]})]}),(0,g.jsxs)("div",{className:"number",children:[(0,g.jsxs)("h2",{children:[(null===H||void 0===H?void 0:H.clusterLastMonth)>0&&"+",null===H||void 0===H?void 0:H.clusterLastMonth]}),(0,g.jsxs)("p",{children:[(0,g.jsx)("div",{children:w("newCluster")}),(0,g.jsx)("div",{className:"subtitle",children:w("thisMonth")})]})]})]}),(0,g.jsx)("div",{className:"chart-container",children:(0,g.jsx)(D.k,{type:"bar",data:le,options:je})}),(0,g.jsxs)("div",{className:"table-container",children:[(0,g.jsxs)("div",{className:"custom-card",children:[(0,g.jsx)("div",{className:"header-row",children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"title",children:w("mostVisitedClusters")}),(0,g.jsx)("p",{className:"subtitle",children:"Total visit (first 50)"})]})}),(0,g.jsxs)(j.w,{value:null===W||void 0===W?void 0:W.mostVisitedCluster
1List,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{field:"key",header:"Most Visited Cluster Profiles"}),(0,g.jsx)(b.s,{field:"numVal",header:"Total visit (First 50)",style:{textAlign:"right"}})]})]}),(0,g.jsxs)("div",{className:"custom-card",children:[(0,g.jsxs)("div",{className:"header-row",children:[(0,g.jsx)("div",{children:(0,g.jsx)("h3",{className:"title",children:w("clusterBy")})}),(0,g.jsx)("span",{className:"view-chart",onClick:()=>Ne(X[P]),children:w("viewOnChart")})]}),(0,g.jsxs)(z.f,{activeIndex:P,onTabChange:e=>M(e.index),children:[(0,g.jsx)(z.x,{header:w("country"),children:(0,g.jsxs)(I(),{isFlipped:Q.country,flipDirection:"horizontal",children:[(0,g.jsxs)(j.w,{value:W.countryList,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{field:"key",header:"Organisations by Country"}),(0,g.jsx)(b.s,{field:"numVal",header:"Total",style:{textAlign:"right"}})]}),(0,g.jsx)(D.k,{type:"bar",data:ne,options:je})]})}),(0,g.jsx)(z.x,{header:w("type"),children:(0,g.jsxs)(I(),{isFlipped:Q.type,flipDirection:"horizontal",children:[(0,g.jsxs)(j.w,{value:null===W||void 0===W?void 0:W.clusterTypeList,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{body:ie,header:"Organisations by Type"}),(0,g.jsx)(b.s,{field:"numVal",header:"Total",style:{textAlign:"right"}})]}),(0,g.jsx)(D.k,{type:"bar",data:ce,options:je})]})})]})]})]})]})}),"Metabuilding"===L&&(0,g.jsx)(z.x,{header:w("interactions"),children:(0,g.jsxs)("div",{className:"chart-wrapper",children:[(0,g.jsx)("div",{className:"table-container",children:(0,g.jsxs)("div",{className:"custom-card",children:[(0,g.jsxs)("div",{className:"header-row",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"title",children:w("messagesSentToOrganisations")}),(0,g.jsx)("p",{className:"subtitle",children:w("messageText")})]}),(0,g.jsx)("span",{className:"view-chart",onClick:()=>Ne(X[4]),children:w("viewOnChart")})]}),(0,g.jsxs)(I(),{isFlipped:Q.interaction,flipDirection:"horizontal",children:[(0,g.jsxs)(j.w,{value:null===W||void 0===W?void 0:W.messagesSentToOrganisations,size:"small",className:"custom-table",paginator:!0,rows:8,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",responsiveLayout:"scroll",children:[(0,g.jsx)(b.s,{field:"key",header:""}),(0,g.jsx)(b.s,{field:"numVal",header:"",style:{textAlign:"right"}})]}),(0,g.jsx)(D.k,{type:"bar",data:ue,options:je})]})]})}),(0,g.jsx)("div",{children:(0,g.jsxs)("div",{className:"pie-chart-container",children:[(0,g.jsx)("h3",{className:"pie-chart-title",children:w("serviceRequests")}),(0,g.jsxs)("div",{className:"pie-number",children:[(0,g.jsxs)("label",{children:[w("total"),":"]}),(0,g.jsx)("label",{children:null===H||void 0===H?void 0:H.totalTestProcess})]}),(0,g.jsx)("div",{children:(0,g.jsx)(D.k,{type:"pie",data:xe,options:{maintainAspectRatio:!1,responsive:!0}})})]})})]})})]})}),R&&(0,g.jsx)(Z.Z,{error:R,setError:V,setLoading:E}),(0,g.jsx)(x.Z,{loading:B,lang:w})]})})),W=(0,a.Zh)()((e=>{var s;let{t:i,item:d,cardType:m,getMyOrganisations:v,getEcosystems:p,getMyClusters:k,getMyWorkingGroups:C,state:S}=e;const L=window&&window.location&&window.location.hostname,T=(0,U.v9)((e=>e.ecosystem)),A=(0,U.v9)((e=>e.auth.user)),[F,z]=(0,t.useState)(!1),[D,R]=(0,t.useState)(!1),[I,Z]=(0,t.useState)(""),[G,W]=(0,t.useState)(!1),[q,H]=(0,t.useState)(!1),[J,K]=(0,t.useState)(!1),[_,Q]=(0,t.useState)(null),[Y,X]=(0,t.useState)(!1),[$,ee]=(0,t.useState)(!1),[se,ie]=(0,t.useState)(!1),[te,ae]=(0,t.useState)(""),[le,ne]=(0,t.useState)(""),[oe,re]=(0,t.useState)(null),[de,ce]=(0,t.useState)(""),[ue,me]=(0,t.useState)(""),[ve,pe]=(0,t.useState)(!1),[ge,he]=(0,t.useState)(!1),[xe,je]=(0,t.useState)(""),[be,ye]=(0,t.useState)([]),[fe,Ne]=(0,t.useState)("/assets/img/wg.svg"),[ke,Ce]=(0,t.useState)([]),[we,Se]=(0,t.useState)(null),[Le,Te]=(0,t.useState)(""),[Ae,Fe]=(0,t.useState)(""),[Ue,Oe]=(0,t.useState)(""),[Pe,Me]=(0,t.useState)(""),[Be,Ee]=(0,t.useState)(!1),[ze,De]=(0,t.useState)(!1),[Re,Ie]=(0,t.useState)(!1),Ze
1=e=>{R(!0),r.Z.getGraphData((()=>{switch(m){case"organisation":return 4;case"ecosystem":return 2}})(),e).then((e=>{R(!1),Z(e.data),W(!0)}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}))},Ge=e=>{me(e),X(!0)},Ve=e=>{ae(d),ie(!0),ne(e)},We=(e,s)=>{re(e),ce(s),ee(!0)},qe=e=>(0,g.jsxs)("div",{children:[(0,g.jsx)(f.z,{icon:"pi pi-check",tooltip:i("accept"),className:"p-button-rounded p-button-text p-button-success",onClick:s=>{We(e,"A")},id:"buttonFontWeight"}),(0,g.jsx)(f.z,{icon:"pi pi-times",tooltip:i("decline"),className:"p-button-rounded p-button-text p-button-danger",onClick:s=>{We(e,"R")},id:"buttonFontWeight"})]}),He=()=>{},Je=e=>(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(n.OL,{to:"/organisation/",state:e,className:"no-underline",children:e.name})}),Ke=e=>(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{children:null===e||void 0===e?void 0:e.name})}),_e=e=>(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{children:(0,g.jsx)(n.OL,{to:"/o/"+(null===e||void 0===e?void 0:e.traTbcOrganisationLinkId),target:"_blank",className:"no-underline",children:null===e||void 0===e?void 0:e.traTbcOrganisationName})})}),Qe=e=>e.firstName+" "+(null===e||void 0===e?void 0:e.lastName),Ye=e=>(0,y.jf)(null!==e&&void 0!==e&&e.registrationTime?null===e||void 0===e?void 0:e.registrationTime:null===e||void 0===e?void 0:e.creationTime),Xe=()=>{R(!0),r.Z.getWaitingApprovalOrganisationsForEcosystem(null===_||void 0===_?void 0:_.id).then((e=>{R(!1),Ce(e.data)}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}))};(0,t.useEffect)((()=>{"organisation"===m&&r.Z.getExpertAccessStatus(null===d||void 0===d?void 0:d.id).then((e=>{var s;z(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.adminStatus)}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}))}),[]),(0,t.useEffect)((()=>{"ecosystem"===m&&Xe()}),[_]);const $e=()=>{if(R(!0),""===xe)return R(!1),void w.Am.warning((0,g.jsx)(a.cC,{i18nKey:"userSearchWarning"}));r.Z.searchUserForTestProcessManagement(xe,1===(null===d||void 0===d?void 0:d.id)&&(null===d||void 0===d?void 0:d.id)).then((e=>{if(R(!1),e.data.length<1)return w.Am.warning((0,g.jsx)(a.cC,{i18nKey:"userNotFound"})),void ye([]);ye(e.data)}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}))},es=e=>{R(!0);const s={ecosystemId:null===d||void 0===d?void 0:d.id,userId:null===e||void 0===e?void 0:e.id,country:null,userType:1,organisationId:null===e||void 0===e?void 0:e.orgId};r.Z.assignTestProcessUser(s).then((e=>{R(!1),$e(),S.setIsAssign(!0),S.setBlockedPanel(!0)}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}))},ss=e=>{R(!0);const s={ecosystemId:null===d||void 0===d?void 0:d.id,userId:null===e||void 0===e?void 0:e.id,oid:null===e||void 0===e?void 0:e.orgId,organisationId:null===e||void 0===e?void 0:e.orgId};r.Z.deleteTestProcessUser(s).then((e=>{R(!1),$e(),S.setBlockedPanel(!0)}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}))},is=(0,g.jsx)(f.z,{icon:"pi pi-cancel",label:i("reject"),className:"p-button-danger",disabled:null===we,onClick:()=>{Ee(!0),Oe("R")}}),ts=ke.filter((e=>e.name.toLowerCase().includes(Ae.toLowerCase())));return(0,g.jsxs)(g.Fragment,{children:[(()=>{var e,s,t,a,r,c,u,v,p,h,x,j,b,N,k,C,w,S;switch(m){case"ecosystem":return(0,g.jsxs)(o.NB,{cardBgColor:"#fff",n
1ameColor:"#116182",countryColor:"#21ACE3",iconColor:"#116182",iconGap:.4,roleColor:"#595959",borderColor:"none",logoRadius:"5px",height:"130px",children:[(0,g.jsxs)("div",{className:"logo-container",children:[(0,g.jsx)("div",{className:"logo-wrapper",children:(0,g.jsx)("img",{className:"logo",src:null===d||void 0===d?void 0:d.logoLink,alt:"",style:{border:"1px solid #E7E0EC"}})}),(0,g.jsxs)("div",{className:"info",children:[(0,g.jsx)("div",{className:"name",children:null===d||void 0===d?void 0:d.name}),(0,g.jsx)("div",{className:"country",children:null===d||void 0===d?void 0:d.country}),void 0!==(null===d||void 0===d?void 0:d.sector)&&""!==(null===d||void 0===d?void 0:d.sector)&&(0,g.jsxs)("div",{className:"sector",children:[null===d||void 0===d?void 0:d.sector," ",i("sector")]})]})]}),(0,g.jsx)("div",{className:"action-buttons",children:2===(null===d||void 0===d?void 0:d.traUserTypeStatus)&&2===(null===d||void 0===d?void 0:d.status)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("button",{onClick:()=>{Q(d),K(!0)},title:i("approve"),children:(0,g.jsx)("i",{className:"pi pi-check-circle p-overlay-badge icon",children:(null===d||void 0===d?void 0:d.traWaitingOrganisationSize)>0&&(0,g.jsx)(l.C,{value:null===d||void 0===d?void 0:d.traWaitingOrganisationSize,className:"badge"})})}),1===(null===d||void 0===d?void 0:d.id)&&(0,g.jsx)("button",{onClick:()=>he(!0),title:i("assign"),children:(0,g.jsx)("i",{className:"pi pi-users icon"})}),(0,g.jsx)("button",{onClick:()=>Ge("c"),title:i("clusterRequests"),children:(0,g.jsx)("i",{className:"pi pi-th-large p-overlay-badge icon",children:(null===d||void 0===d||null===(e=d.traToBeAcceptClusterList)||void 0===e?void 0:e.length)>0&&(0,g.jsx)(l.C,{value:null===d||void 0===d||null===(s=d.traToBeAcceptClusterList)||void 0===s?void 0:s.length,className:"badge"})})}),(0,g.jsx)("button",{onClick:()=>H(!0),title:i("clusterNewsPromoteRequests"),children:(0,g.jsx)("i",{className:"pi pi-megaphone  p-overlay-badge icon",children:(null===d||void 0===d||null===(t=d.traToBePromoteNewsList)||void 0===t?void 0:t.length)>0&&(0,g.jsx)(l.C,{value:null===d||void 0===d||null===(a=d.traToBePromoteNewsList)||void 0===a?void 0:a.length,className:"badge"})})}),(0,g.jsx)("button",{onClick:()=>{pe(!0)},title:i("statistics"),children:(0,g.jsx)("i",{className:"pi pi-chart-bar icon"})}),(0,g.jsx)("button",{onClick:()=>Ze(null===d||void 0===d?void 0:d.id),title:i("networkGraph"),children:(0,g.jsx)("i",{className:"pi pi-share-alt icon"})}),(0,g.jsx)(n.OL,{to:"/ecosystemProfile",state:d,className:"no-underline",children:(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-file-edit icon",title:i("update")})})})]})})]});case"organisation":return(0,g.jsxs)(o.NB,{cardOpacity:1===(null===d||void 0===d?void 0:d.traUserApprovalStatus)&&.7,cardBgColor:1===(null===d||void 0===d?void 0:d.traUserApprovalStatus)?"#fff":1===(null===d||void 0===d?void 0:d.traUserTypeStatus)?"#f5f5f5":"#DCDCDC",nameColor:"#116182",countryColor:"#21ACE3",iconColor:"#116182",iconGap:1.5,roleColor:"#595959",borderColor:(null===A||void 0===A||null===(r=A.lastUsedOrganisation)||void 0===r?void 0:r.name)===(null===d||void 0===d?void 0:d.name)?"#21ACE3":"none",logoRadius:"6px",logoBgColor:"#fff",height:"150px",children:[(0,g.jsxs)("div",{className:"logo-container",children:[(0,g.jsx)("div",{className:"logo-wrapper",children:(0,g.jsx)("img",{className:"logo",src:void 0!==(null===d||void 0===d?void 0:d.logoLink)&&""!==(null===d||void 0===d?void 0:d.logoLink)?d.logoLink:"/assets/img/org_card_blank_org_logo.png",alt:""})}),(0,g.jsxs)("div",{className:"info",children:[(0,g.jsx)("div",{className:"name",children:null===d||void 0===d?void 0:d.name}),(0,g.jsx)("div",{className:"country",children:i(null===d||void 0===d?void 0:d.country)}),void 0!==(null===d||void 0===d?void 0:d.sector)&&""!==(null===d||void 0===d?void 0:d.sector)&&(0,g.jsxs)("div",{className:"sector",children:[null===d||void 0===d?void 0:d.sector," ",i("sector")]})]})]}),(0,g.jsx)("div",{className:"role",children:(0,g.jsxs)("div",{children:[(0,g.jsxs)("span",{className:"font-bold",children:[i("myRole"),": "]}),2===(null===d||void 0===d?void 0:d.traExpertTypeStatus)?1===(null===d||void 0===d?void 0:d.traUserTypeStatus)?i("expert"):i("admin")+"/"+i("expert"):1===(null===d||void 0===d?void 0:d.traUserTypeStatus)?i("user"):i("admin")]})}),(0,g.jsxs)("div",{className:"action-buttons",children:[(F||2===(null===d||void 0===d?void 0:d.traUserTypeStatus))&&2===(null===d||void 0===d?void 0:d.status)&&(0,g.jsxs)(g.Fragment,{children:[2===(null===d||void 0===d?void 0:d.traUserTypeStatus)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("button",{onClick:()=>Ge("u"),title:i("organisation")+" "+i("joinRequests"),children:(0,g.jsx)("i",{className:"pi pi-plus-circle p-overlay-badge icon",children:(null===d||void 0===d||null===(c=d.traToBeJoinUserList)||void 0===c?void 0:c.length)>0&&(0,g.jsx)(l.C,{value:null===d||void 0===d||null===(u=d.traToBeJoinUserList)||void 0===u?void 0:u.length,className:"badge"})})}),(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-user icon",onClick:Ve,title:i("users")})}),(0,g.jsx)("span",{onClick:()=>Ze(null===d||void 0===d?void 0:d.id),children:(0,g.jsx)("i",{className:"pi pi-share-alt icon",title:i("networkGraph")})})]}),(F||2===(null===d||void 0===d?void 0:d.traUserTypeStatus))&&(0,g.jsx)(n.OL,{to:"/organisationProfile",state:d,children:(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-file-edit icon",title:i("update")})})})]}),2===(null===d||void 0===d?void 0:d.traUserApprovalStatus)&&(0,g.jsx)(n.OL,{to:"/organisation",state:d,children:(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-eye icon",title:i("preview")})})}),1===(null===d||void 0===d?void 0:d.traUserApprovalStatus)&&(0,g.jsx)("div",{children:i("STATUS_1")})]})]});case"cluster":return(0,g.jsxs)(o.NB,{cardBgColor:1===(null===d||void 0===d?void 0:d.traUserApprovalStatus)?"#F0F0F0":"N"===(null===d||void 0===d?void 0:d.clusterType)?"#116182":"M"===(null===d||void 0===d?void 0:d.clusterType)?"#123848":(null===d||void 0===d||d.clusterType,"#00B7F1"),nameColor:1===(null===d||void 0===d?void 0:d.traUserApprovalStatus)?"#595959":"C"===(null===d||void 0===d?void 0:d.clusterType)?"#116182":"#FFFFFF",countryColor:1===(null===d||void 0===d?void 0:d.traUserApprovalStatus)?"#595959":"#FFFFFF",iconColor:"#fff",iconGap:1.5,borderColor:"none",logoRadius:"50%",height:"185px",children:[(0,g.jsxs)("div",{className:"logo-container",children:[(0,g.jsx)("div",{className:"logo-wrapper",children:(0,g.jsx)("img",{className:"logo",src:"C"===(null===d||void 0===d?void 0:d.clusterType)?"/assets/img/flags/"+(null===d||void 0===d||null===(v=d.name)||void 0===v||null===(p=v.toLowerCase())||void 0===p?void 0:p.replace(" ",""))+".png":"S"===d.clusterType?(0,y.xC)(null===d||void 0===d?void 0:d.name):null===d||void 0===d?void 0:d.logoLink,style:{backgroundColor:"#fff"},alt:""})}),(0,g.jsxs)("div",{className:"info",children:[(0,g.jsx)("div",{className:"name",children:(null===d||void 0===d||null===(h=d.name)||void 0===h?void 0:h.length)>45?(null===d||void 0===d||null===(x=d.name)||void 0===x?void 0:x.substring(0,45))+"...":null===d||void 0===d?void 0:d.name}),"S"===(null===d||void 0===d?void 0:d.clusterType)?(0,g.jsx)("div",{className:"country",style:{color:"#116182"},children:i("sectorNetwork")}):"C"===(null===d||void 0===d?void 0:d.clusterType)?(0,g.jsx)("div",{className:"country",style:{color:"#116182"},children:i("nationalPage")}):"M"===(null===d||void 0===d?void 0:d.clusterType)?(0,g.jsx)("div",{className:"country",style:{color:"#00B7F1"},children:i("clusterTypeM")}):(0,g.jsx)("div",{className:"country",style:{color:"#00B7F1"},children:i("cluster")}),void 0!==(null===d||void 0===d?void 0:d.sector)&&""!==(null===d||void 0===d?void 0:d.sector)&&(0,g.jsxs)("div",{className:"sector",children:[null===d||void 0===d?void 0:d.sector," ",i("sector")]})]})]}),(0,g.jsxs)("div",{className:"role",children:[null!==(null===d||void 0===d?void 0:d.traOrganisation)&&(0,g.jsxs)("div",{children:[(0,g.jsxs)("span",{className:2===d.traUserApprovalStatus?"font-bold":"font-bold text-gray-600",children:[i("createdBy"),": "]}),(0,g.jsx)("span",{className:2===d.traUserApprovalStatus?"":"text-gray-600",children:d.traOrganisation})]}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("span",{className:2===d.traUserApprovalStatus?"font-bold":"font-bold text-gray-600",children:[i("myRole"),": "]}),(0,g.jsx)("span",{className:2===d.traUserApprovalStatus?"":"text-gray-700",children:1===(null===d||void 0===d?void 0:d.traUserTypeStatus)?i("user"):i("admin")})]})]}),(0,g.jsx)("div",{className:"action-buttons",children:2===(null===d||void 0===d?void 0:d.traUserApprovalStatus)?(0,g.jsxs)(g.Fragment,{children:[(2===(null===d||void 0===d?void 0:d.traUserTypeStatus)&&2===(null===d||void 0===d?void 0:d.status)&&"C"!==(null===d||void 0===d?void 0:d.clusterType)&&"S"!==(null===d||void 0===d?void 0:d.clusterType)||1===(null===d||void 0===d?void 0:d.traUserTypeStatus)&&2===(null===d||void 0===d?void 0:d.status)&&"C"!==(null===d||void 0===d?void 0:d.clusterType)&&"S"!==(null===d||void 0===d?void 0:d.clusterType)&&!0===(null===d||void 0===d?void 0:d.traWGAdminStatus))&&(0,g.jsx)(n.OL,{to:"/workingGroups",state:d,children:(0,g.jsx)("img",{style:{marginBottom:"4px",left:"1px",cursor:"pointer"},src:fe,width:22,height:22,title:i("workingGroups"),alt:"",onMouseEnter:()=>Ne("/assets/img/wg-hover.svg"),onMouseLeave:()=>Ne("/assets/img/wg.svg")})}),2===(null===d||void 0===d?void 0:d.traUserTypeStatus)&&2===(null===d||void 0===d?void 0:d.status)&&(0,g.jsxs)(g.Fragment,{children:["C"!==(null===d||void 0===d?void 0:d.clusterType)&&"S"!==(null===d||void 0===d?void 0:d.clusterType)&&(0,g.jsx)("button",{onClick:()=>Ge("o"),title:i("cluster")+" "+i("joinRequests"),children:(0,g.jsx)("i",{className:"pi pi-plus-circle p-overlay-badge icon",children:(null===d||void 0===d||null===(j=d.traToBeJoinOrgList)||void 0===j?void 0:j.length)>0&&(0,g.jsx)(l.C,{value:null===d||void 0===d||null===(b=d.traToBeJoinOrgList)||void 0===b?void 0:b.length,className:"badge"})})}),(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-user icon",onClick:Ve,title:i("users")})}),(0,g.jsx)(n.OL,{to:"/clusterProfile",state:d,children:(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-file-edit icon",title:i("update")})})})]}),2===(null===d||void 0===d?void 0:d.traUserApprovalStatus)&&(0,g.jsx)(n.OL,{to:"C"===(null===d||void 0===d?void 0:d.clusterType)?"/nc/".concat(null===d||void 0===d?void 0:d.linkId):"S"===(null===d||void 0===d?void 0:d.clusterType)?"/organisationBySector/".concat(null===d||void 0===d?void 0:d.linkId):"/c/".concat(null===d||void 0===d?void 0:d.linkId),state:d,children:(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-eye icon",title:i("preview")})})})]}):(0,g.jsx)("div",{style:{marginLeft:"auto",color:"#116182",fontSize:"12px"},children:i("Pending Approval")})})]});case"workingGroup":return(0,g.jsxs)(o.NB,{cardBgColor:1===(null===d||void 0===d?void 0:d.traUserTypeStatus)?"#848484"
1:"#595959",nameColor:"#fff",countryColor:"#fff",iconColor:"#fff",iconGap:1.5,borderColor:"none",logoRadius:"50%",height:"210px",children:[(0,g.jsxs)("div",{className:"logo-container",children:[(0,g.jsx)("div",{className:"logo-wrapper",children:(0,g.jsx)("img",{className:"logo",style:{backgroundColor:"#ffff"},src:null===d||void 0===d||null===(N=d.cluster)||void 0===N?void 0:N.logoLink,alt:""})}),(0,g.jsxs)("div",{className:"info",children:[(0,g.jsx)("div",{className:"name",children:(null===d||void 0===d||null===(k=d.name)||void 0===k?void 0:k.length)>35?"".concat(d.name.substring(0,35)," ..."):null===d||void 0===d?void 0:d.name}),(0,g.jsx)("div",{className:"country",children:null===d||void 0===d?void 0:d.country}),void 0!==(null===d||void 0===d?void 0:d.sector)&&""!==(null===d||void 0===d?void 0:d.sector)&&(0,g.jsxs)("div",{className:"sector",children:[null===d||void 0===d?void 0:d.sector," ",i("sector")]})]})]}),(0,g.jsxs)("div",{className:"role",children:[(0,g.jsxs)("div",{className:"fw-bold",children:[i("myOrganisation"),": ",(0,g.jsxs)("span",{children:[" ",null===A||void 0===A||null===(C=A.lastUsedOrganisation)||void 0===C?void 0:C.name]})]}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("span",{className:"font-bold",children:[i("access"),": "]}),(null===d||void 0===d?void 0:d.workingGroupType)&&i({1:"private",2:"public"}[d.workingGroupType])]})]}),(0,g.jsx)("div",{className:"action-buttons",children:2===(null===d||void 0===d?void 0:d.traUserTypeStatus)&&2===(null===d||void 0===d?void 0:d.status)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(f.z,{className:"goToWG bg-info",style:{padding:"2px 6px",minWidth:"70px"},label:i("goToWg"),onClick:e=>{e.preventDefault(),window.location.href="/wg/".concat(null===d||void 0===d?void 0:d.linkId)}}),"1"===(null===d||void 0===d?void 0:d.workingGroupType)&&(0,g.jsx)("button",{className:"joinButton",onClick:()=>Ge("wg"),title:i("workingGroup")+" "+i("joinRequests"),children:(0,g.jsx)("i",{className:"pi pi-plus-circle  p-overlay-badge icon",children:(null===d||void 0===d||null===(w=d.traToBeJoinUserList)||void 0===w?void 0:w.length)>0&&(0,g.jsx)(l.C,{value:null===d||void 0===d||null===(S=d.traToBeJoinUserList)||void 0===S?void 0:S.length,className:"badge"})})}),(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-user icon",onClick:Ve,title:i("admins")})}),(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-users icon",onClick:()=>Ve("wgUsers"),title:i("users")})}),(0,g.jsx)(n.OL,{to:"/workingGroupProfile",state:d,children:(0,g.jsx)("span",{children:(0,g.jsx)("i",{className:"pi pi-file-edit icon",title:i("update")})})})]})})]})}})(),(0,g.jsx)(u.V,{visible:G,maximized:!0,modal:!0,className:"p-fluid",onHide:()=>W(!1),children:void 0!==I&&null!==I&&(0,g.jsx)(h,{data:I})}),(0,g.jsx)(u.V,{visible:Y,modal:!0,className:"p-fluid dialog-size",header:((e,s,i)=>{let t="";switch(e){case"ecosystem":t="".concat(i("clusterCreationRequests")," - ").concat(null===s||void 0===s?void 0:s.name);break;case"organisation":t="".concat(i("organisationJoinRequests")," - ").concat(null===s||void 0===s?void 0:s.name);break;case"cluster":t="".concat(i("clusterJoinRequests")," - ").concat(null===s||void 0===s?void 0:s.name);break;case"workingGroup":t="".concat(i("wgJoinRequests")," - ").concat(null===s||void 0===s?void 0:s.name);break;default:t="".concat(i("joinRequests")," - ").concat(null===s||void 0===s?void 0:s.name)}return t})(m,d,i),onHide:()=>X(!1),children:(0,g.jsx)("div",{className:"col-12 mb-4",children:(0,g.jsx)("div",{className:"surface-0 shadow-2 p-3 border-1 border-50 border-round",children:(0,g.jsx)(j.w,{name:"dt",size:"small",showGridlines:!0,value:(e=>{switch(ue){case"u":case"wg":return null===e||void 0===e?void 0:e.traToBeJoinUserList;case"c":return null===e||void 0===e?void 0:e.traToBeAcceptClusterList;default:return null===e||void 0===e?void 0:e.traToBeJoinOrgList}})(d),dataKey:"id",stripedRows:!0,responsiveLayout:"scroll",emptyMessage:i("noRequestFound"),header:i("u"===ue?"users":"c"===ue?"clusters":"organisations"),rows:25,loading:D,children:null===(s="u"===ue?[(0,g.jsx)(b.s,{id:"1",field:"firstName",header:i("firstName")}
1),(0,g.jsx)(b.s,{id:"2",field:"lastName",header:i("lastName")}),(0,g.jsx)(b.s,{id:"3",field:"username",header:i("email")}),(0,g.jsx)(b.s,{id:"4",header:i("requestDate"),body:(0,y.jf)(null===d||void 0===d?void 0:d.registrationTime)}),(0,g.jsx)(b.s,{id:"5",field:"traJoinNotes",header:i("notes")}),(0,g.jsx)(b.s,{id:"6",header:i("action"),style:{textAlign:"center",width:"8em"},body:qe})]:"wg"===ue?[(0,g.jsx)(b.s,{id:"7",header:i("name"),body:Qe}),(0,g.jsx)(b.s,{id:"8",field:"traOrgName",header:i("organisation")}),(0,g.jsx)(b.s,{id:"9",header:i("requestDate"),body:(0,y.jf)(null===d||void 0===d?void 0:d.registrationTime)}),(0,g.jsx)(b.s,{id:"10",field:"traJoinNotes",header:i("notes")}),(0,g.jsx)(b.s,{id:"11",header:i("action"),style:{textAlign:"center",width:"8em"},body:qe})]:"c"===ue?[(0,g.jsx)(b.s,{id:"12",body:Ke,header:i("name")}),(0,g.jsx)(b.s,{id:"13",field:"country",header:i("country")}),(0,g.jsx)(b.s,{id:"14",body:_e,header:i("organisation")}),(0,g.jsx)(b.s,{id:"15",field:"traTbcUserFirstLastName",header:i("user")}),(0,g.jsx)(b.s,{id:"16",header:i("requestDate"),body:Ye}),(0,g.jsx)(b.s,{id:"17",header:i("action"),style:{textAlign:"center",width:"8em"},body:qe})]:[(0,g.jsx)(b.s,{id:"18",body:Je,header:i("name")}),(0,g.jsx)(b.s,{id:"19",field:"country",header:i("country")}),(0,g.jsx)(b.s,{id:"20",field:"traTbjUserFirstLastName",header:i("user")}),(0,g.jsx)(b.s,{id:"21",header:i("requestDate"),body:Ye}),(0,g.jsx)(b.s,{id:"22",field:"traJoinNotes",header:i("notes")}),(0,g.jsx)(b.s,{id:"23",header:i("action"),style:{textAlign:"center",width:"8em"},body:qe})])||void 0===s?void 0:s.map(((e,s)=>(0,g.jsx)(b.s,{...e.props},s)))})})})}),(0,g.jsx)(N.Q,{visible:$,onHide:()=>ee(!1),message:i("confirmationMessage"),icon:"R"===de?"pi pi-exclamation-triangle icon-red":"pi pi-exclamation-triangle",className:"R"===de?"delete":"",accept:()=>{switch(m){case"organisation":R(!0),r.Z.joinRequest(T.id,null===oe||void 0===oe?void 0:oe.id,de).then((e=>{R(!1),X(!1),ee(!1),v()}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}));break;case"ecosystem":"c"===ue&&(R(!0),r.Z.clusterRequestEcosystem(null===oe||void 0===oe?void 0:oe.id,de).then((e=>{R(!1),H(!1),ee(!1),p()}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}))),R(!0),r.Z.clusterNewsRequestEcosystem(null===oe||void 0===oe?void 0:oe.id,de).then((e=>{R(!1),H(!1),ee(!1),p()}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}));break;case"cluster":R(!0),r.Z.joinRequestCluster(null===oe||void 0===oe?void 0:oe.id,de).then((e=>{R(!1),H(!1),ee(!1),k()}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}));break;case"workingGroup":R(!0),r.Z.joinRequestWorkingGroup(null===oe||void 0===oe?void 0:oe.id,de).then((e=>{R(!1),H(!1),ee(!1),C()}),(e=>{const s=e.response&&e.response.data&&e.response.data.message||e.message||e.timeoutErrorMessage||e.toString();R(!1),c().fire({title:i(s),icon:"error",timer:2e3,showConfirmButton:!1})}))}},reject:He}),(0,g.jsx)(u.V,{visible:q,modal:!0,className:"p-fluid dialog-size",header:i("clusterNewsPromoteRequests")+" - "+(null===d||void 0===d?void 0:d.name),onHide:()=>H(!1),children:(0,g.jsx)("div",{className:"col-12 mb-4",children:(0,g.jsx)("div",{className:"surface-0 shadow-2 p-3 border-1 border-50 border-round",children:(0,g.jsxs)(j.w,{name:"dt",size:"small",showGridlines:!0,value:null===d||void 0===d?void 0:d.traToBePromoteNewsList,dataKey:"id",stripedRows:!0,responsiveLayout:"scroll",emptyMessage:i("noNewsFound"),header:i("news"),rows:25,loading:D,children:[(0,g.jsx)(b.s,{field:"traClusterName",header:i("cluster")}),(0,g.jsx)(b.s,{field:"subject",header:i("subject")}),(0,g.jsx)(b.s,{field:"content",header:i("content"),body:e=>(0,P.ZP)(null===e||void 0===e?void 0:e.content)}),(0,g.jsx)(b.s,{header:i("newsDate"),body:Ye}),(0,g.jsx)(b.s,{header:i("user"),body:e=>{var s,i;return(null===e||void 0===e||null===(s=e.createdBy)||void 0===s?void 0:s.firstName)+" "+(null===e||void 0===e||null===(i=e.createdBy)||void 0===i?void 0:i.lastName)}}),(0,g.jsx)(b.s,{header:i("action"),style:{textAlign:"center",width:"8em"},body:qe})]})})})}),""!==te&&(0,g.jsx)(O,{visible:se,position:"right",onHide:()=>{ie(!1),ae("")},onReload:C,sideBarData:d,cardType:m,wgType:le}),(0,g.jsx)(u.V,{visible:ve,modal:!0,header:i("ecosystemStatistics"),className:"dialog-size-statistic",onHide:()=>pe(!1),children:(0,g.jsx)(V,{eid:null===d||void 0===d?void 0:d.id,ecosystemName:null===d||void 0===d?void 0:d.name})}),(0,g.jsx)(u.V,{visible:ge,modal:!0,className:"p-fluid dialog-size min-h-25",header:(as="assignARole",(0,g.jsx)("span",{className:"assignARole",children:i(as)})),onHide:()=>{he(!1),je(""),ye([])},children:(0,g.jsxs)(o.kM,{children:[(0,g.jsxs)("div",{className:"input-wrapper",children:[(0,g.jsxs)("div",{id:"search",className:"p-float-label w-full",children:[(0,g.jsx)(B.o,{id:"search",value:xe,className:"p-inputtext-sm w-full input-text",onCh
1ange:e=>je(e.target.value)}),(0,g.jsxs)("label",{htmlFor:"search",className:"platformColor",children:[i("searchFromUsers")," (*)"]})]}),(0,g.jsx)("div",{className:"btn-wrapper",children:(0,g.jsx)(f.z,{label:i("search"),className:"w-full search-btn",onClick:$e})})]}),(0,g.jsx)("div",{className:"search-wrapper",children:(null===be||void 0===be?void 0:be.length)>0?null===be||void 0===be?void 0:be.map(((e,s)=>(0,g.jsxs)("div",{className:"search-item",children:[(0,g.jsxs)("div",{className:"content-wrapper",children:[(0,g.jsx)("div",{className:"img-wrapper",children:(0,g.jsx)("img",{className:null!==e&&void 0!==e&&e.avatarLink?"user-img":"userTemplate-img",src:null!==e&&void 0!==e&&e.avatarLink?null===e||void 0===e?void 0:e.avatarLink:"/assets/img/templateUser.png",alt:""})}),(0,g.jsxs)("div",{className:"search-item-input",children:[(0,g.jsxs)("div",{className:"font-bold",children:[null===e||void 0===e?void 0:e.firstName," ",null===e||void 0===e?void 0:e.lastName," "]}),(0,g.jsx)("div",{children:null===e||void 0===e?void 0:e.username}),(0,g.jsx)("div",{children:null===e||void 0===e?void 0:e.orgName}),(0,g.jsx)("div",{children:null===e||void 0===e?void 0:e.country}),1===(null===e||void 0===e?void 0:e.testProcessRole)&&(0,g.jsx)(M.A,{label:1===(null===e||void 0===e?void 0:e.testProcessRole)&&i("innovationCoordinator")})]})]}),(0,g.jsx)("div",{className:"btn-wrapper",children:(0,g.jsx)(f.z,{label:2===(null===e||void 0===e?void 0:e.testProcessAssignStatus)?i("remove"):i("assign"),className:2===(null===e||void 0===e?void 0:e.testProcessAssignStatus)?"select-btn-active":"select-btn",onClick:()=>(e=>{e&&(1===(null===e||void 0===e?void 0:e.testProcessRole)?ss(e):e
1s(e))})(e)})})]},s))):(0,g.jsx)("div",{className:"flex align-items-center justify-content-center emptyUser",children:i("type3Characters")})})]})}),(0,g.jsx)(u.V,{visible:J,modal:!0,className:"p-fluid dialog-size",onHide:()=>{K(!1),Q(null),Se(null),Ce([])},children:(0,g.jsxs)("div",{className:"flex flex-column gap-2",children:[(0,g.jsx)("div",{className:"w-full",children:(0,g.jsx)(B.o,{className:"p-inputtext-sm w-full",value:Ae,onChange:e=>Fe(e.target.value),placeholder:i("search")})}),(0,g.jsxs)(j.w,{footer:e=>(0,g.jsxs)("div",{className:"flex align-items-center w-full gap-2",children:[(0,g.jsx)(f.z,{icon:"pi pi-accept",label:i("accept"),className:"p-button-sm",disabled:null===we||""===we,onClick:()=>{De(!0),Oe("A"),Me("")}}),(0,g.jsx)(f.z,{icon:"pi pi-cancel",label:i("reject"),className:"p-button-danger",disabled:null===we,onClick:()=>{Ie(!0)}})]}),name:"dt",size:"medium",value:ts,selectionMode:"checkbox",selection:we,onSelectionChange:e=>{Se(e.value)},dataKey:"id",stripedRows:!0,responsiveLayout:"scroll",emptyMessage:i("noOrganisationFound"),paginator:!0,rows:10,filters:Le,filterDisplay:"menu",loading:D,globalFilterFields:["name","status"],children:[(0,g.jsx)(b.s,{selectionMode:"multiple",headerStyle:{width:"5rem"}}),(0,g.jsx)(b.s,{field:Je,header:i("organisation")+" "+i("name")}),(0,g.jsx)(b.s,{body:Ye,field:"registrationTime",header:i("requestDate")}),(0,g.jsx)(b.s,{body:e=>i("STATUS_"+e.status),header:i("status")})]})]})}),(0,g.jsx)(u.V,{visible:Re,modal:!0,header:i("rejectReason")+" (*)",className:"p-fluid dialog-size",onHide:()=>{Ie(!1),Me("")},footer:is,children:(0,g.jsx)(E.g,{type:"text",className:"p-inputtext-sm",value:Pe,onChange:e=>Me(e.target.value),maxLength:200,placeholder:i("rejectReason")+" (*)",rows:7})}),(0,g.jsx)(N.Q,{visible:ze,onHide:()=>De(!1),message:i("confirmationMessage"),accept:()=>{R(!0);let e=[];for(let s=0;s<we.length;s++)e.push(we[s].id);if(0!==e.length){let s={organisationIds:e,type:Ue,rejectReason:Pe,domain:L};r.Z.updateWaitingOrganisationForEcosystem(s).then((()=>{R(!1),De(!1),Se([]),Xe(),K(!1)})).catch((()=>{R(!1)}))}else w.Am.error(i("pleaseSelect")),R(!1)},reject:He}),(0,g.jsx)(N.Q,{visible:Be,onHide:()=>Ee(!1),message:i("confirmDeleteOrganisationApproval"),icon:"pi pi-exclamation-triangle icon-red",accept:()=>{R(!0);let e=[];for(let s=0;s<we.length;s++)e.push(we[s].id);if(null==Pe||""===Pe)return R(!1),void w.Am.warning((0,g.jsx)(a.cC,{i18nKey:"warnMandatory"}));if(0!==e.length){let s={organisationIds:e,type:Ue,rejectReason:Pe,domain:L};r.Z.updateWaitingOrganisationForEcosystem(s).then((()=>{R(!1),Ee(!1),Ie(!1),Se([]),Xe(),Me("")})).catch((()=>{R(!1)}))}else w.Am.error(i("pleaseSelect")),R(!1)},reject:He}),(0,g.jsx)(x.Z,{loading:D,lang:i})]});var as}))},9267:(e,s,i)=>{i.d(s,{Z:()=>n});var t=i(7313),a=i(7114),l=i.n(a);const n=(0,i(5590).Zh)()((e=>{let{error:s,setError:i,setLoading:a,setDocumentLoading:n,timer:o,t:r}=e;return(0,t.useEffect)((()=>{if(!s)return;const e=s.response&&s.response.data&&s.response.data.message||s.message||s.timeoutErrorMessage||s.toString();a&&a(!1),n&&n(!1),l().fire({title:r(e),icon:"error",timer:o||2e3,showConfirmButton:!1}),i(null)}),[s,a,r]),null}))}}]);

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.