PageSourceSearch

https://irfaqraza.com/_next/static/chunks/pages/company/teams-2b27a196cdccca51.js

js irfaqraza.com collected 2026-09-25 22:42:44 UTC 6,331 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1986],{45973:(e,l,t)=>{"use strict";t.d(l,{A:()=>d});var a=t(37876),s=t(14232),n=t(43934),r=t(83872),o=t(78004),i=t.n(o);let u=()=>(0,a.jsxs)("li",{className:"p-2 cursor-move flex border-b border-primaryBorder bg-gray-00",children:[(0,a.jsx)(r.MenuAltIcon,{color:i().gray.gray3}),(0,a.jsx)("div",{className:"h-2 bg-gray-300 rounded-full w-28 m-2"})]}),d=e=>{let{data:l=[],setData:t=()=>{},displayKeyName:o="name",loading:i=!1,componentKeyName:d,className:c=" p-2  border-b border-primaryBorder "}=e,m=[...l];return(0,s.useEffect)(()=>{if(!i){let e=document.getElementById("items"),a=n.default.create(e,{animation:200,group:{name:"shared",pull:"clone",revertClone:!0},onEnd(e){let a=[];Object.keys(document.getElementById("items").children).forEach(t=>{let s=e.to.children[t].id;a.push(l.find(e=>e[o]===s))}),t(a)}});return()=>{a.destroy()}}},[i]),(0,a.jsxs)("ul",{id:"items",children:[i&&(null==m?void 0:m.length)===0?Array.from([,,,,,].keys()).map(e=>(0,a.jsx)(u,{},"reorder-item-".concat(e))):null,m.map(e=>(0,a.jsxs)("li",{id:e[o],name:e[o],className:"cursor-move flex items-center bg-gray-00 ".concat(c),children:[(0,a.jsx)("span",{className:"text-gray-300",children:(0,a.jsx)(r.MenuAltIcon,{})}),d?(0,a.jsx)("div",{className:"pl-2 w-full",children:e[d]}):(0,a.jsx)("span",{className:"text-sm font-medium text-gray-1k ml-0.5 pl-2 capitalize",children:e[o]})]},e[o]))]})}},47330:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>O});var a=t(37876),s=t(77328),n=t.n(s),r=t(2171),o=t(14232),i=t(47553),u=t(66132),d=t(21639),c=t(83872),m=t(72919),p=t(88913),y=t(34217),h=t(25450),v=t(34321),f=t(78747),x=t(68580),A=t(38243),g=t(45973),j=t(71297),b=t(68827);let C=e=>{let{setShowModal:l=()=>{},callback:t=()=>{}}=e,s=(0,r.useDispatch)(),[n,i]=(0,o.useState)([]),[u,c]=(0,o.useState)({save:!1,items:!1}),m=async()=>{try{c(e=>({...e,save:!0})),n.length&&(await v.gz.updateTeam({priorities:n.map(e=>e.id)}),s(h.WM.updateTeams({teams:n})),j.A.SuccessToast("Teams reordered successfully."),c(e=>({...e,save:!1})),l(!1),t(n))}catch(l){var e,a,r;c(e=>({...e,save:!1})),j.A.ErrorToast((null==l||null==(r=l.response)||null==(a=r.data)||null==(e=a.error)?void 0:e.message)||b.A.GLOBAL.wrong)}},p=async()=>{c(e=>({...e,items:!0}));try{let{data:{data:e}}=await v.gz.getTeams();i((null==e?void 0:e.teams)||[])}catch(e){j.A.ErrorToast(b.A.GLOBAL.wrong)}finally{c(e=>({...e,items:!1}))}};return(0,o.useEffect)(()=>{p()},[]),(0,a.jsxs)(A.Ay,{showModal:!0,setShowModal:l,title:"Reorder Teams",children:[(0,a.jsx)(A.Ep.Body,{children:(0,a.jsx)(g.A,{setData:i,data:n||[],displayKeyName:"name",loading:null==u?void 0:u.items})}),(0,a.jsx)(A.Ep.Footer,{className:"justify-end",children:(0,a.jsx)(d.Ay.Carbon,{small:!0,loading:null==u?void 0:u.save,disabled:null==u?void 0:u.save,onClick:m,children:"Save"})})]})};var w=t(78004),E=t.n(w);let S="people",T=[{label:"Newest",value:-1},{label:"Oldest",value:1}],N=[{label:"Show All",value:""},{label:"Verification Pending",value:"pending"},{label:"Verified",value:"companyVerified"},{label:"Admins Only",value:"adminsOnly"}],M=e=>{let{currentNavTab:l,company:t}=e,[s,n]=(0,o.useState)(!1),[r,i]=(0,o.useState)(!1),[u,y]=(0,o.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(()=>{switch(l){case S:return(0,a.jsx)(d.Ay.Carbon,{onClick:()=>n(!0),small:!0,iconLeft:(0,a.jsx)(c.PlusIcon,{size:"14"}),children:"Invite People"});case"teams":return(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.Ay.CarbonOutline,{onClick:()=>y(!0),small:!0,iconLeft:(0,a.jsx)(c.MenuAltIcon,{size:16}),children:"Reorder"}),(0,a.jsx)(d.Ay.Carbon,{onClick:()=>i(!0),small:!0,iconLeft:(0,a.jsx)(c.PlusIcon,{size:"14",color:E().white.DEFAULT}),children:"New Team"})]});default:return null}})(),s&&(0,a.jsx)(m.A,{showModal:s,setShowModal:n,companyInvite:!0,modalTitle:"Invite people to join ".concat((null==t?void 0:t.name)||"your"," team"),subText:""}),r&&(0,a.jsx)(p.A,{showModal:r,setShowModal:i,isEditing:!1,company:t}),u?(0,a.jsx)(C,{setShowModal:y}):null]})},O=(0,i.A)((0,x.A)(()=>{let e=(0,r.useDispatch)(),{company:l}=(0,r.useSelector)(e=>e.Company),{primaryUserData:t}=(0,r.useSelector)(e=>e.PrimaryUserData),{peopleCount:s}=(0,r.useSelector)(e=>e.Teams),[i,d]=(0,o.useState)(null),[c,m]=(0,o.useState)(null),[p,x]=(0,o.useState)(T[0]),[A,g]=(0,o.useState)(N[0]),j=async()=>{try{var l,t,a,s,n,r;let o=await v.gz.getTeamsAndPeopleCount();e(h.WM.updateTeams({peopleCount:null==o||null==(t=o.data)||null==(l=t.data)?void 0:l.peopleCount,teamsCount:null==o||null==(s=o.data)||null==(a=s.data)?void 0:a.teamsCount,verificationRequestsCount:null==o||null==(r=o.data)||null==(n=r.data)?void 0:n.verificationRequestsCount}))}catch(e){}},b=async()=>{try{var e,l;let t=await v.gz.getCompanyAdmins(),a={};null==t||null==(l=t.data)||null==(e=l.adminProfiles)||e.forEach(e
1=>{a[e.id]=e}),m(a)}catch(o){let{id:e,firstName:l,lastName:a,profileHandle:s,profilePicture:n,headline:r}=t;m({[e]:{id:e,firstName:l,lastName:a,profileHandle:s,profilePicture:n,headline:r}})}};return((0,o.useEffect)(()=>{s||j()},[]),(0,o.useEffect)(()=>{(null==l?void 0:l.id)&&!c&&b()},[l,c]),(0,o.useEffect)(()=>{(null==i?void 0:i.totalCount)&&e(h.WM.updateTeams({peopleCount:i.totalCount}))},[null==i?void 0:i.totalCount]),(null==t?void 0:t.id)&&!(null==t?void 0:t.isCompanyAdmin))?(0,a.jsx)(y.A.NonAuthorisedPageErr,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n(),{children:(0,a.jsx)("title",{children:"Team Members | ".concat((null==l?void 0:l.name)||"")})}),(0,a.jsx)(f.A,{companyData:l,pageProp:{internalPage:!0,heading:"Team Members",centerTopOptions:(0,a.jsx)(M,{company:l,currentNavTab:S})},children:(0,a.jsx)(u.A,{companyAdmins:c,selectedSort:p,selectedFilter:A,allVerificationRequests:i,setSelectedSort:x,setSelectedFilter:g,setCompanyAdmins:m,setAllVerificationRequests:d,sortByOptions:T,filterByOptions:N})})]})}))},68580:(e,l,t)=>{"use strict";t.d(l,{A:()=>r});var a=t(37876),s=t(89099),n=t(2171);let r=e=>l=>{let t=(0,s.useRouter)(),{appData:r}
1=(0,n.useSelector)(e=>e.AppData);if(null==r?void 0:r.id)return(null==r?void 0:r.isCompanyAdmin)?(0,a.jsx)(e,{...l}):(t.push("/404"),null)}},96627:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/company/teams",function(){return t(47330)}])}},e=>{e.O(0,[5389,1889,8747,4611,6132,636,6593,8792],()=>e(e.s=96627)),_N_E=e.O()}]);

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.