PageSourceSearch

https://hack2skill.com/assets/index-623179e0.js

js hack2skill.com collected 2026-10-01 14:44:50 UTC 18,607 bytes, 1 lines download raw bytes

1import{A as Pe,aK as _e,i as e,I as ue,D as g,M as T,aE as me,a6 as ke,a7 as Oe,a8 as Fe,cD as N,cM as oe,F as u,j as m,dn as Ve,dp as Me,dq as je,k as Ue,cq as qe,V as Q,B as C,E as We,aO as He,S as Be,cH as ze,cu as $e,du as Ge,cv as Ke,C as Xe,cc as Ye,cz as Je}from"./index-81971edb.js";import{r as n}from"./vendor-4adab861.js";import{A as Qe}from"./index-8ab0029c.js";import{d as Ze}from"./Edit-493d361f.js";import{w as et,j as tt}from"./ui-86749c30.js";import{g as at,a as st,u as rt,b as nt}from"./index-e22e4498.js";import{u as lt}from"./router-805badc2.js";import{H as it}from"./index-3d24c7c6.js";import"./redux-cd3a9116.js";var ee={},ot=et;Object.defineProperty(ee,"__esModule",{value:!0});var pe=ee.default=void 0,ct=ot(Pe()),dt=tt;pe=ee.default=(0,ct.default)((0,dt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");const ce="https://h2svision.github.io/publicAssets/vision/defaultUser.png",ut=()=>_e([{to:"/staff/initiatives/list",icon:e(ue,{className:"text-slate-700 opacity-45",fontSize:17,icon:"heroicons:home-solid"})}]),mt=[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"},{label:"75",value:"75"},{label:"100",value:"100"}],Z=[{label:"All",value:""},{label:"Verified",value:"VERIFIED"},{label:"Revoked",value:"REVOKED"},{label:"Under Review",value:"UNDER REVIEW"},{label:"Expired",value:"EXPIRED"}],J=[{name:"name",title:"Company Name",placeholder:"Enter your company name",type:"text",required:!0,validation:"LONG_TEXT",helperText:"Enter your company name"},{id:"type",name:"type",title:"Company Type",placeholder:"Write here...",type:g?.SELECT,helperText:"This will appear on your workspace and dashboard.(light)",required:!0,pickList:[{label:"Startup",value:"STARTUP"},{label:"Enterprise",value:"Enterprise"}]},{name:"picture",title:"Let’s upload a company picture",type:g.FILE,required:!0,helperText:"Upload a high quality image for your profile",accept:["image/*"],maxSize:1024*1024*1,Wrapper:T,customUpload:me}],de=[{name:"adminName",title:"Admin Name",placeholder:"Enter admin name",type:"text",required:!0,validation:"LONG_TEXT",helperText:"Enter admin name"},{name:"adminEmail",title:"Admin Email",placeholder:"Enter admin email",type:"text",required:!0,validation:"LONG_TEXT",helperText:"Enter admin email"},{id:"phone",name:"phone",title:"Contact Number",placeholder:"Mobile",className:"col-span-2",type:g?.PHONE},{id:"address",name:"address",type:g.FORM,className:"address-container  col-span-2",fields:[{name:"country",t
1itle:"Country",type:g?.MULTIPLE_SELECT,isMulti:!1,isCreatable:!1,isSearchable:!0,getApiFunction:ke,placeholder:"start typing...",className:"requestForm-address",dependentFields:[{field:"state",value:"country",title:"State",type:"value"},{field:"city",value:"country",title:"City",type:"value"},{field:"state",value:void 0,title:"State",type:"disabled"}]},{name:"state",title:"State",placeholder:"start typing...",type:g?.MULTIPLE_SELECT,isMulti:!1,isCreatable:!1,isSearchable:!0,getApiFunction:Oe,className:"requestForm-address",dependentFields:[{field:"city",value:"state",title:"City",type:"value"},{field:"city",value:void 0,type:"disabled"}]},{name:"city",title:"City",placeholder:"start typing...",type:g?.MULTIPLE_SELECT,isMulti:!1,isCreatable:!1,isSearchable:!0,getApiFunction:Fe,className:"requestForm-address"}]}],pt=a=>[{name:"name",title:"Company Name",placeholder:"Enter your company name",type:"text",required:!0,validation:"LONG_TEXT",helperText:"Enter your company name",value:a?.name||""},{id:"type",name:"type",title:"Company Type",placeholder:"Write here...",type:g?.SELECT,helperText:"This will appear on your workspace and dashboard.(light)",required:!0,pickList:[{label:"Startup",value:"STARTUP"},{label:"Enterprise",value:"ENTERPRISE"}],value:a?.type},{name:"picture",title:"Let’s upload a company picture",type:g.FILE,required:!0,helperText:"Upload a high quality image for your profile",accept:["image/*"],maxSize:1024*1024*1,Wrapper:T,customUpload:me,value:a?.picture||""}];function ft({account:a={},handleEditAccountClick:i=()=>{},handleActionClick:l}){const c=[];switch(a?.status){case"UNDER REVIEW":c?.push({label:"Edit",value:"EDIT",icon:"material-symbols:edit-square-outline",onClick:()=>{i(a)}},{label:"Approve",value:"APPROVE",customClass:"text-h2sSuccess-600",icon:"icon-park-outline:check-one",onClick:()=>{l(a,"VERIFIED")}},{label:"Revoke",value:"REVOKE",customClass:"text-h2sError-600",icon:"material-symbols:delete-outline",onClick:()=>{l(a,"REVOKED")}});break;case"VERIFIED":c?.push({label:"Edit",value:"EDIT",icon:"material-symbols:edit-square-outline",onClick:()=>{i(a)}},{label:"Revoke",value:"REVOKE",customClass:"text-h2sError-600",icon:"material-symbols:delete-outline",onClick:()=>{l(a,"REVOKED")}});break;case"REVOKED":c?.push({label:"Edit",value:"EDIT",icon:"material-symbols:edit-square-outline",onClick:()=>{i(a)}},{label:"Approve",value:"APPROVE",customClass:"text-h2sSuccess-600",icon:"icon-park-outline:check-one",onClick:()=>{l(a,"VERIFIED")}});break}return c||[]}const ht=({setSortColumn:a,sortColumn:i})=>{const l=t=>{a(s=>s.name===t?{name:t,order:s.order==="asc"?"desc":"asc"}:{name:t,order:"asc"})},c=[{label:"Org Name / Alias",_id:"name",type:"ORG_DETAILS",render:t=>e(u,{children:e("div",{className:"flex items-center justify-between text-grey2 w-full gap-1",children:e("span",{className:"ellipsis-two-lines flex-grow",title:t?.label,children:t?.label})})})},{label:"Org Domain",_id:"domain",type:N?.SHORT_ANSWER,render:t=>e(u,{children:e("div",{className:"flex items-center justify-between text-grey2 w-full gap-1",children:e("span",{className:"ellipsis-two-lines flex-grow",title:t?.label,children:t?.label})})})},{label:"Type",_id:"type",type:N?.SHORT_ANSWER,render:t=>e(u,{children:e("div",{className:"flex items-center justify-between text-grey2 w-full gap-1",children:e("span",{className:"ellipsis-two-lines flex-grow",title:t?.label,children:t?.label})})})},{label:"Admin",_id:"admin",type:N?.USER,render:t=>e(u,{children:e("div",{className:"flex items-center justify-between text-grey2 w-full gap-1",children:e("span",{className:"ellipsis-two-lines flex-grow",title:t?.label,children:t?.label})})})},{label:"Status",_id:"status",type:"STATUS",render:t=>e(u,{children:m("div",{className:"flex items-center justify-between text-grey2 w-full gap-1",children:[e("span",{className:"ellipsis-two-lines flex-grow",title:t?.label,children:t?.label}),i?.name==="status"?i.order==="asc"?e(Ve,{onClick:()=>l("status"),className:"cursor-pointer text-h2sBrand-900",sx:{fontSize:19}}):e(Me,{onClick:()=>l("status"),className:"cursor-pointer text-h2sBrand-900",sx:{fontSize:19}}):e(je,{onClick:()=>l("status"),className:"cursor-pointer text-h2sGrey-500",sx:{fontSize:25}})]})})},{label:"View Details",_id:"viewDetails",type:"VIEWDETAILS",render:t=>e(u,{children:e("div",{className:"flex items-center justify-between text-grey2 w-full gap-1",children:e("span",{className:"ellipsis-two-lines flex-grow",title:t?.label,children:t?.label})})})}];return[{label:"Actions",type:"ACTION",_id:"actions",columnClass:"text-center !min-w-[0px] ",render:t=>e("span",{className:"text-h2sSlate-500 font-bold text-[12px]",title:t?.label,children:t?.label})},...c]};function xt({navigate:a,rowTableData:i,columnData:l,handleEditAccountClick:c=()=>{},handleActionClick:o}){return i?.map(s=>{const p=[];return l?.forEach(f=>{switch(f?.type){case N?.SHORT_ANSWER:p?.push({label:s[f?._id]||"-",render:()=>e(u,{children:e("p",{className:"text-wrap text-h2sSlate-400 text-sm !max-w-60",children:s[f?._id]??"-"})})});break;case"ACTION":p?.push({label:"ACTION",render:E=>e(u,{children:e("div",{className:"relative flex !justify-center",children:e(Qe,{handleMenuClick:()=>{},customClass:"text-h2sSlate-600 cursor-pointer",customIcon:e(Ze,{className:"text-h2sSlate-500"}),menuButtonsData:ft({account:s,handleEditAccountClick:c,handleActionClick:o}),rowIndex:1,rowData:E?._id})})})});break;case"VIEWDETAILS":p?.push({label:"View Details",render:()=>e(u,{children:e("div",{onClick:()=>{a(`/staff/${s?._id}/manage-accounts-details/`)},className:"relative flex !justify-center",children:e(pe,{className:"text-h2sSlate-500 cursor-pointer"})})})});break;case"STATUS":p?.push({label:s?.status,render:()=>e(u,{children:e("div",{className:`w-fit h-fit px-4 py-2 rounded-lg uppercase text-xs ${s?.status==="REVOKED"?"bg-h2sError-50 text-h2sError-600":s?.status==="VERIFIED"?"bg-h2sSuccess-50 text-h2sSuccess-600":s?.status==="UNDER REVIEW"?"bg-h2sWarning-50 text-h2sWarning-600":""}  `,children:e("p",{children:s?.status})})})});break;case"ORG_DETAILS":p?.push({label:s?.name,render:()=>e(u,{children:e("div",{title:s?.name,className:"flex items-center gap-4",children:e(oe,{isTitleOneLines:!1,className:"pr-8 ",imageClass:"!object-contain",data:{image:s?.picture?s?.picture:ce,title:s?.name},textClass:`restrict-table-column-text ${f?._id!=="Team"?"!line-clamp-2 !text-wrap":""}`})})})});break;case N?.USER:p?.push({label:s[f?._id]?.name,render:()=>e(u,{children:e("div",{title:s[f?._id]?.name,className:"flex items-center gap-4",children:e(oe,{isTitleOneLines:!1,className:"pr-8 ",imageClass:"!object-contain",data:{image:s?.[f?._id]?.picture?s?.[f?._id]?.picture:ce,title:s[f?._id]?.name},textClass:`restrict-table-column-text ${f?._id!=="Team"?"!line-clamp-2 !text-wrap":""}`})})})});break}}),p})||[]}const gt=()=>{async function a(o={}
1){try{return await at(o)}catch(t){console.log("Error: ",t)}}async function i({data:o={}}){try{return await st({data:o})}catch(t){console.log("Error: ",t)}}async function l({accountId:o,data:t={}}){try{return await rt({accountId:o,data:t})}catch(s){console.log("Error: ",s)}}async function c({accountId:o,data:t={}}){try{return await nt({accountId:o,data:t})}catch(s){console.log("Error: ",s)}}return{getAccountListApi:a,addAccountDetailsApi:i,updateAccountDetailsApi:l,updateAccountStatusApi:c}},yt=()=>{const a=Ue(),i=lt(),{getAccountListApi:l,updateAccountDetailsApi:c,updateAccountStatusApi:o,addAccountDetailsApi:t}=gt(),[s,p]=n.useState(!1),f=ut(),[E,O]=n.useState(""),y=qe(E,800),[F,V]=n.useState(!1),[b,A]=n.useState(1),[R,M]=n.useState(1),[j,U]=n.useState(null),[x,D]=n.useState("10"),[q,W]=n.useState("All"),[v,H]=n.useState(""),[B,z]=n.useState([]),[S,I]=n.useState({}),[h,$]=n.useState({name:"status",order:"desc"}),[G,L]=n.useState(!1),[P,K]=n.useState(J||[]),[te,fe]=n.useState(de||[]),ae=n.useRef(null),se=n.useRef(null),[he,X]=n.useState(!1),[xe,_]=n.useState(!1),[re,ge]=n.useState(""),[ye,Y]=n.useState(!1),[be,Ee]=n.useState(J||[]),ne=n.useRef(null);async function ve(){try{const r=await ae?.current?.getValues()||{},d=await se?.current?.getValues()||{},{address:w,...De}=d,Ie={...r,...De,country:d?.address?.country?.value||"",state:d?.address?.state?.value||"",city:d?.address?.city?.value||""};if((await t({data:Ie}))?.success){L(!1);const Le={search:y||"",page:b||1,records:x??"10",status:v,sortOrder:h?.order,sortColumn:h?.name};k(Le)}}catch(r){console.log("Error: ",r)}}async function Ce(){try{const r=await ne?.current?.getValues()||{};if((await c({accountId:S?._id,data:{...r,type:r?.type||""}}))?.success){Y(!1);const w={search:y||"",page:b||1,records:x??"10",status:v,sortOrder:h?.order,sortColumn:h?.name};k(w)}}catch(r){console.log("Error: ",r)}}function le(r,d){_(!0),ge(d),I(r)}async function Ae(){X(!0);try{if((await o({accountId:S?._id,data:{status:re}}))?.success){const d={search:y||"",page:b||1,records:x??"10",status:v,sortOrder:h?.order,sortColumn:h?.name};X(!1),_(!1),k(d)}}catch(r){console.log(r)}finally{X(!1),_(!1)}}const ie=()=>ht({sortColumn:h,setSortColumn:$})||[],Se=()=>xt({rowTableData:B,columnData:ie(),handleEditAccountClick:we,handleActionClick:le,navigate:i})||[];async function we(r={}){r?._id&&(Y(!0),Ee(pt(r)||[]),I(r))}function Ne(r){E!=1&&A(1),O(r)}function Te(r){const d=Z?.find(w=>{if(w?.label===r)return w?.value});H(d?.value),W(r||"")}function Re(){const r=Z?.findIndex(d=>d?.label?.toLowerCase()===q?.toLowerCase());return r<0?0:r}async function k(r){p(!0);try{const d=await l(r);d&&(p(!1),z(d?.data||[]),U(d?.count||0),M(d?.pages||0))}catch(d){p(!1),console.log("Error: ",d)}finally{p(!1)}}return n.useLayoutEffect(()=>{!P.length==0&&K(J||[]),!te.length==0&&fe(de||[])},[]),n.useEffect(()=>{const r={search:y||"",page:b||1,records:x??"10",status:v,sortOrder:h?.order,sortColumn:h?.name};k(r)},[x,y,v,b,h?.order]),n.useEffect(()=>{A(1)},[x]),{t:a,getActiveTabIndex:Re,tabSwitchHandler:Te,rowPerPageCount:mt,isLoading:s,totalPages:R,currentPage:b,totalDataCount:j,setRowsPerPage:D,rowsPerPage:x,setCurrentPage:A,debouncedSearchRecord:y,handleSearch:Ne,setIsRowList:V,isRowList:F,breadCrumDataToSend:f,generateColumnData:ie,generateRowData:Se,currentAccountData:S,additionAdminFormRef:se,additionAdminDetails:te,addAccountModal:G,setAddAccountModal:L,handleAddAccountConfirmation:ve,addAccountForm:P,addAccountRef:ae,editAccountModal:ye,setEditAccountModal:Y,editAccountForm:be,editAccountRef:ne,handleEditAccountConfirmation:Ce,isConfirmationModalOpen:xe,currentStatusAction:re,setIsConfirmationModalOpen:_,confirmationLoader:he,handleInitiativeAction:le,handleConfirmationClick:Ae}},bt=({t:a,additionAdminFormRef:i,additionAdminDetails:l,confirmationModalOpen:c,setConfirmationModalOpen:o,handleConfirmModal:t=()=>{},addAccountForm:s=[],addAccountRef:p=""})=>e(u,{children:c?e(T,{customWidth:"max-w-3xl",modalTitle:"Add Account",isOpen:c,onClose:()=>{o()},customClass:"modal-border",children:m("div",{className:"mt-4 ",children:[e("div",{className:"grid grid-cols-2 gap-4",children:e(Q,{fields:s,ref:p})}),e("hr",{className:"my-6"}),e("div",{className:"grid grid-cols-2 gap-4 max-md:flex max-md:flex-col",children:e(Q,{fields:l,ref:i})}),m("div",{className:"mt-4 mb-4 flex justify-end gap-4",children:[e(C,{variant:"outlined",customClass:"!w-fit",onClick:()=>{o()},children:a("cCancelButton")}),e(C,{customClass:"!w-fit ",onClick:t,children:a("cConfirm")})]})]})}):e(u,{})}),Et=({t:a,confirmationModalOpen:i,setConfirmationModalOpen:l,handleConfirmModal:c=()=>{},editAccountForm:o=[],editAccountRef:t=""})=>e(u,{children:i?e(T,{customWidth:"max-w-3xl",modalTitle:"Edit Account",isOpen:i,onClose:()=>{l()},customClass:"modal-border",children:m("div",{className:"mt-6 ",children:[e("div",{className:"grid grid-cols-2 gap-4",children:e(Q,{fields:o,ref:t})}),m("div",{className:"mt-4 mb-4 flex justify-end gap-4",children:[e(C,{variant:"outlined",customClass:"!w-fit",onClick:()=>{l()},children:a("cCancelButton")}),e(C,{customClass:"!w-fit ",onClick:c,children:a("cConfirm")})]})]})}):e(u,{})}),vt=({t:a,isConfirmationModalOpen:i,setIsConfirmationModalOpen:l,handleConfirmModal:c,isLoading:o,modalContent:t="_"})=>e(u,{children:i?e(T,{isOpen:i,onClose:()=>{l()},customClass:"!pt-4 !pb-2",children:m("div",{className:"text-center",children:[e("p",{className:"text-subtitle1v1",children:`Are you sure want to ${t==="VERIFIED"?"Verify":"Revoke"}`}),m("div",{className:"flex justify-center gap-5 my-5",children:[e(C,{variant:"outlined",color:"disabledv1",onClick:()=>{l()},customClass:"!w-fit",children:a("No")}),e(C,{isLoading:o,onClick:c,variant:"filled",color:t==="VERIFIED"?"success":"error",customClass:"!w-fit",children:a("Yes")})]})]})}):e(u,{})}),Pt=()=>{const{t:a,isLoading:i,getActiveTabIndex:l,totalPages:c,currentPage:o,tabSwitchHandler:t,rowPerPageCount:s,totalDataCount:p,setRowsPerPage:f,rowsPerPage:E,setCurrentPage:O,debouncedSearchRecord:y,handleSearch:F,setIsRowList:V,isRowList:b,breadCrumDataToSend:A,generateColumnData:R,generateRowData:M,additionAdminFormRef:j,additionAdminDetail
1s:U,addAccountModal:x,setAddAccountModal:D,handleAddAccountConfirmation:q,addAccountForm:W,addAccountRef:v,editAccountModal:H,setEditAccountModal:B,editAccountForm:z,editAccountRef:S,handleEditAccountConfirmation:I,isConfirmationModalOpen:h,setIsConfirmationModalOpen:$,confirmationLoader:G,currentStatusAction:L,handleConfirmationClick:P}=yt();return m("div",{children:[e(vt,{t:a,modalContent:L,isConfirmationModalOpen:h,setIsConfirmationModalOpen:$,isLoading:G,handleConfirmModal:P}),e(bt,{t:a,additionAdminFormRef:j,additionAdminDetails:U,confirmationModalOpen:x,setConfirmationModalOpen:D,handleConfirmModal:q,addAccountForm:W,addAccountRef:v}),e(Et,{t:a,confirmationModalOpen:H,setConfirmationModalOpen:B,handleConfirmModal:I,editAccountForm:z,editAccountRef:S}),e("div",{children:m("div",{className:"font-sans",children:[e(We,{metaData:{title:a("cManageAccountHeading")}}),m("div",{className:"w-full px-[24px] ",children:[e("div",{className:"pt-8 pb-2 w-full md:sticky top-0 bg-h2sGrey-50 z-20",children:e(He,{breadCrumData:A,className:""})}),m("div",{className:"flex justify-between items-center gap-4 max-md:flex-col md:items-start ",children:[e("div",{children:e(it,{title:a("cManageAccountHeading"),description:a("cManageAccountSubHeading")})}),m(C,{customClass:"!w-fit",onClick:()=>D(!0),children:[e(ue,{icon:"material-symbols:add"}),"Create Account"]})]})]}),e("div",{className:"px-[24px]",children:m("div",{className:"rounded-2xl bg-white shadow-soft-xl  w-full mt-6 mb-20",children:[e("div",{className:"flex-col  justify-between max-[640px]:flex-wrap max-[640px]:gap-3  gap-4 max-xl:flex-col p-5",children:m("div",{className:"flex justify-between max-xl:flex-col gap-4",children:[e("div",{className:" flex gap-4",children:e("div",{className:"flex max-[640px]:flex-wrap max-[640px]:gap-0  gap-2 ",children:e("div",{className:"max-[640px]:w-full max-[640px]:mb-3 w-64",children:e(Be,{value:y||"",onChange:K=>F(K),placeholder:"Search here...",customClass:"!px-[8px] !py-[3px]"})})})}),e("div",{children:e(ze,{containerClassName:"items-center max-md:items-start",tabsData:Z,activeTab:l(),clickHandler:t})})]})}),m("div",{className:"flex gap-4 px-5 justify-between items-center max-[640px]:flex-wrap max-[640px]:gap-3  md:sticky bg-white z-10  top-[3.9rem]",children:[e("div",{children:e($e,{isRowList:b,setIsRowList:V,rowsPerPage:E,setRowsPerPage:f,rowPerPageCount:s})}),m("div",{className:"flex items-center max-[640px]:flex-wrap max-[640px]:gap-3 gap-4",children:[e(Ge,{rowsPerPage:E,totalDataCount:p,currentPage:o}),e(Ke,{t:a,isLoading:i,totalPages:c||1,currentPage:o,setCurrentPage:O})]})]}),e("div",{className:"",children:e(Xe,{isLoading:i,children:R()?.length===0?m("div",{className:"!flex !flex-col mx-auto w-fit my-[1rem] font-openSans text-center",children:[e(Ye,{className:"w-[10rem] !h-[10rem] mx-auto "}),e("h5",{className:"text-h6 text-h2sSlate-600  mb-3",children:a("cRecordNotFound")}),e("p",{className:"text-sm text-h2sSlate-400 mb-10",children:a("cTableNoRecordDescription")})]}):e(Je,{columns:R()||[],rows:M()||[]})})})]})})]})})]})};export{Pt 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.